diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 00000000..331145a8 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,79 @@ +kind: pipeline +name: default +steps: + + - name: integration + image: enigmampc/docker-client + privileged: true + volumes: + - name: sock + path: /var/run/docker.sock + commands: + - git clone https://github.com/enigmampc/discovery-docker-network.git + - cd discovery-docker-network && cp .env-template .env + - sed -i "s/COMPOSE_PROJECT_NAME=.*/COMPOSE_PROJECT_NAME=enigma_${DRONE_BUILD_NUMBER}/" .env + - export MATCHING_BRANCH_CORE="$(git ls-remote --heads https://github.com/enigmampc/enigma-core.git ${DRONE_BRANCH} | wc -l)" + - export MATCHING_BRANCH_CONTRACT="$(git ls-remote --heads https://github.com/enigmampc/enigma-contract.git ${DRONE_BRANCH} | wc -l)" + - export DOCKER_TAG=p2p_${DRONE_BUILD_NUMBER} + - sed -i "s/DOCKER_TAG=latest/DOCKER_TAG=${DOCKER_TAG}/" .env; + - | + /bin/bash -c ' + declare -a PROJECTS=(core km contract) + declare -A DOCKER_IMAGES=([core]=enigma_core_hw [km]=enigma_km_hw [contract]=enigma_contract) + declare -A GIT_BRANCH_ARG=([core]=GIT_BRANCH_CORE [km]=GIT_BRANCH_CORE [contract]=GIT_BRANCH_CONTRACT) + declare -A PROJECT_DIRECTORY=([core]=enigma-core [km]=enigma-core [contract]=enigma-contract) + declare -A PROJECT_BRANCH_FOUND=([core]=$MATCHING_BRANCH_CORE [km]=$MATCHING_BRANCH_CORE [contract]=$MATCHING_BRANCH_CONTRACT) + for project in $${PROJECTS[@]}; do + DOCKER_IMAGE="enigmampc/$${DOCKER_IMAGES[$project]}" + if [[ "$DRONE_BRANCH" == "master" ]]; then + docker pull "$DOCKER_IMAGE:latest" + docker tag "$DOCKER_IMAGE:latest" "$DOCKER_IMAGE:$DOCKER_TAG" + elif [ "$${PROJECT_BRANCH_FOUND[$project]}" -eq 0 ]; then + docker pull "$DOCKER_IMAGE:develop" + docker tag "$DOCKER_IMAGE:develop" "$DOCKER_IMAGE:$DOCKER_TAG" + else + cd "$${PROJECT_DIRECTORY[$project]}" + if [[ "$project" == "km" ]]; then + docker build -f Dockerfile.km --build-arg GIT_BRANCH_CORE=${DRONE_BRANCH} --build-arg SGX_MODE=HW -t "$DOCKER_IMAGE:$DOCKER_TAG" --no-cache . + elif [[ "$project" == "core" ]]; then + docker build --build-arg GIT_BRANCH_CORE=${DRONE_BRANCH} --build-arg SGX_MODE=HW -t "$DOCKER_IMAGE:$DOCKER_TAG" --no-cache . + else + docker build --build-arg "$${GIT_BRANCH_ARG[$project]}=${DRONE_BRANCH}" -t "$DOCKER_IMAGE:$DOCKER_TAG" --no-cache . + fi + cd .. + fi + done' + - cd enigma-p2p && docker build --build-arg GIT_BRANCH_P2P=${DRONE_BRANCH} -t enigmampc/enigma_p2p:$DOCKER_TAG --no-cache . && cd .. + - export NODES=3 + - docker-compose -f docker-compose.yml -f docker-compose.hw.yml -f docker-compose.test.yml up --scale core=$NODES --scale p2p=$NODES --exit-code-from client && export RESULT=$? || export RESULT=$? + - docker-compose -f docker-compose.yml -f docker-compose.hw.yml down -v --rmi all || true + - if [ $RESULT -ne 0 ]; then exit 1; fi + + - name: deploy + image: enigmampc/docker-client + depends_on: + - integration + when: + branch: + - develop + - master + privileged: true + volumes: + - name: sock + path: /var/run/docker.sock + environment: + USERNAME: + from_secret: username + PASSWORD: + from_secret: password + commands: + - cd discovery-docker-network/enigma-p2p + - echo $PASSWORD | docker login -u $USERNAME --password-stdin + - if [[ ${DRONE_BRANCH} == "master" ]]; then export DOCKER_TAG=latest; else export DOCKER_TAG=develop; fi + - docker build --build-arg GIT_BRANCH_P2P=${DRONE_BRANCH} -t enigmampc/enigma_p2p:$DOCKER_TAG --no-cache . + - docker push enigmampc/enigma_p2p:$DOCKER_TAG + +volumes: + - name: sock + host: + path: /var/run/docker.sock diff --git a/.travis.yml b/.travis.yml index 1e04abd1..68c7e674 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,7 @@ language: node_js node_js: - - "11.15" - -env: - - DOCKER_COMPOSE_VERSION=1.23.2 - -before_install: - - sudo rm /usr/local/bin/docker-compose - - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose - - chmod +x docker-compose - - sudo mv docker-compose /usr/local/bin + - "10.16" install: - npm install -g truffle@5.0.15 @@ -21,18 +12,6 @@ script: - if [ ${TRAVIS_BRANCH} == "develop" ] || [ ${TRAVIS_BRANCH} == "master" ]; then echo $TRAVIS_BRANCH ; npm run test-tree; fi - - git clone https://github.com/enigmampc/discovery-docker-network.git - - if [[ $TRAVIS_BRANCH == "master" ]]; then export TAG=latest; else export TAG=develop; fi - - - | - pushd discovery-docker-network && - cp .env-template .env && - sed -i "s/SGX_MODE=HW/SGX_MODE=SW/" .env && - if [[ $TAG == "develop" ]]; then sed -i "s/DOCKER_TAG=latest/DOCKER_TAG=develop/" .env; fi && - sed -i "s/-vv/-v/" enigma-core/start_core.bash && - popd - - pushd discovery-docker-network/enigma-p2p && docker build --build-arg GIT_BRANCH_P2P=$TRAVIS_BRANCH -t enigmampc/enigma_p2p:$TAG --no-cache . >/dev/null && popd - - pushd discovery-docker-network && docker-compose -f docker-compose.yml -f docker-compose.test.yml up --exit-code-from client && popd after_success: - npm run report-coverage @@ -40,10 +19,3 @@ after_success: notifications: email: on_success: never - -deploy: - provider: script - script: bash scripts/deploy.sh - on: - all_branches: true - condition: $TRAVIS_BRANCH =~ ^master|develop$ \ No newline at end of file diff --git a/README.md b/README.md index 22317c8c..41e432df 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ The P2P implementation of the Enigma Worker. This implementation is part of the | Branch | Build | Code Coverage | |--------|-------|---------------| -| Master |[![Build Status](https://travis-ci.com/enigmampc/enigma-p2p.svg?token=cNBBjbVVEGszuAJUokFT&branch=master)](https://travis-ci.com/enigmampc/enigma-p2p) | [![codecov](https://codecov.io/gh/enigmampc/enigma-p2p/branch/master/graph/badge.svg?token=SSyRKy7Ckg)](https://codecov.io/gh/enigmampc/enigma-p2p) | -| Develop |[![Build Status](https://travis-ci.com/enigmampc/enigma-p2p.svg?token=cNBBjbVVEGszuAJUokFT&branch=develop)](https://travis-ci.com/enigmampc/enigma-p2p) | [![codecov](https://codecov.io/gh/enigmampc/enigma-p2p/branch/develop/graph/badge.svg?token=SSyRKy7Ckg)](https://codecov.io/gh/enigmampc/enigma-p2p) | +| Master |[![Build Status](https://travis-ci.org/enigmampc/enigma-p2p.svg?branch=master)](https://travis-ci.org/enigmampc/enigma-p2p) | [![codecov](https://codecov.io/gh/enigmampc/enigma-p2p/branch/master/graph/badge.svg?token=SSyRKy7Ckg)](https://codecov.io/gh/enigmampc/enigma-p2p) | +| Develop |[![Build Status](https://travis-ci.org/enigmampc/enigma-p2p.svg?branch=develop)](https://travis-ci.org/enigmampc/enigma-p2p) | [![codecov](https://codecov.io/gh/enigmampc/enigma-p2p/branch/develop/graph/badge.svg?token=SSyRKy7Ckg)](https://codecov.io/gh/enigmampc/enigma-p2p) | # Table of Contents @@ -60,7 +60,7 @@ To run the node inside a container from the project directory type: ## Installing globally with nvm 1. install `nvm` -2. install some node version : `$nvm install 11.15` +2. install some node version : `$nvm install 10.16` 3. type `npm install -g enigma-p2p` 4. to run global type : `enigma-p2p-test ` @@ -96,24 +96,26 @@ Example: 1. launch a Bootstrap node: ``` -node cli_app.js -i B1 -b B1 -p B1 --core 127.0.0.1:1543 --proxy 3346 --random-db +node cli_app.js -i B1 -b B1 -p B1 --core 127.0.0.1:1543 --proxy 3346 --random-db --mock-core ``` 2. launch a regular worker node that will connect to the bootstrap: ``` -node cli_app.js -b B1 --core 127.0.0.1:6000 --random-db +node cli_app.js -b B1 --core 127.0.0.1:6000 --random-db --mock-core ``` 3. launch ANOTHER regular worker node that will connect to the bootstrap: ``` -node cli_app.js -b B1 --core 127.0.0.1:6001 --random-db +node cli_app.js -b B1 --core 127.0.0.1:6001 --random-db --mock-core ``` In this example: -`--core :` enigma-core uri +`--core :` enigma-core uri. In this example we will be using a core simulation. + +`--mock-core :` launch a core simulation. `--proxy ` will start up the JSONrpc server as well. @@ -126,6 +128,7 @@ In this example: `-p` run on a specific port since the bootstrap node is the first node everyone will connect to. + # Running the tests Tests are based on `Mocha` and can invoked by typing: diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index bbac4bba..a7801b7f 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -1,8 +1,8 @@ # enigma-p2p | Branch | Build | Code Coverage | |--------|-------|---------------| -| Master |[![Build Status](https://travis-ci.com/enigmampc/enigma-p2p.svg?token=cNBBjbVVEGszuAJUokFT&branch=master)](https://travis-ci.com/enigmampc/enigma-p2p) | [![codecov](https://codecov.io/gh/enigmampc/enigma-p2p/branch/master/graph/badge.svg?token=SSyRKy7Ckg)](https://codecov.io/gh/enigmampc/enigma-p2p) | -| Develop |[![Build Status](https://travis-ci.com/enigmampc/enigma-p2p.svg?token=cNBBjbVVEGszuAJUokFT&branch=develop)](https://travis-ci.com/enigmampc/enigma-p2p) | [![codecov](https://codecov.io/gh/enigmampc/enigma-p2p/branch/develop/graph/badge.svg?token=SSyRKy7Ckg)](https://codecov.io/gh/enigmampc/enigma-p2p) | +| Master |[![Build Status](https://travis-ci.org/enigmampc/enigma-p2p.svg?branch=master)](https://travis-ci.org/enigmampc/enigma-p2p) | [![codecov](https://codecov.io/gh/enigmampc/enigma-p2p/branch/master/graph/badge.svg?token=SSyRKy7Ckg)](https://codecov.io/gh/enigmampc/enigma-p2p) | +| Develop |[![Build Status](https://travis-ci.org/enigmampc/enigma-p2p.svg?branch=develop)](https://travis-ci.org/enigmampc/enigma-p2p) | [![codecov](https://codecov.io/gh/enigmampc/enigma-p2p/branch/develop/graph/badge.svg?token=SSyRKy7Ckg)](https://codecov.io/gh/enigmampc/enigma-p2p) | [WIP] The Enigma Worker P2P package written in Node.js based on libp2p-js [WIP] diff --git a/docs/IPC_MESSAGES.md b/docs/IPC_MESSAGES.md index 5041b30d..e93fef96 100644 --- a/docs/IPC_MESSAGES.md +++ b/docs/IPC_MESSAGES.md @@ -212,6 +212,26 @@ Response: } } ``` +### `RemoveContract` message +Request: +``` +{ + id : , + type : RemoveContract, + address : ..., +} +``` +Response: +``` +{ + id : , + type : RemoveContract, + address : ..., + result : { + status : 0 or err code + } +} +``` ### `UpdateDeltas` message Request: ``` @@ -228,11 +248,30 @@ Response: type : UpdateDeltas, result : { status: 0 or err code, - errors: [{address,key,status : }, ...] + errors: [{address, key, status : }, ...] + } +} +``` +### `RemoveDeltas` message +Request: +``` +{ + id : , + type : RemoveDeltas, + input : [{address, from:key, to:key}, ...] +} +``` +Response: +``` +{ + id : , + type : RemoveDeltas, + result : { + status: 0 or err code, + errors: [{address, key, status : }, ...] } } ``` - ## Master Node Key-Exchange related ### `GetPTTRequest` message diff --git a/docs/TASKS_LIFE_CYCLE_DOCS.md b/docs/TASKS_LIFE_CYCLE_DOCS.md index 4410850e..f44a1874 100644 --- a/docs/TASKS_LIFE_CYCLE_DOCS.md +++ b/docs/TASKS_LIFE_CYCLE_DOCS.md @@ -32,6 +32,10 @@ Every task is identified by its unique global id both in the system and in the n Failed

Indicates that the task execution failed. Always includes an error message.

+
+ Ethereum-Failure +

Indicates that the task failed due to a failure in the Ethereum callback.

+
# Task Result Propagation in the network All the task results are either `Failed` or `Success`, and the result is published to a topic called `/task_status/0.1`. @@ -39,4 +43,4 @@ This is how the nodes including the **Gateway** node of the user will be informe # Communication with the selected worker. Both for requests and status checks the communication is done via the `JsonRpc` component. -The worker can respond to a status check at any time. \ No newline at end of file +The worker can respond to a status check at any time. diff --git a/package-lock.json b/package-lock.json index 17a6bfed..debf0382 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "enigma-p2p", - "version": "0.2.3", + "version": "0.2.4", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1895,10 +1895,13 @@ } }, "eslint-utils": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", - "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", - "dev": true + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz", + "integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.0.0" + } }, "eslint-visitor-keys": { "version": "1.0.0", diff --git a/package.json b/package.json index 33df9bf9..1ade811d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "enigma-p2p", - "version": "0.2.4", + "version": "0.2.5", "description": "Enigma P2P library based on libp2p-js ", "main": "src/index.js", "bin": { @@ -18,6 +18,10 @@ }, "author": "isan rivkin", "license": "AGPL-3.0-or-later", + "repository": { + "type": "git", + "url": "https://github.com/enigmampc/enigma-p2p.git" + }, "dependencies": { "@nodeutils/defaults-deep": "^1.1.0", "async": "^2.6.1", diff --git a/src/cli/cli_app.js b/src/cli/cli_app.js index 84e6c93e..84f56ead 100755 --- a/src/cli/cli_app.js +++ b/src/cli/cli_app.js @@ -26,6 +26,7 @@ class CLI { // Ethereum stuff this._initEthereum = false; this._enigmaContractAddress = null; + this._enigmaContractAbiPath = null; this._ethereumWebsocketProvider = null; this._ethereumAddress = null; this._autoInit = false; @@ -345,6 +346,10 @@ class CLI { this._initEthereum = true; this._enigmaContractAddress = address; }) + .option('--ethereum-contract-abi-path [value]', 'specify the Enigma contract ABI path', (path)=>{ + this._initEthereum = true; + this._enigmaContractAbiPath = path; + }) .option('-E, --init-ethereum', 'init Ethereum', ()=>{ this._initEthereum = true; }) @@ -394,7 +399,8 @@ class CLI { builder.setEthereumConfig({ ethereumUrlProvider: this._ethereumWebsocketProvider, enigmaContractAddress: this._enigmaContractAddress, - ethereumAddress: this._ethereumAddress + ethereumAddress: this._ethereumAddress, + ethereumContractAbiPath: this._enigmaContractAbiPath }); } const nodeConfig = this._getFinalConfig(); diff --git a/src/client_api/README.md b/src/client_api/README.md index c3eb379c..6acee8e1 100644 --- a/src/client_api/README.md +++ b/src/client_api/README.md @@ -124,6 +124,7 @@ if set to `true` will return the `output` of the task if and only if the task st - `INPROGRESS`: TaskId exists and it has been verified, in-progress - `SUCCESS`: Success - `FAILED`: Failure +- `ETHEREUMFAILURE`: Task failed due to an Ethereum callback failure `output` - byte array representing the output of the computation @@ -163,6 +164,7 @@ Queries the node for the potential result of a given Task identified by its `tas - `INPROGRESS`: TaskId exists and it has been verified, in-progress - `SUCCESS`: Success - `FAILED`: Failure +- `ETHEREUMFAILURE`: Task failed due to an Ethereum callback failure `output` - byte array representing the output of the computation. @@ -192,9 +194,12 @@ curl -H "Content-Type: application/json" -d '{"jsonrpc": "2.0","id":1,"method":" "taskId":"0x0033105ed3302282dddd38fcc8330a6448f6ae16bbcb26209d8740e8b3d28538", "status":"SUCCESS", "preCodeHash":"hash-of-the-precode-bytecode", - "output":[22,22,22,22,22,33,44,44,44,44,44,44,44,55,66,77,88,99],"delta":{"key":0,"data":[11,2,3,5,41,44]},"usedGas":"amount-of-gas-used", + "output":[22,22,22,22,22,33,44,44,44,44,44,44,44,55,66,77,88,99], + "delta":{"key":0,"data":[11,2,3,5,41,44]}, + "usedGas":"amount-of-gas-used", "ethereumPayload":"hex of payload", - "ethereumAddress":"address of the payload","signature":"enclave-signature" + "ethereumAddress":"address of the payload", + "signature":"enclave-signature" } } } diff --git a/src/common/constants.js b/src/common/constants.js index bc9913c5..9bd2947b 100644 --- a/src/common/constants.js +++ b/src/common/constants.js @@ -48,8 +48,9 @@ module.exports.NODE_NOTIFICATIONS = { // task computation related 'GET_TASK_RESULT': 'gltresult', // get local task result given a task id 'VERIFY_NEW_TASK': 'verifyreq', // request to perform verification of task - 'TASK_VERIFIED': 'tverified', // request to perform a deploySecretContract or computeTask tasks. + 'TASK_VERIFIED': 'tverified', // request to perform a deploySecretContract or computeTask task 'TASK_FINISHED': 'tfinished', // notify the task is finished, update network with result + 'EXEC_TASK' : 'etask', // execute the task 'DEPLOY_SECRET_CONTRACT': 'dscontract', // deploySecretContract jsonrpc 'RECEIVED_NEW_RESULT': 'rnresult', // result updates receoved from the task results topic 'GET_TASK_STATUS': 'gtstatus', // get task status @@ -167,7 +168,9 @@ module.exports.CORE_REQUESTS = { GetContract: 'GetContract', UpdateNewContract: 'UpdateNewContract', UpdateNewContractOnDeployment: 'UpdateNewContractOnDeployment', + RemoveContract: 'RemoveContract', UpdateDeltas: 'UpdateDeltas', + RemoveDeltas: 'RemoveDeltas', UpdateDb: 'UpdateDb', NewTaskEncryptionKey: 'NewTaskEncryptionKey', // jsonrpc request from remote user for encryption key DeploySecretContract: 'DeploySecretContract', // jsonrpc request from remote use for deploying @@ -200,19 +203,38 @@ module.exports.TASK_STATUS = { IN_PROGRESS: 'INPROGRESS', SUCCESS: 'SUCCESS', FAILED: 'FAILED', + FAILED_ETHEREUM_CB: 'ETHEREUMFAILURE', }; /** - * Ethereum events, defined by the different services exposed by the EthereumServices + * Ethereum Enigma contract events, defined by the different services exposed by the EthereumServices * */ module.exports.ETHEREUM_EVENTS = { NewEpoch: 'NewEpoch', TaskCreation: 'TaskCreation', TaskSuccessSubmission: 'TaskSuccessSubmission', TaskFailureSubmission: 'TaskFailureSubmission', + TaskFailureDueToEthereumCB: 'TaskFailureDueToEthereumCB', + TaskCancelled: 'TaskCancelled', SecretContractDeployment: 'SecretContractDeployment', }; +/** + * The raw Ethereum Enigma contract events + * */ +module.exports.RAW_ETHEREUM_EVENTS = { + WorkersParameterized: 'WorkersParameterized', + TaskRecordCreated: 'TaskRecordCreated', + ReceiptVerified: 'ReceiptVerified', + ReceiptFailed: 'ReceiptFailed', + ReceiptFailedETH: 'ReceiptFailedETH', + TaskFeeReturned: 'TaskFeeReturned', + SecretContractDeployed: 'SecretContractDeployed', + Registered: 'Registered', + DepositSuccessful: 'DepositSuccessful', + WithdrawSuccessful: 'WithdrawSuccessful', +}; + /** * Enigma Contract task status * */ @@ -221,6 +243,8 @@ module.exports.ETHEREUM_TASK_STATUS = { RECORD_CREATED: 1, RECEIPT_VERIFIED: 2, RECEIPT_FAILED: 3, + RECEIPT_FAILED_ETH: 4, + RECEIPT_FAILED_CANCELLED: 5, }; /** @@ -256,3 +280,5 @@ module.exports.PRINCIPAL_NODE = { }, EPOCH_STATE_TRANSITION_ERROR_CODE: -32002 }; + +module.exports.PTT_END_EVENT = "PTT"; diff --git a/src/common/errors.js b/src/common/errors.js index 166d90a3..350f0ef3 100644 --- a/src/common/errors.js +++ b/src/common/errors.js @@ -104,6 +104,30 @@ class WorkerSelectionVerificationErr extends Error{ } } +class TaskTimeoutErr extends Error{ + constructor(message){ + super(message); + Error.captureStackTrace(this,this.constructor); + this.name = this.constructor.name; + } +} + +class TaskCancelledErr extends Error{ + constructor(message){ + super(message); + Error.captureStackTrace(this,this.constructor); + this.name = this.constructor.name; + } +} + +class TaskEthereumFailureErr extends Error{ + constructor(message){ + super(message); + Error.captureStackTrace(this,this.constructor); + this.name = this.constructor.name; + } +} + class EnigmaContractDataError extends Error{ constructor(message){ super(message); @@ -126,3 +150,6 @@ module.exports.EnigmaContractDataError = EnigmaContractDataError; module.exports.MissingFieldsErr = MissingFieldsErr; module.exports.SyncReceiverNoMissingDataErr = SyncReceiverNoMissingDataErr; module.exports.InputErr = InputErr; +module.exports.TaskTimeoutErr = TaskTimeoutErr; +module.exports.TaskCancelledErr = TaskCancelledErr; +module.exports.TaskEthereumFailureErr = TaskEthereumFailureErr; diff --git a/src/core/core_messages_scheme.json b/src/core/core_messages_scheme.json index ac6e88d1..3e30b3d0 100644 --- a/src/core/core_messages_scheme.json +++ b/src/core/core_messages_scheme.json @@ -111,6 +111,13 @@ "required": ["address", "bytecode", "delta"], "additionalProperties": false }, + "RemoveContract": { + "properties": { + "address": {"type": "string"} + }, + "required": ["address"], + "additionalProperties": false + }, "UpdateDeltas": { "properties": { "deltas":{ @@ -136,6 +143,25 @@ "required": ["deltas"], "additionalProperties": false }, + "RemoveDeltas": { + "properties": { + "input": { + "type": "array", + "items": { + "type": "object", + "properties": { + "address": {"type": "string"}, + "from": {"type": "number"}, + "to": {"type": "number"} + }, + "required": ["address", "from", "to"], + "additionalProperties": false + } + } + }, + "required": ["input"], + "additionalProperties": false + }, "NewTaskEncryptionKey": { "properties": { "userPubKey": {"type": "string"} diff --git a/src/core/core_server_mock/core_server.js b/src/core/core_server_mock/core_server.js index 70f595f5..067993d5 100644 --- a/src/core/core_server_mock/core_server.js +++ b/src/core/core_server_mock/core_server.js @@ -57,6 +57,11 @@ class MockCoreServer { return '88987af7d35eabcad95915b93bfd3d2bc3308f06b7197478b0dfca268f0497dc'; } + static get GET_COMPUTE_OUTPUT_MOCK() { + return '5678867878978978789789787878979845656666666abygjkljkljkj'; + } + + static _getPTTRequest(msg) { if (MockCoreServer._validate(msg, SCHEMES.GetPTTRequest)) { return { @@ -112,7 +117,7 @@ class MockCoreServer { id: msg.id, type: msg.type, result: { - output: 'the-output-of-the-execution', + output: MockCoreServer.GET_COMPUTE_OUTPUT_MOCK, delta: {key: 0, data: [11, 2, 3, 5, 41, 44]}, usedGas: 'amount-of-gas-used', ethereumPayload: 'hex of payload', @@ -272,6 +277,9 @@ class MockCoreServer { if (this._tmpDB instanceof Object) { this._writeTmpDB(msg); } + case MsgTypes.RemoveContract: + case MsgTypes.RemoveDeltas: + // TODO: add remove from TmpDB, once required for UT MockCoreServer._send(this._socket, { type: msg.type, id: msg.id, diff --git a/src/ethereum/EnigmaContractAPIBuilder.js b/src/ethereum/EnigmaContractAPIBuilder.js index 809f599f..5adf1093 100644 --- a/src/ethereum/EnigmaContractAPIBuilder.js +++ b/src/ethereum/EnigmaContractAPIBuilder.js @@ -164,6 +164,10 @@ class EnigmaContractAPIBuilder { if (options.ethereumUrlProvider) { config.url = options.ethereumUrlProvider; } + if (options.ethereumContractAbiPath) { + const rawdata = fs.readFileSync(options.ethereumContractAbiPath); + config.enigmaContractABI = JSON.parse(rawdata).abi; + } res = await this.useDeployed(config).setEthereumAddress(ethereumAddress).build(); } else { res = await this.createNetwork().deploy().setEthereumAddress(ethereumAddress).build(); diff --git a/src/ethereum/EnigmaContractReaderAPI.js b/src/ethereum/EnigmaContractReaderAPI.js index 0e2568ef..4c8e9c15 100644 --- a/src/ethereum/EnigmaContractReaderAPI.js +++ b/src/ethereum/EnigmaContractReaderAPI.js @@ -105,16 +105,34 @@ class EnigmaContractReaderAPI { reject(error); } if (data) { - if (Array.isArray(data)) { - let newScAddressesArray = []; - data.forEach((scAddress) => { - newScAddressesArray.push(nodeUtils.remove0x(scAddress)); - }); - resolve(newScAddressesArray); - } - else { - resolve(nodeUtils.remove0x(data)); - } + let newScAddressesArray = []; + data.forEach((scAddress) => { + newScAddressesArray.push(nodeUtils.remove0x(scAddress)); + }); + resolve(newScAddressesArray); + } + else { + resolve(data); + } + }); + }); + } + /** + * return the list of all secret contract addresses + * @return {Promise} Array + * */ + getAllSecretContractAddresses() { + return new Promise((resolve, reject) => { + this._enigmaContract.methods.getAllSecretContractAddresses().call(this._defaultTrxOptions, (error, data)=> { + if (error) { + reject(error); + } + if (data) { + let newScAddressesArray = []; + data.forEach((scAddress) => { + newScAddressesArray.push(nodeUtils.remove0x(scAddress)); + }); + resolve(newScAddressesArray); } else { resolve(data); @@ -299,7 +317,15 @@ class EnigmaContractReaderAPI { }); } /** - * Listen to events emmited by the Enigma.sol contract and trigger a callback + * * Get Task Timeout + * @return {Promise} returning {Integer} : epochSize + * */ + getTaskTimeout() { + // TODO!!! Once the contract is updated + return 50; + } + /** + * Listen to events emitted by the Enigma.sol contract and trigger a callback * @param {string} eventName * @param {Json} filter, in case a filter is required on top of the event itself. * For example, filter all events in which myNumber is 12 or 13: {myNumber: [12,13]} @@ -347,16 +373,6 @@ class EnigmaContractReaderAPI { signer: event.returnValues.signer, }; }, - /** - * @return {JSON}: {string} signature , {string} hash, {string} workerAddress - * */ - 'ValidatedSig': (event) => { - return { - signature: event.returnValues.sig, - hash: event.returnValues.hash, - workerAddress: event.returnValues.workerAddr, - }; - }, /** * @return {JSON}: {Integer} seed , {Integer} blockNumber, {Integer} inclusionBlockNumber, {Array} workers, * {Array} balances, {Integer} nonce @@ -384,23 +400,6 @@ class EnigmaContractReaderAPI { blockNumber: parseInt(event.returnValues.blockNumber) }; }, - /** - * @return {JSON}: {string} senderAddress, {} - * {JSON} tasks, indexed by the taskId, each element has: {string} taskId , {Integer} gasLimit, {Integer} gasPrice, {string} inputsHash - * */ - 'TaskRecordsCreated': (event) => { - let res = {tasks: {}, senderAddress: event.returnValues.sender, blockNumber: parseInt(event.returnValues.blockNumber)}; - for (let i = 0; i < event.returnValues.taskIds.length, i++;) { - const taskId = event.returnValues.taskIds[i]; - res.tasks[taskId] = { - taskId: taskId, - inputsHash: event.returnValues.inputsHashes[i], - gasLimit: parseInt(event.returnValues.gasLimits[i]), - gasPrice: parseInt(event.returnValues.gasPrices[i]), - } - } - return res; - }, /** * @return {JSON}: {string} taskId , {string} stateDeltaHash, {string} outputHash, {integer} stateDeltaHashIndex * {string} optionalEthereumData, {string} optionalEthereumContractAddress, {string} signature @@ -417,23 +416,18 @@ class EnigmaContractReaderAPI { }; }, /** - * @return {JSON}: {Array} taskIds , {Array} stateDeltaHashes, {Array} outputHashes, - * {string} optionalEthereumData, {string} optionalEthereumContractAddress, {string} signature + * @return {JSON}: {string>} taskId , {string} ethCall, {string} signature * */ - 'ReceiptsVerified': (event) => { + 'ReceiptFailed': (event) => { return { - taskIds: event.returnValues.taskIds, - stateDeltaHashes: event.returnValues.stateDeltaHashes, - outputHashes: event.returnValues.outputHashes, - optionalEthereumData: event.returnValues.optionalEthereumData, - optionalEthereumContractAddress: event.returnValues.optionalEthereumContractAddress, + taskId: nodeUtils.remove0x(event.returnValues.taskId), signature: event.returnValues.sig, }; }, /** * @return {JSON}: {string>} taskId , {string} ethCall, {string} signature * */ - 'ReceiptFailed': (event) => { + 'ReceiptFailedETH': (event) => { return { taskId: nodeUtils.remove0x(event.returnValues.taskId), signature: event.returnValues.sig, diff --git a/src/ethereum/EnigmaContractWriterAPI.js b/src/ethereum/EnigmaContractWriterAPI.js index a7f0e45f..d1a77677 100644 --- a/src/ethereum/EnigmaContractWriterAPI.js +++ b/src/ethereum/EnigmaContractWriterAPI.js @@ -6,6 +6,10 @@ const EnigmaContractReaderAPI = require('./EnigmaContractReaderAPI'); const EMPTY_HEX_STRING = '0x'; // This is the right value to pass an empty value to the contract, otherwise we get an error +const ETHEREUM_CONFIRMATION_EVENT = 'confirmation'; +const ETHEREUM_RECEIPT_EVENT = 'receipt'; +const ETHEREUM_ERROR_EVENT = 'error'; + class EnigmaContractWriterAPI extends EnigmaContractReaderAPI { constructor(enigmaContractAddress, enigmaContractABI, web3, logger, workerAddress) { super(enigmaContractAddress, enigmaContractABI, web3, logger, workerAddress); @@ -17,7 +21,7 @@ class EnigmaContractWriterAPI extends EnigmaContractReaderAPI { * @param {string} report , worker * @param {string} signature * @param {JSON} txParams - * @return {Promise} receipt + * @return {Promise} in success: Enigma contract emitted events, in failure: error * */ register(signerAddress, report, signature, txParams=null) { return new Promise((resolve, reject) => { @@ -34,12 +38,19 @@ class EnigmaContractWriterAPI extends EnigmaContractReaderAPI { utils.add0x(signerAddress), utils.add0x(report), utils.add0x(signature)) - .send(transactionOptions, (error, receipt)=> { - if (error) { - reject(error); - } - resolve(receipt); - }); + .send(transactionOptions) + // .on('confirmation', (confirmationNumber, receipt) => { + // console.log("at register confirmation. number=", confirmationNumber); + // resolve(receipt); + // }) + .on(ETHEREUM_ERROR_EVENT, (error, receipt) => { + reject(error); + }) + .on(ETHEREUM_RECEIPT_EVENT, (receipt) => { + //console.log("reciept=", JSON.stringify(receipt)); + let events = this._parseEvents(receipt); + resolve(events); + }) }); } /** @@ -47,6 +58,7 @@ class EnigmaContractWriterAPI extends EnigmaContractReaderAPI { * @param {string} custodian - the worker address * @param {Integer} amount * @param {JSON} txParams + * @return {Promise} in success: Enigma contract emitted events, in failure: error * */ deposit(custodian, amount, txParams=null) { return new Promise((resolve, reject) => { @@ -59,18 +71,25 @@ class EnigmaContractWriterAPI extends EnigmaContractReaderAPI { } transactionOptions = defaultsDeep(txParams, this._defaultTrxOptions); } - this._enigmaContract.methods.deposit(custodian, amount).send(transactionOptions, (error, receipt)=> { - if (error) { + this._enigmaContract.methods.deposit(custodian, amount).send(transactionOptions) + // .on(ETHEREUM_CONFIRMATION_EVENT, (confirmationNumber, receipt) => { + // console.log("at deposit confirmation. number=", confirmationNumber); + // resolve(receipt); + // }) + .on(ETHEREUM_ERROR_EVENT, (error, receipt) => { reject(error); - } - resolve(receipt); - }); + }) + .on(ETHEREUM_RECEIPT_EVENT, (receipt) => { + let events = this._parseEvents(receipt); + resolve(events); + }) }); } /** * Step 2 in registration : stake ENG's of the current worker(TO DA MOON) * @param {Integer} amount * @param {JSON} txParams + * @return {Promise} in success: Enigma contract emitted events, in failure: error * */ selfDeposit(amount, txParams=null) { return new Promise((resolve, reject) => { @@ -87,18 +106,21 @@ class EnigmaContractWriterAPI extends EnigmaContractReaderAPI { if (!workerAddress) { reject(new errors.InputErr("Missing worker-address when calling selfDeposit")); } - this._enigmaContract.methods.deposit(workerAddress, amount).send(transactionOptions, (error, receipt)=> { - if (error) { + this._enigmaContract.methods.deposit(workerAddress, amount).send(transactionOptions) + .on(ETHEREUM_ERROR_EVENT, (error, receipt) => { reject(error); - } - resolve(receipt); - }); + }) + .on(ETHEREUM_RECEIPT_EVENT, (receipt) => { + let events = this._parseEvents(receipt); + resolve(events); + }) }); } /** * Withdraw worker's stake (full or partial) * @param {Integer} amount * @param {JSON} txParams + * @return {Promise} in success: Enigma contract emitted events, in failure: error * */ withdraw(amount, txParams) { return new Promise((resolve, reject) => { @@ -111,13 +133,14 @@ class EnigmaContractWriterAPI extends EnigmaContractReaderAPI { } transactionOptions = defaultsDeep(txParams, this._defaultTrxOptions); } - this._enigmaContract.methods.withdraw(amount).send(transactionOptions, (error, receipt)=> { - if (error) { - console.log(error); + this._enigmaContract.methods.withdraw(amount).send(transactionOptions) + .on(ETHEREUM_ERROR_EVENT, (error, receipt) => { reject(error); - } - resolve(receipt); - }); + }) + .on(ETHEREUM_RECEIPT_EVENT, (receipt) => { + let events = this._parseEvents(receipt); + resolve(events); + }) }); } /** @@ -131,7 +154,7 @@ class EnigmaContractWriterAPI extends EnigmaContractReaderAPI { * @param {Integer} gasUsed * @param {string} signature //TODO:: since it expects bytes maybe here it will be bytes as well (Json-san) * @param {JSON} txParams - * @return {Promise} receipt //TODO:: we want to turn all the Json's into real classes. + * @return @return {Promise} in success: Enigma contract emitted events, in failure: error //TODO:: we want to turn all the Json's into real classes. * */ deploySecretContract(taskId, preCodeHash, codeHash, initStateDeltaHash, optionalEthereumData, optionalEthereumContractAddress, gasUsed, signature, txParams=null) { return new Promise((resolve, reject) => { @@ -158,17 +181,19 @@ class EnigmaContractWriterAPI extends EnigmaContractReaderAPI { utils.add0x(optionalEthereumContractAddress), gasUsed, utils.add0x(signature)) - .send(transactionOptions, (error, receipt)=> { - if (error) { + .send(transactionOptions) + .on(ETHEREUM_ERROR_EVENT, (error, receipt) => { reject(error); - } - resolve(receipt); - }); + }) + .on(ETHEREUM_RECEIPT_EVENT, (receipt) => { + let events = this._parseEvents(receipt); + resolve(events); + }) }); } /** * login a worker - * @return {Promise} receipt + * @return {Promise} in success: Enigma contract emitted events, in failure: error * */ login(txParams=null) { return new Promise((resolve, reject) => { @@ -181,17 +206,23 @@ class EnigmaContractWriterAPI extends EnigmaContractReaderAPI { } transactionOptions = defaultsDeep(txParams, this._defaultTrxOptions); } - this._enigmaContract.methods.login().send(transactionOptions, (error, receipt)=> { - if (error) { + this._enigmaContract.methods.login().send(transactionOptions) + // .on('confirmation', (confirmationNumber, receipt) => { + // console.log("at login confirmation. number=", confirmationNumber); + // resolve(receipt); + // }) + .on(ETHEREUM_ERROR_EVENT, (error, receipt) => { reject(error); - } - resolve(receipt); - }); + }) + .on(ETHEREUM_RECEIPT_EVENT, (receipt) => { + let events = this._parseEvents(receipt); + resolve(events); + }); }); } /** * login a worker - * @return {Promise} receipt + * @return {Promise} in success: Enigma contract emitted events, in failure: error * */ logout(txParams=null) { return new Promise((resolve, reject) => { @@ -204,12 +235,14 @@ class EnigmaContractWriterAPI extends EnigmaContractReaderAPI { } transactionOptions = defaultsDeep(txParams, this._defaultTrxOptions); } - this._enigmaContract.methods.logout().send(transactionOptions, (error, receipt)=> { - if (error) { + this._enigmaContract.methods.logout().send(transactionOptions) + .on(ETHEREUM_ERROR_EVENT, (error, receipt) => { reject(error); - } - resolve(receipt); - }); + }) + .on(ETHEREUM_RECEIPT_EVENT, (receipt) => { + let events = this._parseEvents(receipt); + resolve(events); + }) }); } /** @@ -235,52 +268,6 @@ class EnigmaContractWriterAPI extends EnigmaContractReaderAPI { }); }); } - // /** - // * Irrelevant for workers -> users create tasks with it - // * */ - // createTaskRecord(taskId, fee, txParams) { - // return new Promise((resolve, reject) => { - // const defaultOptions = config.default; - // let transactionOptions = defaultOptions; - // if (txParams !== undefined && txParams !== null) { - // const error = this._validateTxParams(txParams); - // if (error !== null) { - // reject(error); - // return; - // } - // transactionOptions = defaultsDeep(txParams, defaultOptions); - // } - // this._enigmaContract.methods.createTaskRecord(taskId, fee).send(transactionOptions, (error, receipt)=> { - // if (error) { - // reject(error); - // } - // resolve(receipt); - // }); - // }); - // } - // /** - // * Same as above - // * */ - // createTaskRecords(taskIds, fees, txParams) { - // return new Promise((resolve, reject) => { - // const defaultOptions = config.default; - // let transactionOptions = defaultOptions; - // if (txParams !== undefined && txParams !== null) { - // const error = this._validateTxParams(txParams); - // if (error !== null) { - // reject(error); - // return; - // } - // transactionOptions = defaultsDeep(txParams, defaultOptions); - // } - // this._enigmaContract.methods.createTaskRecords(taskIds, fees).send(transactionOptions, (error, receipt)=> { - // if (error) { - // reject(error); - // } - // resolve(receipt); - // }); - // }); - // } /** * Worker commits the results on-chain * @param {string} secretContractAddress @@ -292,7 +279,7 @@ class EnigmaContractWriterAPI extends EnigmaContractReaderAPI { * @param {Integer} gasUsed * @param {string} signature * @param {JSON} txParams - * @return {Promise} receipt + * @return {Promise} in success: Enigma contract emitted events, in failure: error * */ commitReceipt(secretContractAddress, taskId, stateDeltaHash, outputHash, optionalEthereumData, optionalEthereumContractAddress, gasUsed, signature, txParams=null) { return new Promise((resolve, reject) => { @@ -319,48 +306,27 @@ class EnigmaContractWriterAPI extends EnigmaContractReaderAPI { utils.add0x(optionalEthereumData), utils.add0x(optionalEthereumContractAddress), gasUsed, - utils.add0x(signature)) - .send(transactionOptions, (error, receipt)=> { - if (error) { + utils.add0x(signature)).send(transactionOptions) + .on(ETHEREUM_ERROR_EVENT, (error, receipt) => { reject(error); - } - resolve(receipt); - }); + }) + .on(ETHEREUM_RECEIPT_EVENT, (receipt) => { + let events = this._parseEvents(receipt); + resolve(events); + }) }); } - /** same as above but for a batch */ - // commitReceipts(secretContractAddresses, taskIds, stateDeltaHashes, outputHashes, optionalEthereumData, - // optionalEthereumContractAddress, gasUsed, signature, txParams=null) { - // return new Promise((resolve, reject) => { - // let transactionOptions = this._defaultTrxOptions; - // if (txParams !== undefined && txParams !== null) { - // const error = this._validateTxParams(txParams); - // if (error !== null) { - // reject(error); - // return; - // } - // transactionOptions = defaultsDeep(txParams, this._defaultTrxOptions); - // } - // this._enigmaContract.methods.commitReceipts(secretContractAddresses, taskIds, stateDeltaHashes, outputHashes, optionalEthereumData, - // optionalEthereumContractAddress, gasUsed, signature) - // .send(transactionOptions, (error, receipt)=> { - // if (error) { - // reject(error); - // } - // resolve(receipt); - // }); - // }); - // } /** * Worker commits the failed task result on-chain * @param {string} secretContractAddress * @param {string} taskId + * @param {string} outputHash * @param {Integer} gasUsed * @param {string} signature * @param {JSON} txParams - * @return {Promise} receipt + * @return {Promise} in success: Enigma contract emitted events, in failure: error * */ - commitTaskFailure(secretContractAddress, taskId, gasUsed, signature, txParams=null) { + commitTaskFailure(secretContractAddress, taskId, outputHash, gasUsed, signature, txParams=null) { return new Promise((resolve, reject) => { let transactionOptions = this._defaultTrxOptions; if (txParams !== undefined && txParams !== null) { @@ -374,25 +340,29 @@ class EnigmaContractWriterAPI extends EnigmaContractReaderAPI { this._enigmaContract.methods.commitTaskFailure( utils.add0x(secretContractAddress), utils.add0x(taskId), + utils.add0x(outputHash), gasUsed, utils.add0x(signature)) - .send(transactionOptions, (error, receipt)=> { - if (error) { - reject(error); - } - resolve(receipt); - }); + .send(transactionOptions) + .on(ETHEREUM_ERROR_EVENT, (error, receipt) => { + reject(error); + }) + .on(ETHEREUM_RECEIPT_EVENT, (receipt) => { + let events = this._parseEvents(receipt); + resolve(events); + }) }); } /** * Worker commits the failed deploy task result on-chain * @param {string} taskId == secretContractAddress + * @param {string} outputHash * @param {Integer} gasUsed * @param {string} signature * @param {JSON} txParams - * @return {Promise} receipt + * @return {Promise} in success: Enigma contract emitted events, in failure: error * */ - deploySecretContractFailure(taskId, gasUsed, signature, txParams=null) { + deploySecretContractFailure(taskId, outputHash, gasUsed, signature, txParams=null) { return new Promise((resolve, reject) => { let transactionOptions = this._defaultTrxOptions; if (txParams !== undefined && txParams !== null) { @@ -405,37 +375,26 @@ class EnigmaContractWriterAPI extends EnigmaContractReaderAPI { } this._enigmaContract.methods.deploySecretContractFailure( utils.add0x(taskId), + utils.add0x(outputHash), gasUsed, utils.add0x(signature)) - .send(transactionOptions, (error, receipt)=> { - if (error) { - reject(error); - } - resolve(receipt); - }); - }); - } - /** used by the principal node to commit a random number === new epoch */ - setWorkersParams(seed, signature, txParams=null) { - return new Promise((resolve, reject) => { - let transactionOptions = this._defaultTrxOptions; - if (txParams !== undefined && txParams !== null) { - const error = this._validateTxParams(txParams); - if (error !== null) { + .send(transactionOptions) + .on(ETHEREUM_ERROR_EVENT, (error, receipt) => { reject(error); - return; - } - transactionOptions = defaultsDeep(txParams, this._defaultTrxOptions); - } - this._enigmaContract.methods.setWorkersParams(seed, signature) - .send(transactionOptions, (error, receipt)=> { - if (error) { - reject(error); - } - resolve(receipt); - }); + }) + .on(ETHEREUM_RECEIPT_EVENT, (receipt) => { + let events = this._parseEvents(receipt); + resolve(events); + }) }); } + _parseEvents(txReceipt) { + let parsedEvents = {}; + for (let eventName of Object.keys(txReceipt.events)) { + parsedEvents[eventName] = this._eventParsers[eventName](txReceipt.events[eventName]); + } + return parsedEvents; + } _validateTxParams(txParams) { if ('gas' in txParams) { if (txParams.gas < this._validTrxParams.gasMin || txParams.gas > this._validTrxParams.gasMax) { diff --git a/src/ethereum/EthereumAPI.js b/src/ethereum/EthereumAPI.js index 792cd7db..31e6e06a 100644 --- a/src/ethereum/EthereumAPI.js +++ b/src/ethereum/EthereumAPI.js @@ -32,7 +32,7 @@ class EthereumAPI { this._enigmaContractAddress = res.enigmaContractAddress; this._services = new EthereumServices(this._api); - this._services.initServices(); + this._services.initServices(null); this._verifier = new EthereumVerifier(this._api, this._services, this._logger); await this._verifier.init(); @@ -42,36 +42,6 @@ class EthereumAPI { await this._environment.destroy(); } - /** - * check the connectivity to the Ethereum node - * @return {JSON} - * {isConnected - a flag describing the connectivity state, - * blockNumber - Ethereum block number - * url - the network url - * enigmaContractAddress - the contract address - * } - * */ - async healthCheck() { - let connected = null; - let blockNumber = null; - - try { - blockNumber = await this._api.getEthereumBlockNumber(); - connected = true; - } - catch (e) { - this._logger.debug('Error received while trying to read Ethereum block number: ' + e); - connected = false; - } - - return { - isConnected: connected, - blockNumber: blockNumber, - url: this._url, - enigmaContractAddress: this._enigmaContractAddress - }; - } - api() { return this._api; } diff --git a/src/ethereum/EthereumServices.js b/src/ethereum/EthereumServices.js index b536ccca..e708aae4 100644 --- a/src/ethereum/EthereumServices.js +++ b/src/ethereum/EthereumServices.js @@ -1,15 +1,16 @@ const EventEmitter = require('events'); const constants = require('../common/constants'); -const EVENTS = constants.ETHEREUM_EVENTS; let servicesMap = {}; -servicesMap[EVENTS.NewEpoch] = ['WorkersParameterized']; -servicesMap[EVENTS.TaskCreation] = ['TaskRecordCreated', 'TaskRecordsCreated']; -servicesMap[EVENTS.TaskSuccessSubmission] = ['ReceiptVerified', 'ReceiptsVerified']; -servicesMap[EVENTS.TaskFailureSubmission] = ['ReceiptFailed']; -servicesMap[EVENTS.SecretContractDeployment] = ['SecretContractDeployed']; +servicesMap[constants.ETHEREUM_EVENTS.NewEpoch] = [constants.RAW_ETHEREUM_EVENTS.WorkersParameterized]; +servicesMap[constants.ETHEREUM_EVENTS.TaskCreation] = [constants.RAW_ETHEREUM_EVENTS.TaskRecordCreated]; +servicesMap[constants.ETHEREUM_EVENTS.TaskSuccessSubmission] = [constants.RAW_ETHEREUM_EVENTS.ReceiptVerified]; +servicesMap[constants.ETHEREUM_EVENTS.TaskFailureSubmission] = [constants.RAW_ETHEREUM_EVENTS.ReceiptFailed]; +servicesMap[constants.ETHEREUM_EVENTS.TaskFailureDueToEthereumCB] = [constants.RAW_ETHEREUM_EVENTS.ReceiptFailedETH]; +servicesMap[constants.ETHEREUM_EVENTS.TaskCancelled] = [constants.RAW_ETHEREUM_EVENTS.TaskFeeReturned]; +servicesMap[constants.ETHEREUM_EVENTS.SecretContractDeployment] = [constants.RAW_ETHEREUM_EVENTS.SecretContractDeployed]; class EthereumServices extends EventEmitter { diff --git a/src/ethereum/EthereumVerifier.js b/src/ethereum/EthereumVerifier.js index 09f5ffdc..2ed5e09f 100644 --- a/src/ethereum/EthereumVerifier.js +++ b/src/ethereum/EthereumVerifier.js @@ -27,8 +27,9 @@ class EthereumVerifier { this._ethereumServices = ethereumServices; this._workerParamArray = []; this._workerParamArrayMaxSize = 5; - this._unverifiedCreateTasks = {}; - this._unverifiedSubmitTasks = {}; + this._unverifiedCreateTasks = {}; // Maps a taskId to an object containing a callback and a block number (for t.o handling) + this._unverifiedSubmitTasks = {}; // Maps a taskId to an object containing a callback and a block number (for t.o handling) + this._taskTimeoutInBlocks = 0; } /** @@ -37,22 +38,26 @@ class EthereumVerifier { async init() { this._ethereumServices.on(constants.ETHEREUM_EVENTS.NewEpoch, this._newEpochEventCallback.bind(this)); await this._updateWorkerParamNow(); + this._taskTimeoutInBlocks = await this._contractApi.getTaskTimeout(); this._ethereumServices.on(constants.ETHEREUM_EVENTS.TaskCreation, this._taskCreationEventCallback.bind(this)); + this._ethereumServices.on(constants.ETHEREUM_EVENTS.TaskCancelled, this._taskCreationEventCallback.bind(this)); this._ethereumServices.on(constants.ETHEREUM_EVENTS.TaskSuccessSubmission, this._taskSubmissionEventCallback.bind(this)); this._ethereumServices.on(constants.ETHEREUM_EVENTS.TaskFailureSubmission, this._taskSubmissionEventCallback.bind(this)); + this._ethereumServices.on(constants.ETHEREUM_EVENTS.TaskFailureDueToEthereumCB, this._taskSubmissionEventCallback.bind(this)); this._ethereumServices.on(constants.ETHEREUM_EVENTS.SecretContractDeployment, this._taskDeployedContractEventCallback.bind(this)); } /** * Verify task creation * @param {Task} task to verify + * @param {integer} block number representing the timestamp of the received task * @param {string} workerAddress * @return {Promise} returning {JSON} {Boolean} isVerified - true/false if the task verified, * {Error} error * {Integer} blockNumber * {Integer} gasLimit */ - verifyTaskCreation(task, workerAddress) { + verifyTaskCreation(task, blockNumber, workerAddress) { return new Promise((resolve) => { let result = {isVerified: false, gasLimit: null, blockNumber: null, error: null}; if (!(task instanceof Task)) { @@ -63,7 +68,7 @@ class EthereumVerifier { result.error = new errors.TypeErr('Worker address is not a valid Ethereum address'); return resolve(result); } - this._createTaskCreationListener(task, workerAddress, resolve); + this._createTaskCreationListener(task, blockNumber, workerAddress, resolve); this._verifyTaskCreationNow(task).then(async (res) => { if (res.canBeVerified) { this.deleteTaskCreationListener(task.getTaskId()); @@ -91,15 +96,15 @@ class EthereumVerifier { * @return {Promise} returning {JSON} {Boolean} isVerified - true/false if the task verified, * {Error} error */ - verifyTaskSubmission(task, contractAddress, localTip) { + verifyTaskSubmission(task, blockNumber, contractAddress, localTip) { return new Promise((resolve) => { let result = {isVerified: false, error: null}; if (!(task instanceof Result)) { result.error = new errors.TypeErr('Wrong task result type'); return resolve(result); } - this._createTaskSubmissionListener(task, resolve); - this._verifyTaskSubmissionNow(task, contractAddress, localTip).then( (res) => { + this._createTaskSubmissionListener(task, blockNumber, resolve); + this._verifyTaskSubmissionNow(task, contractAddress, localTip).then((res) => { if (res.canBeVerified) { this.deleteTaskSubmissionListener(task.getTaskId()); resolve({error: res.error, isVerified: res.isVerified}); @@ -144,9 +149,19 @@ class EthereumVerifier { }); } - _createTaskCreationListener(task, workerAddress, resolve) { + _createTaskCreationListener(task, blockNumber, workerAddress, resolve) { const taskId = task.getTaskId(); - this._setTaskCreationListener(taskId, async (event) => { + this._setTaskCreationListener(taskId, blockNumber, async (event) => { + // Check if the new epoch event was sent, if so, it means that the task callback has timed out + if (event.type === constants.ETHEREUM_EVENTS.NewEpoch) { + const err = new errors.TaskTimeoutErr('Task ' + taskId + ' timed out'); + return resolve({error: err, isVerified: false, gasLimit: null, blockNumber: null}); + } + // Check if the task was cancelled + if (event.type === constants.ETHEREUM_EVENTS.TaskCancelled) { + const err = new errors.TaskCancelledErr('Task ' + taskId + ' was cancelled'); + return resolve({error: err, isVerified: false, gasLimit: null, blockNumber: null}); + } const res = this._verifyTaskCreateParams(event.inputsHash, task); if (res.isVerified) { let res2 = await this.verifySelectedWorker(task, event.blockNumber, workerAddress); @@ -156,8 +171,8 @@ class EthereumVerifier { }); } - _setTaskCreationListener(taskId, listener) { - this._unverifiedCreateTasks[taskId] = listener; + _setTaskCreationListener(taskId, blockNumber, listener) { + this._unverifiedCreateTasks[taskId] = {blockNumber: blockNumber, listener: listener}; } _getTaskCreationListener(taskId) { @@ -168,11 +183,21 @@ class EthereumVerifier { return Object.keys(this._unverifiedCreateTasks); } - _createTaskSubmissionListener(task, resolve) { + _createTaskSubmissionListener(task, blockNumber, resolve) { const taskId = task.getTaskId(); - this._setTaskSubmissionListener(taskId, (event) => { - // First verify the case of a FailedResult - if (task instanceof FailedResult) { + this._setTaskSubmissionListener(taskId, blockNumber, (event) => { + // First check if the new epoch event was sent, if so, it means that the task callback has timed out + if (event.type === constants.ETHEREUM_EVENTS.NewEpoch) { + const err = new errors.TaskTimeoutErr('Task ' + taskId + ' timed out'); + resolve({error: err, isVerified: false}); + } + // then check if its an event indicating of an Ethereum callback failure + else if (event.type === constants.ETHEREUM_EVENTS.TaskFailureDueToEthereumCB) { + const err = new errors.TaskEthereumFailureErr('Task ' + taskId + ' was failed due to Ethereum'); + resolve({error: err, isVerified: false}); + } + // Verify the case of a FailedResult + else if (task instanceof FailedResult) { if (event.type === constants.ETHEREUM_EVENTS.TaskFailureSubmission) { resolve({error: null, isVerified: true}); } @@ -213,8 +238,8 @@ class EthereumVerifier { }); } - _setTaskSubmissionListener(taskId, listener) { - this._unverifiedSubmitTasks[taskId] = listener; + _setTaskSubmissionListener(taskId, blockNumber, listener) { + this._unverifiedSubmitTasks[taskId] = {blockNumber: blockNumber, listener: listener}; } _getTaskSubmissionListener(taskId) { @@ -330,7 +355,24 @@ class EthereumVerifier { res.error = new errors.TaskFailedErr(`Task ${taskId} has failed`); } } - else { + else if (taskParams.status === constants.ETHEREUM_TASK_STATUS.RECEIPT_FAILED_ETH) { + res.canBeVerified = true; + res.isVerified = false; + res.error = new errors.TaskEthereumFailureErr('Task ' + taskId + ' was failed due to Ethereum'); + } + else if (taskParams.status === constants.ETHEREUM_TASK_STATUS.RECEIPT_FAILED_CANCELLED) { + res.canBeVerified = true; + res.isVerified = false; + res.error = new errors.TaskValidityErr(`Failure in verification of task ${taskId}: task was cancelled by the user`); + } + else if (taskParams.status === constants.ETHEREUM_TASK_STATUS.RECORD_CREATED) { + // If the task was created already, use its mined block number instead for the timeout calculations + if (taskId in this._getAllTaskSubmissionIds()) { + let {listener, blockNumber} = this._getTaskSubmissionListener(taskId); + this._setTaskSubmissionListener(taskId, taskParams.blockNumber, listener); + } + } + else { // taskParams.status === RECORD_UNDEFINED res.canBeVerified = false; res.isVerified = null; res.error = null; @@ -353,9 +395,6 @@ class EthereumVerifier { if (!task.hasDelta()) { res.error = new errors.TaskVerificationErr("No delta in task result " + task.getTaskId()); } - else if (!task.getOutput()) { - res.error = new errors.TaskVerificationErr("No output in task result " + task.getTaskId()); - } else { const deltaKey = task.getDelta().key; if (deltaKey !== 0) { @@ -404,23 +443,11 @@ class EthereumVerifier { // All fine by now... if (!error) { let output = task.getOutput(); - // Output - if (output) { - if (!EthereumVerifier._verifyHash(taskParams.outputHash, output)) { - error = new errors.TaskVerificationErr("Mismatch in output hash in task result " + task.getTaskId()); - } - else { - isVerified = true; - } + if (!EthereumVerifier._verifyHash(taskParams.outputHash, output)) { + error = new errors.TaskVerificationErr("Mismatch in output hash in task result " + task.getTaskId()); } - // No output else { - if (taskParams.outputHash !== constants.ETHEREUM_EMPTY_HASH) { - error = new errors.TaskVerificationErr("Mismatch in output in task result " + task.getTaskId()); - } - else { - isVerified = true; - } + isVerified = true; } } return { @@ -452,23 +479,11 @@ class EthereumVerifier { // All fine by now... if (!error) { let output = task.getOutput(); - // Output - if (output) { - if (!EthereumVerifier._verifyHash(outputHash, output)) { - error = new errors.TaskVerificationErr("Mismatch in output hash in task result " + task.getTaskId()); - } - else { - isVerified = true; - } + if (!EthereumVerifier._verifyHash(outputHash, output)) { + error = new errors.TaskVerificationErr("Mismatch in output hash in task result " + task.getTaskId()); } - // No output else { - if (outputHash !== constants.ETHEREUM_EMPTY_HASH) { - error = new errors.TaskVerificationErr("Mismatch in output in task result " + task.getTaskId()); - } - else { - isVerified = true; - } + isVerified = true; } } return { @@ -570,6 +585,7 @@ class EthereumVerifier { if (this._workerParamArray.length > this._workerParamArrayMaxSize) { this._workerParamArray.shift(); } + this._checkTimeouts(event); } } } @@ -583,14 +599,14 @@ class EthereumVerifier { for (let taskId of unverifiedTaskIds) { if (('taskId' in event) && (event.taskId === taskId)) { - let callback = this._getTaskCreationListener(taskId); + let {listener, blockNumber} = this._getTaskCreationListener(taskId); this.deleteTaskCreationListener(taskId); - return callback(event); + return listener(event); } else if (('tasks' in event) && (taskId in event.tasks)) { - let callback = this._getTaskCreationListener(taskId); + let {listener, blockNumber} = this._getTaskCreationListener(taskId); this.deleteTaskCreationListener(taskId); - return callback(event.tasks[taskId]); + return listener(event.tasks[taskId]); } } } @@ -604,9 +620,9 @@ class EthereumVerifier { const unverifiedTaskIds = this._getAllTaskSubmissionIds(); for (let taskId of unverifiedTaskIds) { if (event.taskId === taskId) { - let callback = this._getTaskSubmissionListener(taskId); - this.deleteTaskCreationListener(taskId); - return callback(event); + let {listener, blockNumber} = this._getTaskSubmissionListener(taskId); + this.deleteTaskSubmissionListener(taskId); + return listener(event); } } } @@ -620,9 +636,9 @@ class EthereumVerifier { const unverifiedTaskIds = this._getAllTaskSubmissionIds(); for (let taskId of unverifiedTaskIds) { if (event.secretContractAddress === taskId) { - let callback = this._getTaskSubmissionListener(taskId); - this.deleteTaskCreationListener(taskId); - return callback(event); + let {listener, blockNumber} = this._getTaskSubmissionListener(taskId); + this.deleteTaskSubmissionListener(taskId); + return listener(event); } } } @@ -680,10 +696,10 @@ class EthereumVerifier { let res = {}; let paramsArray = []; if (task instanceof DeployTask) { - paramsArray = [task.getEncryptedFn(), task.getEncyptedArgs(), cryptography.hash(task.getPreCode()), task.getUserDHKey()]; + paramsArray = [task.getEncryptedFn(), task.getEncryptedArgs(), cryptography.hash(task.getPreCode()), task.getUserDHKey()]; } else { - paramsArray = [task.getEncryptedFn(), task.getEncyptedArgs(), task.getContractAddr(), task.getUserDHKey()]; + paramsArray = [task.getEncryptedFn(), task.getEncryptedArgs(), task.getContractAddr(), task.getUserDHKey()]; } if (cryptography.hashArray(paramsArray) === inputsHash) { res.isVerified = true; @@ -696,6 +712,30 @@ class EthereumVerifier { return res; } + _checkTimeouts(newEpochEvent) { + // Timeouts handling => go through the listeners and check if there are callbacks to be removed + + // Unverified creation task + let unverifiedTaskIds = this._getAllTaskCreationIds(); + for (let taskId of unverifiedTaskIds) { + let {blockNumber, listener} = this._getTaskCreationListener(taskId); + if (newEpochEvent.firstBlockNumber - blockNumber >= this._taskTimeoutInBlocks) { + this.deleteTaskCreationListener(taskId); + listener(newEpochEvent); + } + } + + // Unverified submission task + unverifiedTaskIds = this._getAllTaskSubmissionIds(); + for (let taskId of unverifiedTaskIds) { + let {blockNumber, listener} = this._getTaskSubmissionListener(taskId); + if (newEpochEvent.firstBlockNumber - blockNumber >= this._taskTimeoutInBlocks) { + this.deleteTaskSubmissionListener(taskId); + listener(newEpochEvent); + } + } + } + /** * Verify hash * @param {string} hash diff --git a/src/ethereum/StateSync.js b/src/ethereum/StateSync.js index 61dae97a..c42d255e 100644 --- a/src/ethereum/StateSync.js +++ b/src/ethereum/StateSync.js @@ -25,8 +25,7 @@ async function getRemoteMissingStates(api, localTips, callback) { try { - const remoteSecretContractNumber = await api.countSecretContracts(); - const remoteSecretContractsAddresses = await api.getSecretContractAddresses(0, remoteSecretContractNumber); + const remoteSecretContractsAddresses = await api.getAllSecretContractAddresses(); // initiate jobs const jobs = []; remoteSecretContractsAddresses.forEach((secretContractAddress)=>{ diff --git a/src/ethereum/env_scripts/mock_scripts.js b/src/ethereum/env_scripts/mock_scripts.js deleted file mode 100644 index 9505430b..00000000 --- a/src/ethereum/env_scripts/mock_scripts.js +++ /dev/null @@ -1,72 +0,0 @@ -// const parallel = require('async/parallel'); -// const EnigmaBuilder = require('../EnigmaContractAPIBuilder'); -// const testParams = { -// report: { -// id:'17799798407803378780815025067996530252', -// timestamp:"2018-06-12T16:27:25.080278", -// isvEnclaveQuoteStatus:"OK", -// isvEnclaveQuoteBody:'AgAAANoKAAAHAAYAAAAAABYB+Vw5ueowf+qruQGtw+72HPtcKCz63mlimVbjqbE5BAT/////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAHAAAAAAAAAKXBP5WZBuLjmngKZ8zzQ2A00leTJBcp9oYT2CDXSNHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACD1xnnferKFHD2uvYqTXdDA8iZ22kCD5xw7h38CMfOngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8G0ljp2XaOXVtOPvA5tngv93F4PXnPFqA6ZnYt5BGhhPYTqeilJHAoMpungy+sJPzQDOLm3hiqQ34tUBCfn2p', -// }, -// bytecode: '0x608060405234801561001057600080fd5b506040516020806118f4833981016040525160008054600160a060020a03909216600160a060020a03199092169190911790556118a2806100526000396000f3006080604052600436106100a35763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166303988f8481146100a857806310f11e84146101145780632aaf281b146102075780633b8332451461028257806357f5fc28146102b2578063a06a585614610348578063b24fd5c514610366578063d10e1e6914610397578063daefe738146103f7578063dd20866e14610448575b600080fd5b3480156100b457600080fd5b506100c0600435610511565b60408051600160a060020a03909916895265ffffffffffff909716602089015260ff909516878701526060870193909352608086019190915260a085015260c084015260e083015251908190036101000190f35b34801561012057600080fd5b50610129610588565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b83811015610171578181015183820152602001610159565b50505050905001848103835286818151815260200191508051906020019060200280838360005b838110156101b0578181015183820152602001610198565b50505050905001848103825285818151815260200191508051906020019060200280838360005b838110156101ef5781810151838201526020016101d7565b50505050905001965050505050505060405180910390f35b60408051602060046024803582810135601f810185900485028601850190965285855261025e95833563ffffffff1695369560449491939091019190819084018382808284375094975061072e9650505050505050565b6040518082600181111561026e57fe5b60ff16815260200191505060405180910390f35b34801561028e57600080fd5b506102a063ffffffff60043516610b08565b60408051918252519081900360200190f35b3480156102be57600080fd5b506102d363ffffffff60043516602435610b39565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561030d5781810151838201526020016102f5565b50505050905090810190601f16801561033a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561035457600080fd5b5061025e600435602435604435610c09565b34801561037257600080fd5b5061037b610f58565b60408051600160a060020a039092168252519081900360200190f35b3480156103a357600080fd5b5060408051602060046024803582810135848102808701860190975280865261025e96843563ffffffff1696369660449591949091019291829185019084908082843750949750610f679650505050505050565b34801561040357600080fd5b5061041563ffffffff600435166112ee565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b34801561045457600080fd5b506040805160206004602480358281013584810280870186019097528086526104aa96843563ffffffff1696369660449591949091019291829185019084908082843750949750509335945061140c9350505050565b604051808363ffffffff1663ffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156104fc5781810151838201526020016104e4565b50505050905001935050505060405180910390f35b600180548290811061051f57fe5b6000918252602090912060099091020180546001820154600283015460038401546004850154600590950154600160a060020a038516965074010000000000000000000000000000000000000000850465ffffffffffff169560d060020a90950460ff16949088565b60608060608060608060006001805490506040519080825280602002602001820160405280156105c2578160200160208202803883390190505b5060015460408051828152602080840282010190915291955080156105f1578160200160208202803883390190505b506001546040805182815260208084028201019091529194508015610620578160200160208202803883390190505b509150600090505b60015481101561072157600180548290811061064057fe5b9060005260206000209060090201600001601a9054906101000a900460ff1660ff16848281518110151561067057fe5b6020908102909101015260018054600091908390811061068c57fe5b600091825260208083203384526008600990930201919091019052604090205411156106cd57600183828151811015156106c257fe5b602090810290910101525b60018054339190839081106106de57fe5b6000918252602090912060099091020154600160a060020a03161415610719576001828281518110151561070e57fe5b602090810290910101525b600101610628565b5091959094509092509050565b600080348110610788576040805160e560020a62461bcd02815260206004820152601f60248201527f4465706f7369742076616c7565206d75737420626520706f7369746976652e00604482015290519081900360640190fd5b6001805463ffffffff861690811061079c57fe5b600091825260209091206009909102015460d060020a900460ff161561080c576040805160e560020a62461bcd02815260206004820152601b60248201527f496c6c6567616c20737461746520666f72206465706f736974732e0000000000604482015290519081900360640190fd5b6001805463ffffffff861690811061082057fe5b9060005260206000209060090201905080600301543481151561083f57fe5b06156108bb576040805160e560020a62461bcd02815260206004820152603060248201527f4465706f7369742076616c7565206d7573742062652061206d756c7469706c6560448201527f206f6620636c61696d2076616c75652e00000000000000000000000000000000606482015290519081900360840190fd5b33600090815260088201602052604090205415610948576040805160e560020a62461bcd02815260206004820152602b60248201527f43616e6e6f74206465706f73697420747769636520776974682074686520736160448201527f6d6520616464726573732e000000000000000000000000000000000000000000606482015290519081900360840190fd5b600181018054349081019091553360009081526008830160205260409020556002810154600682018054859290811061097d57fe5b90600052602060002001908051906020019061099a929190611593565b506002810180546001908101909155604080513460208083018290529282018490526080808352875190830152865163ffffffff89169433947fce7036acc3606aaa1ec3a2e7b4d13b3f4da34ee1eac298fc47524074de74a3bf948a949390918291606083019160a08401919088019080838360005b83811015610a28578181015183820152602001610a10565b50505050905090810190601f168015610a555780820380516001836020036101000a031916815260200191505b50928303905250600881527f616c6c20676f6f6400000000000000000000000000000000000000000000000060208201526040805191829003019350915050a36004810154600282015410610afe5780547aff0000000000000000000000000000000000000000000000000000191660d060020a17815560405163ffffffff8516907fa98c11bc69afe22b520fe800f82e421f9594d4f06259a7600711b75af05a43b990600090a25b5060009392505050565b600060018263ffffffff16815481101515610b1f57fe5b600091825260209091206006600990920201015492915050565b606060018363ffffffff16815481101515610b5057fe5b906000526020600020906009020160060182815481101515610b6e57fe5b600091825260209182902001805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610bfc5780601f10610bd157610100808354040283529160200191610bfc565b820191906000526020600020905b815481529060010190602001808311610bdf57829003601f168201915b5050505050905092915050565b600180546000918190610c1e90828101611611565b503360018263ffffffff16815481101515610c3557fe5b906000526020600020906009020160000160006101000a815481600160a060020a030219169083600160a060020a031602179055508460018263ffffffff16815481101515610c8057fe5b600091825260208220600560099092020101919091556001805463ffffffff8416908110610caa57fe5b906000526020600020906009020160010181905550600060018263ffffffff16815481101515610cd657fe5b9060005260206000209060090201600201819055504260018263ffffffff16815481101515610d0157fe5b906000526020600020906009020160000160146101000a81548165ffffffffffff021916908365ffffffffffff1602179055508360018263ffffffff16815481101515610d4a57fe5b9060005260206000209060090201600301819055508260018263ffffffff16815481101515610d7557fe5b90600052602060002090600902016004018190555082604051908082528060200260200182016040528015610dbe57816020015b6060815260200190600190039081610da95790505b506001805463ffffffff8416908110610dd357fe5b90600052602060002090600902016006019080519060200190610df7929190611642565b5082604051908082528060200260200182016040528015610e22578160200160208202803883390190505b506001805463ffffffff8416908110610e3757fe5b90600052602060002090600902016007019080519060200190610e5b92919061169b565b50600060018263ffffffff16815481101515610e7357fe5b6000918252602091829020600990910201805460ff9390931660d060020a027aff000000000000000000000000000000000000000000000000000019909316929092179091556040805165ffffffffffff42168152918201879052818101869052606082018590526001608083015260c060a083018190526008908301527f616c6c20676f6f6400000000000000000000000000000000000000000000000060e08301525163ffffffff83169133917f876b9043d809880bec360c3c9d8e8819a90016c1d6a6958015ece6039873f790918190036101000190a3506000949350505050565b600054600160a060020a031681565b600080548190600160a060020a03163314610ff2576040805160e560020a62461bcd02815260206004820152602260248201527f53656e646572206973206e6f742074686520456e69676d6120636f6e7472616360448201527f742e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6001805463ffffffff861690811061100657fe5b600091825260209091206009909102015460d060020a900460ff16600114611078576040805160e560020a62461bcd02815260206004820152601560248201527f4465616c206973206e6f742065786563757465642e0000000000000000000000604482015290519081900360640190fd5b8260018563ffffffff1681548110151561108e57fe5b906000526020600020906009020160070190805190602001906110b292919061169b565b50600090505b6001805463ffffffff86169081106110cc57fe5b906000526020600020906009020160070180549050811015611191576001805463ffffffff86169081106110fc57fe5b90600052602060002090600902016007018181548110151561111a57fe5b60009182526020909120015460018054600160a060020a03909216916108fc919063ffffffff881690811061114b57fe5b9060005260206000209060090201600301549081150290604051600060405180830381858888f19350505050158015611188573d6000803e3d6000fd5b506001016110b8565b6001805463ffffffff8616917f1187ca8b8cb5197d0ccbe2a81015221695030dd9d87d9d5fc1f6678d65d5813491839081106111c957fe5b90600052602060002090600902016003015460018763ffffffff168154811015156111f057fe5b906000526020600020906009020160070160018863ffffffff1681548110151561121657fe5b906000526020600020906009020160070180549050600160405180858152602001806020018463ffffffff1663ffffffff168152602001831515151581526020018060200183810383528681815481526020019150805480156112a257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611284575b5050928303905250600881527f616c6c20676f6f640000000000000000000000000000000000000000000000006020820152604080519182900301945092505050a25060009392505050565b60008060008060008060008060008060008060018d63ffffffff1681548110151561131557fe5b906000526020600020906009020160050154955060018d63ffffffff1681548110151561133e57fe5b906000526020600020906009020160040154945060018d63ffffffff1681548110151561136757fe5b906000526020600020906009020160030154935060018d63ffffffff1681548110151561139057fe5b906000526020600020906009020160020154925060018d63ffffffff168154811015156113b957fe5b906000526020600020906009020160010154915060018d63ffffffff168154811015156113e257fe5b6000918252602090912060076009909202010154959d949c50929a50909850965091945092505050565b815160009060609082805b6000831115611587578286600101604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106114735780518252601f199092019160209182019101611454565b5181516020939093036101000a60001901801990911692169190911790526040519201829003909120925050508115156114a957fe5b06915086600184038151811015156114bd57fe5b90602001906020020151600160a060020a031687838151811015156114de57fe5b60209081029091010151600160a060020a03161461157b57866001840381518110151561150757fe5b906020019060200201519050868281518110151561152157fe5b90602001906020020151876001850381518110151561153c57fe5b600160a060020a039092166020928302909101909101528651819088908490811061156357fe5b600160a060020a039092166020928302909101909101525b60001990920191611417565b50959694955050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106115d457805160ff1916838001178555611601565b82800160010185558215611601579182015b828111156116015782518255916020019190600101906115e6565b5061160d929150611709565b5090565b81548183558181111561163d5760090281600902836000526020600020918201910161163d9190611726565b505050565b82805482825590600052602060002090810192821561168f579160200282015b8281111561168f578251805161167f918491602090910190611593565b5091602001919060010190611662565b5061160d92915061179f565b8280548282559060005260206000209081019282156116fd579160200282015b828111156116fd578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039091161782556020909201916001909101906116bb565b5061160d9291506117c2565b61172391905b8082111561160d576000815560010161170f565b90565b61172391905b8082111561160d5780547affffffffffffffffffffffffffffffffffffffffffffffffffffff191681556000600182018190556002820181905560038201819055600482018190556005820181905561178860068301826117f3565b611796600783016000611814565b5060090161172c565b61172391905b8082111561160d5760006117b98282611832565b506001016117a5565b61172391905b8082111561160d57805473ffffffffffffffffffffffffffffffffffffffff191681556001016117c8565b5080546000825590600052602060002090810190611811919061179f565b50565b50805460008255906000526020600020908101906118119190611709565b50805460018160011615610100020316600290046000825580601f106118585750611811565b601f01602090049060005260206000209081019061181191906117095600a165627a7a72305820b79db93c7571320bf50efd924c3b78e05079bf8f4afd870902607e6be2575f380029' -// }; -// async function startEnv(){ -// let builder = new EnigmaBuilder(); -// return await builder.deploy().build(); -// } -// -// /** -// * @param {JSON} data - [ -// * { -// * address : , -// * bytecode_hash :, -// * deltas : ['hash1','hash2',...] -// * }, ... -// * ] -// * */ -// async function simulateData(data){ -// let result = await startEnv(); -// let api = result.api; -// let destroyer = result.environment; -// let workerReport = JSON.stringify(testParams.report); -// let addrs = await api.w3().eth.getAccounts(); -// let workerKey = addrs[0]; -// let workerAddress = addrs[0]; -// // populate the contract -// await api.register(workerKey, workerReport, {from : workerAddress}); -// let jobs = []; -// data.forEach(d=>{ -// jobs.push(cb=>{ -// api.deploySecretContract(d.address, -// d.bytecode_hash, -// workerAddress, -// workerKey, -// { from : workerAddress}) -// .then(tx=>{ -// cb(null,tx); -// }); -// }); -// }); -// parallel(jobs,async (err,results)=>{ -// console.log("err deploying contracts?" , err); -// // populate deltas -// let receipt = await api.createTaskRecords( -// taskIds, -// fees, -// tokens, -// tokenValues, -// {from : senderAddress} -// ); -// // destroy testnet -// await destroyer.destroy(); -// }); -// } -// -// let data = [ -// {address : '0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5', -// bytecode_hash: '0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5', -// deltas : [{},{}]}, -// {address : '0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b2', -// bytecode_hash: '0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5', -// deltas : [{},{}]} -// ]; -// simulateData(data); diff --git a/src/main_controller/FacadeController.js b/src/main_controller/FacadeController.js index 207a1fd7..0eb45489 100644 --- a/src/main_controller/FacadeController.js +++ b/src/main_controller/FacadeController.js @@ -37,85 +37,6 @@ class FacadeController extends MainController{ this.getIpcClient().disconnect(); await this.getNode().stop(); } - /** - * connectivity: - * checks if > criticlal DHT and if < max outbound - * @returns {Json} result {status : bool, connection : {status : bool, outbound : number, inbound : number}} - * */ - async healthCheck(){ - - let healthCheckResult = { - status : false, - connection : { - status : false, - inbound : -1, - outbound : -1, - }, - core : { - status : false, - uri : null, - registrationParams: { - signKey : null, - } - }, - ethereum: { - status: false, - uri: null, - contract_addr: null, - }, - state: { - status: false, - missing: null, - } - }; - - // connectivity - healthCheckResult.connection.inbound = this.getNode().getAllInboundHandshakes().length; - healthCheckResult.connection.outbound = this.getNode().getAllOutboundHandshakes().length; - healthCheckResult.connection.status = constants.DHT_STATUS.CRITICAL_LOW_DHT_SIZE < healthCheckResult.connection.outbound && - healthCheckResult.connection.outbound <= constants.DHT_STATUS.CRITICAL_HIGH_DHT_SIZE && - healthCheckResult.connection.inbound < constants.DHT_STATUS.MAX_OUTBOUND; - - // core - try { - healthCheckResult.core.uri = this.getIpcClient().getUri(); - let regParams = await this.getNode().asyncGetRegistrationParams(); - healthCheckResult.core.registrationParams.signKey = regParams.result.signingKey; - healthCheckResult.core.status = healthCheckResult.core.uri != null && healthCheckResult.core.registrationParams.signKey != null; - } catch(e) { - healthCheckResult.core.status = false; - } - - // ethereum - if (this.getNode().hasEthereum()) { - try { - let eth = await this.getNode().ethereum().healthCheck(); - healthCheckResult.ethereum.uri = eth.url; - healthCheckResult.ethereum.contract_addr = eth.enigmaContractAddress; - healthCheckResult.ethereum.status = eth.isConnected; - } catch (e) { - healthCheckResult.ethereum.status = false; - } - } - - // sync - try{ - let missingStates = await this.getNode().asyncIdentifyMissingStates(); - healthCheckResult.state.missing = missingStates["missingStatesMap"]; - if(healthCheckResult.state.missing && - Object.keys(healthCheckResult.state.missing).length === 0) { - healthCheckResult.state.status = true; - } - }catch(e){ - healthCheckResult.state.status = false; - } - - // overall_status - healthCheckResult.status = healthCheckResult.connection.status && - healthCheckResult.core.status && - healthCheckResult.ethereum.status && healthCheckResult.state.status; - return healthCheckResult; - } } module.exports = FacadeController; diff --git a/src/worker/controller/NodeController.js b/src/worker/controller/NodeController.js index 3764379c..9301b5fb 100644 --- a/src/worker/controller/NodeController.js +++ b/src/worker/controller/NodeController.js @@ -41,7 +41,8 @@ const ConsistentDiscoveryAction = require('./actions/connectivity/ConsistentDisc const GetResultAction = require('./actions/tasks/GetResultAction'); const StartTaskExecutionAction = require('./actions/tasks/StartTaskExecutionAction'); const VerifyNewTaskAction = require('./actions/tasks/VerifyNewTaskAction'); -const ExecuteVerifiedAction = require('./actions/tasks/ExecuteVerifiedAction'); +const HandleVerifiedTaskAction = require('./actions/tasks/HandleVerifiedTaskAction'); +const ExecuteTaskAction = require('./actions/tasks/ExecuteTaskAction'); const PublishTaskResultAction = require('./actions/tasks/PublishTaskResultAction'); const VerifyAndStoreResultAction = require('./actions/tasks/VerifyAndStoreResultAction'); // db @@ -125,7 +126,8 @@ class NodeController { [NOTIFICATION.NEW_TASK_INPUT_ENC_KEY]: new NewTaskEncryptionKeyAction(this), // new encryption key from core jsonrpc response [NOTIFICATION.RECEIVED_NEW_RESULT]: new VerifyAndStoreResultAction(this), // very tasks result published stuff and store local [NOTIFICATION.TASK_FINISHED]: new PublishTaskResultAction(this), // once the task manager emits end event - [NOTIFICATION.TASK_VERIFIED]: new ExecuteVerifiedAction(this), // once verified, pass to core the task/deploy + [NOTIFICATION.TASK_VERIFIED]: new HandleVerifiedTaskAction(this), // once verified, check if it can be executed + [NOTIFICATION.EXEC_TASK]: new ExecuteTaskAction(this), // pass to core the task/deploy [NOTIFICATION.START_TASK_EXEC]: new StartTaskExecutionAction(this), // start task execution (worker) [NOTIFICATION.VERIFY_NEW_TASK]: new VerifyNewTaskAction(this), // verify new task [NOTIFICATION.GET_TASK_RESULT] : new GetResultAction(this), // get the task result given a taskId @@ -242,6 +244,9 @@ class NodeController { conf = this._extraConfig.principal; } this._principal = new PrincipalNode(conf, this.logger()); + this._principal.on(constants.PTT_END_EVENT, ()=> { + this._logger.info('Finished PTT'); + }) } _initEnigmaNode() { this._engNode.on('notify', (params)=>{ diff --git a/src/worker/controller/actions/GetStateKeysAction.js b/src/worker/controller/actions/GetStateKeysAction.js index 58787384..1f606f56 100644 --- a/src/worker/controller/actions/GetStateKeysAction.js +++ b/src/worker/controller/actions/GetStateKeysAction.js @@ -27,22 +27,31 @@ class GetStateKeysAction { } else { onResponse = () => {}; } + + // First, set PTT flag (and validate that no PTT is in progress now) + if (!this._controller.principal().startPTT()) { + const err = 'PTT in progress.. aborting GetStateKeysAction'; + this._controller.logger().error(err); + return onResponse(err); + } + const onPTTRequestResponse = async (err, coreResponse) => { if (err || coreResponse.type === 'Error') { if (coreResponse && coreResponse.type === 'Error') { err = coreResponse.msg; } - this._controller.logger().error(`Failed Core connection: err: ${JSON.stringify(err)}, coreResponse: ${JSON.stringify(coreResponse)}`); - return onResponse(err, null); + return this._handleError(`Failed Core connection: err: ${JSON.stringify(err)}, coreResponse: ${JSON.stringify(coreResponse)}`, + err, onResponse); } let principalResponse; try { principalResponse = await this._controller.principal().getStateKeys(this._buildRequestMsg(coreResponse, params)); - } catch (err) { + } + catch (err) { // TODO: Errors. - this._controller.logger().error(`Failed Principal node connection: ${err.code} - ${err.message}`); - return onResponse(err, null); + return this._handleError(`Failed Principal node connection: ${err.code} - ${err.message}`, + err, onResponse); } this._pttResponse({response: principalResponse.data, sig: principalResponse.sig}, (err, response) => { if (err || response.type === 'Error' || response.result.errors.length > 0) { @@ -51,10 +60,11 @@ class GetStateKeysAction { } else if (response && response.result && response.result.errors.length > 0) { err = response.result; } - this._controller.logger().error(`Failed Core connection: err: ${JSON.stringify(err)}, coreResponse: ${JSON.stringify(response)}`); - return onResponse(err, null); + return this._handleError(`Failed Core connection: err: ${JSON.stringify(err)}, coreResponse: ${JSON.stringify(response)}`, + err, onResponse); } - return onResponse(null, null); + this._controller.principal().onPTTEnd(); + return onResponse(null); }); }; @@ -92,6 +102,12 @@ class GetStateKeysAction { } return MsgPrincipal.build(msg); } + + _handleError(errMsg, err, onResponse) { + this._controller.logger().error(errMsg); + this._controller.principal().onPTTEnd(); + onResponse(err); + } } module.exports = GetStateKeysAction; diff --git a/src/worker/controller/actions/ethereum/CommitReceiptAction.js b/src/worker/controller/actions/ethereum/CommitReceiptAction.js index cff8d7b6..4b62ab2b 100644 --- a/src/worker/controller/actions/ethereum/CommitReceiptAction.js +++ b/src/worker/controller/actions/ethereum/CommitReceiptAction.js @@ -7,133 +7,168 @@ class CommitReceiptAction { constructor(controller) { this._controller = controller; } - async execute(params) { + async asyncExecute(params) { const task = params.task; - const callback = params.callback; - if (!task) return; let err = null; - let result = await this._commitTask(task); - if (result.error) { - this._controller.logger().error(`[COMMIT_RECEIPT] error for task ${task.getTaskId()} error= ${result.error}`); - err = result.error; + if (!task) { + err = new errors.InputErr(`No task supplied for CommitReceiptAction`); + return err; } - else { - this._controller.logger().info(`[COMMIT_RECEIPT] success for ${result.method} of task ${task.getTaskId()} receipt = ${result.txReceipt}`); - } - if (callback) { - callback(err); - } - } - async _commitTask(task) { - let res; - if (task.getResult().isSuccess()) { - res = await this._commitSuccessTask(task); - } else { - res = await this._commitFailedTask(task); - } - return res; - } - async _commitFailedTask(task) { - let txReceipt = null; - let err = null; - let method = null; - // Deploy task - if(task instanceof DeployTask) { - try { - txReceipt = await this._controller.ethereum().api().deploySecretContractFailure( - task.getTaskId(), - task.getResult().getUsedGas(), - task.getResult().getSignature(), - ); - method = "deploySecretContractFailure"; + let result; + + if (task instanceof DeployTask) { + result = await this._commitDeployTask(task); + if (result.error) { + err = result.error; } - catch (e) { - err = e; + else { + this._controller.logger().info(`[COMMIT_RECEIPT] success for deploy of task ${task.getTaskId()}`); } } - // Compute task else { - try { - txReceipt = this._controller.ethereum().api().commitTaskFailure( - task.getContractAddr(), - task.getTaskId(), - task.getResult().getUsedGas(), - task.getResult().getSignature(), - ); - method = "commitTaskFailure"; + result = await this._commitComputeTask(task); + if (result.error) { + err = result.error; } - catch (e) { - err = e; + else { + this._controller.logger().info(`[COMMIT_RECEIPT] success for compute of task ${task.getTaskId()}`); } } - return {error: err, txReceipt: txReceipt, method: method}; + return err; } - async _commitSuccessTask(task) { - let txReceipt = null; + + async _commitDeployTask(task) { let err = null; - let method = null; - const isDelta = task.getResult().hasDelta(); - const output = task.getResult().getOutput(); + if (task.getResult().isSuccess()) { + let revertRequired = false; - // Deploy task - if(task instanceof DeployTask) { - if (!output) { - err = new errors.InputErr(`No output for deploy task ${task.getTaskId()}`); - } - else if (!isDelta) { + if (!task.getResult().hasDelta()) { err = new errors.InputErr(`No delta for deploy task ${task.getTaskId()}`); } else { try { - txReceipt = await this._controller.ethereum().api().deploySecretContract( + let events = await this._controller.ethereum().api().deploySecretContract( task.getTaskId(), task.getResult().getPreCodeHash(), - cryptography.hash(output), + cryptography.hash(task.getResult().getOutput()), cryptography.hash(task.getResult().getDelta().data), task.getResult().getEthPayload(), task.getResult().getEthAddr(), task.getResult().getUsedGas(), task.getResult().getSignature(), ); - method = "deploySecretContract"; + + //TODO: improve this: use services concept instead of the raw Enigma contract events + if (constants.RAW_ETHEREUM_EVENTS.ReceiptFailedETH in events) { + this._controller.logger().info(`[COMMIT_RECEIPT] received ReceiptFailedETH event after committing deploy task ${task.getTaskId()}.. Reverting state`); + revertRequired = true; + } } catch (e) { - err = e; + this._controller.logger().info(`[COMMIT_RECEIPT] received an error while trying to commit deployment of task ${task.getTaskId()} error=${e}.. Reverting state`); + revertRequired = true; + } + if (revertRequired) { + let res = await this._revertState(task, true); + err = res.error; } } } - // Compute task else { - let outputHash = constants.ETHEREUM_EMPTY_HASH; - let deltaHash = constants.ETHEREUM_EMPTY_HASH; - - if (output) { - outputHash = cryptography.hash(output); + try { + await this._controller.ethereum().api().deploySecretContractFailure( + task.getTaskId(), + cryptography.hash(task.getResult().getOutput()), + task.getResult().getUsedGas(), + task.getResult().getSignature(), + ); } - if (isDelta) { - deltaHash = cryptography.hash(task.getResult().getDelta().data); + catch (e) { + this._controller.logger().info(`[COMMIT_RECEIPT] received an error while trying to commit failed deploy task ${task.getTaskId()} error= ${e}`); + err = e; } + } + return {error: err}; + } + + async _commitComputeTask(task) { + let err = null; + + if (task.getResult().isSuccess()) { + const isDelta = task.getResult().hasDelta(); + let deltaHash = isDelta ? cryptography.hash(task.getResult().getDelta().data) : constants.ETHEREUM_EMPTY_HASH; + let revertRequired = false; + try { - txReceipt = await this._controller.ethereum().api().commitReceipt( + let events = await this._controller.ethereum().api().commitReceipt( task.getContractAddr(), task.getTaskId(), deltaHash, - outputHash, + cryptography.hash(task.getResult().getOutput()), task.getResult().getEthPayload(), task.getResult().getEthAddr(), task.getResult().getUsedGas(), task.getResult().getSignature(), ); - method = "commitReceipt"; + + //TODO: improve this: use services concept instead of the raw Enigma contract events + if (constants.RAW_ETHEREUM_EVENTS.ReceiptFailedETH in events) { + this._controller.logger().info(`[COMMIT_RECEIPT] received ReceiptFailedETH event after committing compute task ${task.getTaskId()}`); + revertRequired = true; + } + } + catch (e) { + this._controller.logger().info(`[COMMIT_RECEIPT] received an error while trying to commit compute task ${task.getTaskId()} error=${e}`); + revertRequired = true; + } + if (revertRequired && isDelta) { + this._controller.logger().info(`[COMMIT_RECEIPT] reverting state`); + let res = await this._revertState(task, false); + err = res.error; + } + } + else { + try { + await this._controller.ethereum().api().commitTaskFailure( + task.getContractAddr(), + task.getTaskId(), + cryptography.hash(task.getResult().getOutput()), + task.getResult().getUsedGas(), + task.getResult().getSignature(), + ); } catch (e) { + this._controller.logger().info(`[COMMIT_RECEIPT] received an error while trying to commit failed compute task ${task.getTaskId()} error=${e}`); err = e; } } - return {error: err, txReceipt: txReceipt, method: method}; + return {error: err}; + } + + async _revertState(task, isDeploy) { + let coreMsg = {}; + let err = null; + + if (isDeploy) { + coreMsg = {address: task.getContractAddr(), type: constants.CORE_REQUESTS.RemoveContract}; + this._controller.logger().debug(`[COMMIT_RECEIPT] reverting contract ${task.getContractAddr()}`); + } + else { + let deltaKey = task.getResult().getDelta().key; + coreMsg = {input: [{address: task.getContractAddr(), from: deltaKey, to: deltaKey+1}], type: constants.CORE_REQUESTS.RemoveContract}; + this._controller.logger().debug(`[COMMIT_RECEIPT] reverting delta ${deltaKey} of contract ${task.getContractAddr()}`); + } + try { + await this._controller.asyncExecCmd(constants.NODE_NOTIFICATIONS.UPDATE_DB, {data: coreMsg}); + } + catch (e) { + this._controller.logger().error(`[COMMIT_RECEIPT] received an error while trying to revert core state: ${e}`); + err = e; + } + return {error: err}; } } diff --git a/src/worker/controller/actions/ethereum/DepositAction.js b/src/worker/controller/actions/ethereum/DepositAction.js index 033fa0cc..6732fd04 100644 --- a/src/worker/controller/actions/ethereum/DepositAction.js +++ b/src/worker/controller/actions/ethereum/DepositAction.js @@ -11,8 +11,8 @@ class DepositAction { let err = null; try { - const txReceipt = await this._controller.ethereum().api().selfDeposit(amount); - this._controller.logger().info(`[DEPOSIT] successful deposit, receipt = ${txReceipt}`); + await this._controller.ethereum().api().selfDeposit(amount); + this._controller.logger().info(`[DEPOSIT] successful deposit`); success = true; } catch (e) { this._controller.logger().error(`[DEPOSIT] error= ${e}`); diff --git a/src/worker/controller/actions/ethereum/LoginAction.js b/src/worker/controller/actions/ethereum/LoginAction.js index 4e925751..22e55154 100644 --- a/src/worker/controller/actions/ethereum/LoginAction.js +++ b/src/worker/controller/actions/ethereum/LoginAction.js @@ -10,8 +10,8 @@ class LoginAction { let err = null; try { - const txReceipt = await this._controller.ethereum().api().login(); - this._controller.logger().info(`[LOGIN] successful login, receipt = ${txReceipt}`); + await this._controller.ethereum().api().login(); + this._controller.logger().info(`[LOGIN] successful login`); loginSuccess = true; } catch (e) { this._controller.logger().error(`[LOGIN] error in login error= ${e}`); diff --git a/src/worker/controller/actions/ethereum/LogoutAction.js b/src/worker/controller/actions/ethereum/LogoutAction.js index efab46b4..e5c318d3 100644 --- a/src/worker/controller/actions/ethereum/LogoutAction.js +++ b/src/worker/controller/actions/ethereum/LogoutAction.js @@ -10,8 +10,8 @@ class LogoutAction { let err = null; try { - const txReceipt = await this._controller.ethereum().api().logout(); - this._controller.logger().info(`[LOGOUT] successful logout, receipt = ${txReceipt}`); + await this._controller.ethereum().api().logout(); + this._controller.logger().info(`[LOGOUT] successful logout`); logoutSuccess = true; } catch (e) { this._controller.logger().error(`[LOGOUT] error in logout error= ${e}`); diff --git a/src/worker/controller/actions/ethereum/RegisterAction.js b/src/worker/controller/actions/ethereum/RegisterAction.js index 9985ea25..b8aadf17 100644 --- a/src/worker/controller/actions/ethereum/RegisterAction.js +++ b/src/worker/controller/actions/ethereum/RegisterAction.js @@ -17,8 +17,8 @@ class RegisterAction { const report = regParams.result.report; const signature = regParams.result.signature; try { - const txReceipt = await this._controller.ethereum().api().register(signerAddress, report, signature); - this._controller.logger().info(`[REGISTER] successful registration, receipt = ${txReceipt}`); + await this._controller.ethereum().api().register(signerAddress, report, signature); + this._controller.logger().info(`[REGISTER] successful registration`); success = true; } catch (e) { this._controller.logger().error(`[REGISTER] error= ${e}`); diff --git a/src/worker/controller/actions/ethereum/WithdrawAction.js b/src/worker/controller/actions/ethereum/WithdrawAction.js index 37e7f2f5..dba1540e 100644 --- a/src/worker/controller/actions/ethereum/WithdrawAction.js +++ b/src/worker/controller/actions/ethereum/WithdrawAction.js @@ -11,8 +11,8 @@ class WithdrawAction { let err = null; try { - const txReceipt = await this._controller.ethereum().api().withdraw(amount); - this._controller.logger().info(`[WITHDRAW] successful withdrawal, receipt = ${txReceipt}`); + await this._controller.ethereum().api().withdraw(amount); + this._controller.logger().info(`[WITHDRAW] successful withdrawal`); success = true; } catch (e) { this._controller.logger().error(`[WITHDRAW] error= ${e}`); diff --git a/src/worker/controller/actions/tasks/ExecuteVerifiedAction.js b/src/worker/controller/actions/tasks/ExecuteTaskAction.js similarity index 84% rename from src/worker/controller/actions/tasks/ExecuteVerifiedAction.js rename to src/worker/controller/actions/tasks/ExecuteTaskAction.js index 30517dfb..90a85cf8 100644 --- a/src/worker/controller/actions/tasks/ExecuteVerifiedAction.js +++ b/src/worker/controller/actions/tasks/ExecuteTaskAction.js @@ -10,7 +10,7 @@ const Envelop = require('../../../../main_controller/channels/Envelop'); const DeployTask = require('../../../../worker/tasks/DeployTask'); -class ExecuteVerifiedAction { +class ExecuteTaskAction { constructor(controller) { this._controller = controller; } @@ -56,14 +56,22 @@ class ExecuteVerifiedAction { case taskTypes.FailedTask: response.result.status = constants.TASK_STATUS.FAILED; result = Result.FailedResult.buildFailedResult(response.result); + this._controller.logger().debug('received failed result'); break; case taskTypes.DeploySecretContract: response.result.status = constants.TASK_STATUS.SUCCESS; result = Result.DeployResult.buildDeployResult(response.result); + this._controller.logger().debug('received deploy result'); break; case taskTypes.ComputeTask: response.result.status = constants.TASK_STATUS.SUCCESS; result = Result.ComputeResult.buildComputeResult(response.result); + if (result.hasDelta()) { + this._controller.logger().debug('received compute result for contract:' + task.getContractAddr() + ' delta-key:' + result.getDelta().key); + } + else { + this._controller.logger().debug('received compute result for contract:' + task.getContractAddr() + ' ,no delta'); + } break; } // update task manager with the result @@ -78,4 +86,4 @@ class ExecuteVerifiedAction { } } } -module.exports = ExecuteVerifiedAction; +module.exports = ExecuteTaskAction; diff --git a/src/worker/controller/actions/tasks/HandleVerifiedTaskAction.js b/src/worker/controller/actions/tasks/HandleVerifiedTaskAction.js new file mode 100644 index 00000000..248c398a --- /dev/null +++ b/src/worker/controller/actions/tasks/HandleVerifiedTaskAction.js @@ -0,0 +1,30 @@ +/** + * this action is called once a task is verified and now needs to be executed. + * it checks whether PTT in progress, if so the task execution is delayed. If not, the task execution starts immediately. + * */ +const constants = require('../../../../common/constants'); + + +class HandleVerifiedTaskAction { + constructor(controller) { + this._controller = controller; + } + async execute(params) { + const task = params.task; + + const executeTaskCallback = () => { + this._controller.execCmd(constants.NODE_NOTIFICATIONS.EXEC_TASK, {task: task}); + }; + + // First check if we are in the middle of PTT + // if so, schedule the task execution to after it is done + if (this._controller.principal().isInPTT()) { + this._controller.principal().once(constants.PTT_END_EVENT, executeTaskCallback); + } + // otherwise, execute task now + else { + executeTaskCallback(); + } + } +} +module.exports = HandleVerifiedTaskAction; diff --git a/src/worker/controller/actions/tasks/PublishTaskResultAction.js b/src/worker/controller/actions/tasks/PublishTaskResultAction.js index 686f2ea7..80663992 100644 --- a/src/worker/controller/actions/tasks/PublishTaskResultAction.js +++ b/src/worker/controller/actions/tasks/PublishTaskResultAction.js @@ -7,6 +7,7 @@ const constants = require('../../../../common/constants'); const DeployTask = require('../../../tasks/DeployTask'); const EngCid = require('../../../../common/EngCID'); + class PublishTaskResultAction { constructor(controller) { this._controller = controller; @@ -14,6 +15,7 @@ class PublishTaskResultAction { async execute(params) { const task = params.task; let taskType; + let err = null; if (task.isSuccess()) { taskType = task.getTaskType(); @@ -30,25 +32,32 @@ class PublishTaskResultAction { type: taskType, }), }); - // announce as provider if its deployment and successfull - if (task instanceof DeployTask && task.getResult().isSuccess()){ + + // commit to Ethereum + if (this._controller.hasEthereum()) { + err = await this._controller.asyncExecCmd(constants.NODE_NOTIFICATIONS.COMMIT_RECEIPT, { + task: task, + }); + if (err) { + this._controller.logger().info(`[PUBLISH_ANNOUNCE_TASK] error occurred in task ${task.getTaskId()} commit`); + } + } + + // announce as provider if its deployment and successful and no error occurred in task's commit + if (task instanceof DeployTask && task.getResult().isSuccess() && !err){ // let ecid = EngCid.createFromSCAddress(task.getContractAddr()); - if(ecid){ - try{ + if (ecid) { + try { await this._controller.asyncExecCmd(constants.NODE_NOTIFICATIONS.ANNOUNCE_ENG_CIDS,{engCids : [ecid]}); - }catch(e){ + } + catch(e) { this._controller.logger().debug(`[PUBLISH_ANNOUNCE_TASK] cant publish ecid ${e}`); } - }else{ + } + else { this._controller.logger().error(`[PUBLISH_ANNOUNCE_TASK] cant publish ecid null ${task.getContractAddr()}`); } } - // commit to ethereum - if (this._controller.hasEthereum()) { - this._controller.execCmd(constants.NODE_NOTIFICATIONS.COMMIT_RECEIPT, { - task: task, - }); - } } } module.exports = PublishTaskResultAction; diff --git a/src/worker/controller/actions/tasks/VerifyAndStoreResultAction.js b/src/worker/controller/actions/tasks/VerifyAndStoreResultAction.js index a0f9e329..ee3b5b72 100644 --- a/src/worker/controller/actions/tasks/VerifyAndStoreResultAction.js +++ b/src/worker/controller/actions/tasks/VerifyAndStoreResultAction.js @@ -6,6 +6,7 @@ * - update local storage * */ const constants = require('../../../../common/constants'); +const errors = require('../../../../common/errors'); const EngCid = require('../../../../common/EngCID'); const DeployResult = require('../../../tasks/Result').DeployResult; const ComputeResult = require('../../../tasks/Result').ComputeResult; @@ -19,7 +20,7 @@ class VerifyAndStoreResultAction { /** * params { * notification, - * params : Buffer -> {the actuall object from publish that contains from,data,,...} + * params : Buffer -> {the actual object from publish that contains from,data,,...} * } * */ async execute(params) { @@ -31,12 +32,15 @@ class VerifyAndStoreResultAction { const resultObj = JSON.parse(msgObj.result); const contractAddress = msgObj.contractAddress; const type = msgObj.type; - const log = '[RECEIVED_RESULT] taskId {' + resultObj.taskId+'} \nstatus {'+ resultObj.status + '}'; - this._controller.logger().debug(log); + let error = null; + + this._controller.logger().debug('[RECEIVED_RESULT] taskId {' + resultObj.taskId+'} \nstatus {'+ resultObj.status + '}'); let {taskResult, err} = this._buildTaskResult(type, resultObj); if (!err) { let {error, isVerified} = await this._verifyResult(taskResult, contractAddress); + let verifyError = error; + if (isVerified) { const coreMsg = this._buildIpcMsg(taskResult, contractAddress); if (coreMsg) { @@ -64,10 +68,17 @@ class VerifyAndStoreResultAction { } } } + } + // outside task is saved if this is legit task or if the task was failed due to an Ethereum callback. + // In case of the later, we update the task status to signal that the task failed due to Ethereum callback. + if (isVerified || verifyError instanceof errors.TaskEthereumFailureErr) { try { - // store result in TaskManager mapped with taskId let outsideTask = OutsideTask.buildTask(type, resultObj); if (outsideTask) { + if (verifyError instanceof errors.TaskEthereumFailureErr) { + outsideTask.setStatus(constants.TASK_STATUS.FAILED.FAILED_ETHEREUM_CB) + } + // store result in TaskManager mapped with taskId await this._controller.taskManager().addOutsideResult(type, outsideTask); } } @@ -76,15 +87,16 @@ class VerifyAndStoreResultAction { error = e; } } + this._controller.logger().debug(`[VERIFY_AND_STORE_RESULT] finished : is_err ? ${error}`); if (optionalCallback) { - return optionalCallback(error); + optionalCallback(error); } } else { // if (err) this._controller.logger().debug(`[VERIFY_AND_STORE_RESULT] finished with an error: ${err}`); - if(optionalCallback){ - return optionalCallback(err); + if (optionalCallback) { + optionalCallback(err); } } } @@ -148,7 +160,8 @@ class VerifyAndStoreResultAction { } } try { - let res = await this._controller.ethereum().verifier().verifyTaskSubmission(result, contractAddress, localTip); + const currentBlockNumber = await this._controller.ethereum().api().getEthereumBlockNumber(); + let res = await this._controller.ethereum().verifier().verifyTaskSubmission(result, currentBlockNumber, contractAddress, localTip); if (res.error) { this._controller.logger().info(`[VERIFY_TASK_RESULT] error in verification of result of task ${result.getTaskId()}: ${res.error}`); error = res.error; diff --git a/src/worker/controller/actions/tasks/VerifyNewTaskAction.js b/src/worker/controller/actions/tasks/VerifyNewTaskAction.js index cf5b57a8..5c2560ec 100644 --- a/src/worker/controller/actions/tasks/VerifyNewTaskAction.js +++ b/src/worker/controller/actions/tasks/VerifyNewTaskAction.js @@ -17,7 +17,8 @@ class VerifyNewTaskAction { if(this._controller.hasEthereum()){ isVerified = false; try { - let res = await this._controller.ethereum().verifier().verifyTaskCreation(unverifiedTask, regParams.result.signingKey); + const currentBlockNumber = await this._controller.ethereum().api().getEthereumBlockNumber(); + let res = await this._controller.ethereum().verifier().verifyTaskCreation(unverifiedTask, currentBlockNumber, regParams.result.signingKey); if (res.error) { this._controller.logger().info(`[VERIFY_NEW_TASK] error in verification of task ${unverifiedTask.getTaskId()}: ${res.error}`); } diff --git a/src/worker/handlers/PrincipalNode.js b/src/worker/handlers/PrincipalNode.js index 949e538d..76031841 100644 --- a/src/worker/handlers/PrincipalNode.js +++ b/src/worker/handlers/PrincipalNode.js @@ -1,10 +1,16 @@ const jayson = require('jayson'); -const MsgPrincipal = require('../../policy/p2p_messages/principal_messages'); -const PRINCIPAL_CONSTANTS = require('../../common/constants').PRINCIPAL_NODE; const retry = require('retry'); +const EventEmitter = require('events').EventEmitter; + +const constants = require('../../common/constants'); +const MsgPrincipal = require('../../policy/p2p_messages/principal_messages'); +const PRINCIPAL_CONSTANTS = constants.PRINCIPAL_NODE; -class PrincipalNode { + +class PrincipalNode extends EventEmitter { constructor(config, logger) { + super(); + if (config && config.uri) { this._uri = config.uri; } else { @@ -13,6 +19,25 @@ class PrincipalNode { this._logger = logger; this._client = jayson.client.http(this._uri); + this._pttInProgress = false; + } + + startPTT() { + if (this._pttInProgress) { + this._logger.error("PTT is already in progress, cannot initiate a new one"); + return false; + } + this._pttInProgress = true; + return true; + } + + onPTTEnd() { + this._pttInProgress = false; + this.emit(constants.PTT_END_EVENT); + } + + isInPTT() { + return this._pttInProgress; } async getStateKeys(msg) { diff --git a/src/worker/tasks/ComputeTask.js b/src/worker/tasks/ComputeTask.js index aab79f4e..1bd6c7bc 100644 --- a/src/worker/tasks/ComputeTask.js +++ b/src/worker/tasks/ComputeTask.js @@ -33,7 +33,7 @@ class ComputeTask extends Task { this._encryptedFn = encryptedFn; this._userDHKey = userDHKey; } - getEncyptedArgs() { + getEncryptedArgs() { return this._encryptedArgs; } getEncryptedFn() { @@ -46,7 +46,7 @@ class ComputeTask extends Task { const output = { status: this.getStatus(), taskId: this.getTaskId(), - encryptedArgs: this.getEncyptedArgs(), + encryptedArgs: this.getEncryptedArgs(), encryptedFn: this.getEncryptedFn(), userDHKey: this.getUserDHKey(), gasLimit: this.getGasLimit(), @@ -60,7 +60,7 @@ class ComputeTask extends Task { } toCoreJson() { return { - encryptedArgs: this.getEncyptedArgs(), + encryptedArgs: this.getEncryptedArgs(), encryptedFn: this.getEncryptedFn(), userDHKey: this.getUserDHKey(), gasLimit: this.getGasLimit(), diff --git a/src/worker/tasks/DeployTask.js b/src/worker/tasks/DeployTask.js index c04667ce..c7328aa4 100644 --- a/src/worker/tasks/DeployTask.js +++ b/src/worker/tasks/DeployTask.js @@ -38,7 +38,7 @@ class DeployTask extends Task { getPreCode() { return this._preCode; } - getEncyptedArgs() { + getEncryptedArgs() { return this._encryptedArgs; } getEncryptedFn() { @@ -52,7 +52,7 @@ class DeployTask extends Task { status: this.getStatus(), taskId: this.getTaskId(), preCode: this.getPreCode(), - encryptedArgs: this.getEncyptedArgs(), + encryptedArgs: this.getEncryptedArgs(), encryptedFn: this.getEncryptedFn(), userDHKey: this.getUserDHKey(), gasLimit: this.getGasLimit(), @@ -67,7 +67,7 @@ class DeployTask extends Task { toCoreJson() { return { preCode: this.getPreCode(), - encryptedArgs: this.getEncyptedArgs(), + encryptedArgs: this.getEncryptedArgs(), encryptedFn: this.getEncryptedFn(), userDHKey: this.getUserDHKey(), gasLimit: this.getGasLimit(), diff --git a/src/worker/tasks/Result.js b/src/worker/tasks/Result.js index 26c4091b..7ec9dec6 100644 --- a/src/worker/tasks/Result.js +++ b/src/worker/tasks/Result.js @@ -12,6 +12,9 @@ class Result { getStatus() { return this._status; } + setStatus(status) { + this._status = status; + } isSuccess() { return this._status === constants.TASK_STATUS.SUCCESS; } diff --git a/test/ethereum/EnigmaContractMock.js b/test/ethereum/EnigmaContractMock.js index dbf80869..ce349da6 100644 --- a/test/ethereum/EnigmaContractMock.js +++ b/test/ethereum/EnigmaContractMock.js @@ -4,6 +4,8 @@ class EnigmaContractMock { this._taskRecords = {}; this._contracts = {}; this._epochSize = null; + this._taskTimeout = 0; + this._ethereumBlockNumber = 0; this._eventListeners = {}; this._workersParams = []; this._except = false; @@ -30,6 +32,14 @@ class EnigmaContractMock { this._workersParams = workerParams; } + setTaskTimeout(blocks) { + this._taskTimeout = blocks; + } + + setEthereumBlockNumber(number) { + this._ethereumBlockNumber = number; + } + getTaskParams(taskId) { if (this._except) { throw Error("Ethereum Mock exception"); @@ -49,6 +59,14 @@ class EnigmaContractMock { return this._contracts[contractAddress]; } + getTaskTimeout() { + return this._taskTimeout; + } + + getEthereumBlockNumber() { + return this._ethereumBlockNumber; + } + subscribe(eventName, filter, callback) { this._eventListeners[eventName] = callback; } diff --git a/test/ethereum/basic_eth_test.js b/test/ethereum/basic_eth_test.js index e9f95b8a..c97360d8 100644 --- a/test/ethereum/basic_eth_test.js +++ b/test/ethereum/basic_eth_test.js @@ -3,10 +3,8 @@ const assert = require('assert'); const TEST_TREE = require(path.join(__dirname, '../test_tree')).TEST_TREE; const EnigmaContractAPIBuilder = require(path.join(__dirname, '../../src/ethereum/EnigmaContractAPIBuilder')); const EthereumServices = require(path.join(__dirname, '../../src/ethereum/EthereumServices')); -const EthereumAPI = require(path.join(__dirname, '../../src/ethereum/EthereumAPI')); const StateSync = require(path.join(__dirname, '../../src/ethereum/StateSync')); const testParameters = require('./test_parameters.json'); -const Logger = require('../../src/common/logger'); const constants = require('../../src/common/constants'); const utils = require('../../src/common/utils'); @@ -46,35 +44,36 @@ describe('Ethereum tests', function() { const gasUsed = 10; const zeroAddress = '0x0000000000000000000000000000000000000000'; - eventSubscribe(api, 'Registered', {}, getEventRecievedFunc('Registered', + eventSubscribe(api, constants.RAW_ETHEREUM_EVENTS.Registered, {}, getEventRecievedFunc(constants.RAW_ETHEREUM_EVENTS.Registered, (result)=> { assert.strictEqual(result.signer, workerEnclaveSigningAddress); assert.strictEqual(result.workerAddress, workerAddress); })); - eventSubscribe(api, 'DepositSuccessful', {}, getEventRecievedFunc('DepositSuccessful', + eventSubscribe(api, constants.RAW_ETHEREUM_EVENTS.DepositSuccessful, {}, getEventRecievedFunc(constants.RAW_ETHEREUM_EVENTS.DepositSuccessful, (result)=> { assert.strictEqual(result.from, workerAddress); assert.strictEqual(result.value, depositValue); })); - eventSubscribe(api, 'SecretContractDeployed', {}, getEventRecievedFunc('SecretContractDeployed', + eventSubscribe(api, constants.RAW_ETHEREUM_EVENTS.SecretContractDeployed, {}, getEventRecievedFunc(constants.RAW_ETHEREUM_EVENTS.SecretContractDeployed, (result)=> { assert.strictEqual(result.secretContractAddress, secretContractAddress); assert.strictEqual(result.codeHash, codeHash); })); - eventSubscribe(api, 'WithdrawSuccessful', {}, getEventRecievedFunc('WithdrawSuccessful', + eventSubscribe(api, constants.RAW_ETHEREUM_EVENTS.WithdrawSuccessful, {}, getEventRecievedFunc(constants.RAW_ETHEREUM_EVENTS.WithdrawSuccessful, (result)=> { assert.strictEqual(result.to, workerAddress); assert.strictEqual(result.value, depositValue); })); - await api.register(workerEnclaveSigningAddress, workerReport, signature, {from: workerAddress}); - await api.deposit(workerAddress, depositValue, {from: workerAddress}); + let events = await api.register(workerEnclaveSigningAddress, workerReport, signature, {from: workerAddress}); + assert.strictEqual(constants.RAW_ETHEREUM_EVENTS.Registered in events, true); + events = await api.deposit(workerAddress, depositValue, {from: workerAddress}); + assert.strictEqual(constants.RAW_ETHEREUM_EVENTS.DepositSuccessful in events, true); await api.login({from: workerAddress}); - let workerState = await api.getWorker(workerAddress); assert.strictEqual(workerState.report, workerReport); @@ -90,7 +89,14 @@ describe('Ethereum tests', function() { const countBefore = await api.countSecretContracts(); assert.strictEqual(countBefore, 0); - await api.deploySecretContract(secretContractAddress, codeHash, codeHash, initStateDeltaHash, "0x00", zeroAddress, gasUsed, workerEnclaveSigningAddress, {from: workerAddress}); + let observedAddresses = await api.getSecretContractAddresses(0, 0); + assert.strictEqual(observedAddresses.length, 0); + + observedAddresses = await api.getAllSecretContractAddresses(); + assert.strictEqual(observedAddresses.length, 0); + + events = await api.deploySecretContract(secretContractAddress, codeHash, codeHash, initStateDeltaHash, "0x00", zeroAddress, gasUsed, workerEnclaveSigningAddress, {from: workerAddress}); + assert.strictEqual(constants.RAW_ETHEREUM_EVENTS.SecretContractDeployed in events, true); // Verify the number of secret-accounts after deploying one const countAfter = await api.countSecretContracts(); @@ -100,9 +106,13 @@ describe('Ethereum tests', function() { observedCodeHash = observedCodeHash.codeHash; assert.strictEqual(observedCodeHash, codeHash); - const observedAddresses = await api.getSecretContractAddresses(0, 1); + observedAddresses = await api.getSecretContractAddresses(0, 1); assert.strictEqual(observedAddresses[0], secretContractAddress); + observedAddresses = await api.getAllSecretContractAddresses(); + assert.strictEqual(observedAddresses[0], secretContractAddress); + assert.strictEqual(observedAddresses.length, 1); + api.unsubscribeAll(); await api.deploySecretContract(secretContractAddress2, codeHash, codeHash, initStateDeltaHash, "0x00", zeroAddress, gasUsed, workerEnclaveSigningAddress, {from: workerAddress}); @@ -117,12 +127,16 @@ describe('Ethereum tests', function() { const observedAddresses2 = await api.getSecretContractAddresses(1, 2); assert.strictEqual(observedAddresses2[0], secretContractAddress2); - const observedAddressesArray = await api.getSecretContractAddresses(0, 2); + let observedAddressesArray = await api.getSecretContractAddresses(0, 2); + assert.strictEqual(observedAddressesArray[0], secretContractAddress); + assert.strictEqual(observedAddressesArray[1], secretContractAddress2); + + observedAddressesArray = await api.getAllSecretContractAddresses(); assert.strictEqual(observedAddressesArray[0], secretContractAddress); assert.strictEqual(observedAddressesArray[1], secretContractAddress2); //await api.deploySecretContract(secretContractAddress3, codeHash, codeHash, initStateDeltaHash, "0x00", zeroAddress, gasUsed, workerEnclaveSigningAddress, {from: workerAddress}); - await api.deploySecretContractFailure(taskId1, gasUsed, signature, {from: workerAddress}); + await api.deploySecretContractFailure(taskId1, codeHash, gasUsed, signature, {from: workerAddress}); observedCount = await api.countSecretContracts(); assert.strictEqual(observedCount, 2); @@ -137,6 +151,9 @@ describe('Ethereum tests', function() { assert.strictEqual(workerState.balance, depositValue/2); assert.strictEqual(workerState.address, workerEnclaveSigningAddress); + let ethereumBlockNumber = await api.getEthereumBlockNumber(); + assert.strictEqual(ethereumBlockNumber, 18); + await res.environment.destroy(); resolve(); }).catch(console.log); @@ -201,25 +218,6 @@ describe('Ethereum tests', function() { const taskId3 = utils.remove0x(web3.utils.randomHex(32)); const taskId4 = utils.remove0x(web3.utils.randomHex(32)); - // - // eventSubscribe(api2, 'TaskRecordsCreated', {}, getEventRecievedFunc('TaskRecordsCreated', - // (result)=> { - // assert.strictEqual(result.taskIds[0], taskId2); - // assert.strictEqual(result.taskIds[1], taskId3); - // assert.strictEqual(result.taskIds.length, 2); - // - // assert.strictEqual(result.fees[0], taskFee2); - // assert.strictEqual(result.fees[1], taskFee3); - // assert.strictEqual(result.fees.length, 2); - // - // assert.strictEqual(result.senderAddress, workerAddress); - // })); - - // await api2.createTaskRecord(taskId1, taskFee1, {from: taskSenderAddress1}); - // - // await api2.createTaskRecords([taskId2, taskId3], [taskFee2, taskFee3], {from: workerAddress}); - - const inputsHash = web3.utils.randomHex(32); const gasLimit = 7; const gasPrice = 10; @@ -228,7 +226,7 @@ describe('Ethereum tests', function() { const mock_taskId ="0xf29647ec8920b552fa96de8cc3129b5ba70471b190c8ec5a4793467f12ad84e9"; - eventSubscribe(api, 'TaskRecordCreated', {}, getEventRecievedFunc('TaskRecordCreated', + eventSubscribe(api, constants.RAW_ETHEREUM_EVENTS.TaskRecordCreated, {}, getEventRecievedFunc(constants.RAW_ETHEREUM_EVENTS.TaskRecordCreated, (result)=> { assert.strictEqual(result.taskId, mock_taskId); assert.strictEqual(result.gasLimit, gasLimit); @@ -255,7 +253,7 @@ describe('Ethereum tests', function() { let count = 0; - eventSubscribe(api, 'ReceiptVerified', {}, getEventRecievedFunc('ReceiptVerified', + eventSubscribe(api, constants.RAW_ETHEREUM_EVENTS.ReceiptVerified, {}, getEventRecievedFunc(constants.RAW_ETHEREUM_EVENTS.ReceiptVerified, (result)=> { switch (count){ case 0: @@ -286,29 +284,15 @@ describe('Ethereum tests', function() { count += 1; })); - // eventSubscribe(api, 'ReceiptsVerified', {}, getEventRecievedFunc('ReceiptsVerified', - // (result)=> { - // assert.strictEqual(result.taskIds[0], taskId2); - // assert.strictEqual(result.taskIds[1], taskId3); - // assert.strictEqual(result.outputHashes.length, 2); - // assert.strictEqual(result.outputHashes[0], outputHash2); - // assert.strictEqual(result.outputHashes[1], outputHash3); - // assert.strictEqual(result.stateDeltaHashes.length, 2); - // assert.strictEqual(result.stateDeltaHashes[0], stateDeltaHash2); - // assert.strictEqual(result.stateDeltaHashes[1], stateDeltaHash3); - // assert.strictEqual(result.optionalEthereumData, optionalEthereumData); - // assert.strictEqual(result.optionalEthereumContractAddress, optionalEthereumContractAddress); - // assert.strictEqual(result.signature, signature); - // })); - - eventSubscribe(api, 'ReceiptFailed', {}, getEventRecievedFunc('ReceiptFailed', + + eventSubscribe(api, constants.RAW_ETHEREUM_EVENTS.ReceiptFailed, {}, getEventRecievedFunc(constants.RAW_ETHEREUM_EVENTS.ReceiptFailed, (result)=> { assert.strictEqual(result.taskId, taskId4); assert.strictEqual(result.signature, signature); })); - // Login the worker before commmitting receipts + // Login the worker before committing receipts await api.commitReceipt(secretContractAddress, taskId1, stateDeltaHash1, outputHash1, optionalEthereumData, optionalEthereumContractAddress, gasUsed, signature); @@ -318,10 +302,7 @@ describe('Ethereum tests', function() { await api.commitReceipt(secretContractAddress, taskId3, stateDeltaHash3, outputHash3, optionalEthereumData, optionalEthereumContractAddress, gasUsed, signature); - //await api.commitReceipts(secretContractAddress, [taskId2, taskId3], [stateDeltaHash2, stateDeltaHash3], - // [outputHash2, outputHash3], optionalEthereumData, optionalEthereumContractAddress, [gasUsed, gasUsed], signature); - - await api.commitTaskFailure(secretContractAddress, taskId4, gasUsed, signature); + await api.commitTaskFailure(secretContractAddress, taskId4, outputHash1, gasUsed, signature); api.unsubscribeAll(); await api.logout(); @@ -373,11 +354,6 @@ describe('Ethereum tests', function() { const taskId3 = utils.remove0x(web3.utils.randomHex(32)); const taskId4 = utils.remove0x(web3.utils.randomHex(32)); - // await api.createTaskRecord(taskId1, taskFee1, {from: taskSenderAddress1}); - // - // await api.createTaskRecords([taskId2, taskId3], [taskFee2, taskFee3], {from: workerAddress}); - // - // await api.createTaskRecord(taskId4, taskFee4, {from: workerAddress}); const stateDeltaHash1 = web3.utils.randomHex(32); const stateDeltaHash2 = web3.utils.randomHex(32); @@ -391,10 +367,6 @@ describe('Ethereum tests', function() { await api.commitReceipt(secretContractAddress1, taskId1, stateDeltaHash1, outputHash1, optionalEthereumData, optionalEthereumContractAddress, gasUsed, signature, {from: workerAddress}); - //await api.commitReceipts(secretContractAddress1, [taskId2, taskId3], [stateDeltaHash2, stateDeltaHash3], - // [outputHash2, outputHash3], - // optionalEthereumData, optionalEthereumContractAddress, [gasUsed, gasUsed], signature, {from: workerAddress}); - await api.commitReceipt(secretContractAddress1, taskId2, stateDeltaHash2, outputHash2, optionalEthereumData, optionalEthereumContractAddress, gasUsed, signature, {from: workerAddress}); @@ -538,29 +510,6 @@ describe('Ethereum tests', function() { services.initServices(['TaskCreation', 'TaskSuccessSubmission']); - // services.on('TaskCreation', (err, result)=> { - // if (taskIndex === 0) { - // assert.strictEqual(result.taskId, taskId1); - // assert.strictEqual(result.fee, taskFee1); - // assert.strictEqual(result.senderAddress, taskSenderAddress1); - // - // taskIndex += 1; - // } else if (taskIndex === 1) { - // assert.strictEqual(result.taskIds[0], taskId2); - // assert.strictEqual(result.taskIds[1], taskId3); - // assert.strictEqual(result.taskIds.length, 2); - // - // assert.strictEqual(result.fees[0], taskFee2); - // assert.strictEqual(result.fees[1], taskFee3); - // assert.strictEqual(result.fees.length, 2); - // - // assert.strictEqual(result.senderAddress, workerAddress); - // } - // }); - - // await api2.createTaskRecord(taskId1, taskFee1, {from: taskSenderAddress1}); - // await api2.createTaskRecords([taskId2, taskId3], [taskFee2, taskFee3], {from: workerAddress}); - const stateDeltaHash1 = web3.utils.randomHex(32); const stateDeltaHash2 = web3.utils.randomHex(32); const stateDeltaHash3 = web3.utils.randomHex(32); @@ -604,9 +553,6 @@ describe('Ethereum tests', function() { await api.commitReceipt(secretContractAddress, taskId3, stateDeltaHash3, outputHash3, optionalEthereumData, optionalEthereumContractAddress, gasUsed, signature, {from: workerAddress}); - // await api.commitReceipts(secretContractAddress, [taskId2, taskId3], [stateDeltaHash2, stateDeltaHash3], [outputHash2, outputHash3], - // optionalEthereumData, optionalEthereumContractAddress,[gasUsed, gasUsed], signature, {from: workerAddress}); - api.unsubscribeAll(); await res.environment.destroy(); @@ -614,36 +560,4 @@ describe('Ethereum tests', function() { resolve(); }); }); - - it('Test health check ', async function() { - const tree = TEST_TREE.ethereum; - if (!tree['all'] || !tree['#6']) { - this.skip(); - } - - return new Promise(async function(resolve) { - const builder = new EnigmaContractAPIBuilder(); - let res = await builder.createNetwork().deploy().build(); - - let ethereumApi = new EthereumAPI(new Logger({'cli': true})); - await ethereumApi.init({enigmaContractAddress: builder.enigmaContractAddress}); - - // sunny day - let data = await ethereumApi.healthCheck(); - assert.strictEqual(data.isConnected, true); - assert.strictEqual(data.url, 'ws://127.0.0.1:9545'); - assert.strictEqual(data.enigmaContractAddress, builder.enigmaContractAddress); - - // rainy day - await ethereumApi.destroy(); - - data = await ethereumApi.healthCheck(); - assert.strictEqual(data.isConnected, false); - assert.strictEqual(data.url, 'ws://127.0.0.1:9545'); - assert.strictEqual(data.enigmaContractAddress, builder.enigmaContractAddress); - - await res.environment.destroy(); - resolve(); - }); - }); }); diff --git a/test/ethereum/eth_verifier_test.js b/test/ethereum/eth_verifier_test.js index ab3bfe88..b055efff 100644 --- a/test/ethereum/eth_verifier_test.js +++ b/test/ethereum/eth_verifier_test.js @@ -92,6 +92,9 @@ describe('Eth verifier tests', function() { const coreServer = builder.coreServer; coreServer.setSigningKey(expectedAddress); + ethereumAPI.api().setTaskTimeout(100); + ethereumAPI.api().setEthereumBlockNumber(100); + return { controller: controller, coreServer: coreServer, diff --git a/test/ethereum/scripts/contracts/Enigma.sol b/test/ethereum/scripts/contracts/Enigma.sol index d3b658ca..515f015b 100644 --- a/test/ethereum/scripts/contracts/Enigma.sol +++ b/test/ethereum/scripts/contracts/Enigma.sol @@ -88,7 +88,7 @@ contract Enigma is EnigmaStorage, EnigmaEvents, Getters { modifier canWithdraw(address _user) { EnigmaCommon.Worker memory worker = state.workers[_user]; require(worker.status == EnigmaCommon.WorkerStatus.LoggedOut, "Worker not registered or not logged out"); - EnigmaCommon.WorkerLog memory workerLog = WorkersImpl.getLatestWorkerLogImpl(state, worker, block.number); + EnigmaCommon.WorkerLog memory workerLog = WorkersImpl.getLatestWorkerLogImpl(worker, block.number); require(workerLog.workerEventType == EnigmaCommon.WorkerLogType.LogOut, "Worker's last log is not of LogOut type"); // MOCK @@ -201,11 +201,13 @@ contract Enigma is EnigmaStorage, EnigmaEvents, Getters { * Deploy secret contract from user, called by the worker. * * @param _taskId Task ID of corresponding deployment task (taskId == scAddr) + * @param _codeHash Deployed bytecode hash * @param _gasUsed Gas used for task * @param _sig Worker's signature for deployment */ function deploySecretContractFailure( bytes32 _taskId, + bytes32 _codeHash, uint64 _gasUsed, bytes memory _sig ) @@ -213,7 +215,7 @@ contract Enigma is EnigmaStorage, EnigmaEvents, Getters { workerLoggedIn(msg.sender) contractUndefined(_taskId) { - TaskImpl.deploySecretContractFailureImpl(state, _taskId, _gasUsed, _sig); + TaskImpl.deploySecretContractFailureImpl(state, _taskId, _codeHash, _gasUsed, _sig); } /** @@ -343,7 +345,7 @@ contract Enigma is EnigmaStorage, EnigmaEvents, Getters { /** * Commit the computation task results on chain by first verifying the receipt and then the worker's signature. - * The task record is finalized and the worker is credited with the task's fee. + * The task record is finalized and the worker is credited with the task fee. * * @param _scAddr Secret contract address * @param _taskId Unique taskId @@ -373,48 +375,19 @@ contract Enigma is EnigmaStorage, EnigmaEvents, Getters { } /** - * Commit the computation task results on chain by first verifying the receipts and then the worker's signature. - * The task records are finalized and the worker is credited with the tasks' fees. - * - * @param _scAddr Secret contract address - * @param _taskIds Unique taskId - * @param _stateDeltaHashes Input state delta hashes - * @param _outputHashes Output state hashes - * @param _optionalEthereumData Output state hashes - * @param _optionalEthereumContractAddress Output state hashes - * @param _gasesUsed Output state hashes - * @param _sig Worker's signature - */ - function commitReceipts( - bytes32 _scAddr, - bytes32[] memory _taskIds, - bytes32[] memory _stateDeltaHashes, - bytes32[] memory _outputHashes, - bytes memory _optionalEthereumData, - address _optionalEthereumContractAddress, - uint64[] memory _gasesUsed, - bytes memory _sig - ) - public - workerLoggedIn(msg.sender) - contractDeployed(_scAddr) - { - TaskImpl.commitReceiptsImpl(state, _scAddr, _taskIds, _stateDeltaHashes, _outputHashes, _optionalEthereumData, - _optionalEthereumContractAddress, _gasesUsed, _sig); - } -// - /** - * Commit the computation task results on chain by first verifying the receipt and then the worker's signature. - * After this, the task record is finalized and the worker is credited with the task's fee. + * Commit the computation task failure on chain - the task fee is transfered to the worker and the status is + * updated to indicate task failure. * * @param _scAddr Secret contract address * @param _taskId Unique taskId + * @param _outputHash Output state hash * @param _gasUsed Gas used for task computation * @param _sig Worker's signature */ function commitTaskFailure( bytes32 _scAddr, bytes32 _taskId, + bytes32 _outputHash, uint64 _gasUsed, bytes memory _sig ) @@ -422,9 +395,14 @@ contract Enigma is EnigmaStorage, EnigmaEvents, Getters { workerLoggedIn(msg.sender) contractDeployed(_scAddr) { - TaskImpl.commitTaskFailureImpl(state, _scAddr, _taskId, _gasUsed, _sig); + TaskImpl.commitTaskFailureImpl(state, _scAddr, _taskId, _outputHash, _gasUsed, _sig); } + /** + * Return the task fee to the task creator when too many blocks have elapsed without task resolution. + * + * @param _taskId Unique taskId + */ function returnFeesForTask(bytes32 _taskId) public taskWaiting(_taskId) @@ -436,8 +414,9 @@ contract Enigma is EnigmaStorage, EnigmaEvents, Getters { * Reparameterizing workers with a new seed * This should be called for each epoch by the Principal node * + * @param _blockNumber Block number principal node is attempting to set worker params * @param _seed The random integer generated by the enclave - * @param _sig The random integer signed by the the principal node's enclave + * @param _sig Principal node's signature */ function setWorkersParams(uint _blockNumber, uint _seed, bytes memory _sig) public @@ -459,6 +438,12 @@ contract Enigma is EnigmaStorage, EnigmaEvents, Getters { return PrincipalImpl.getActiveWorkersImpl(state, _blockNumber); } + /** + * Get the first block number of an epoch that a given block number belongs to + * + * @param _blockNumber Block number + * @return Block number + */ function getFirstBlockNumber(uint _blockNumber) public view @@ -466,6 +451,15 @@ contract Enigma is EnigmaStorage, EnigmaEvents, Getters { return WorkersImpl.getFirstBlockNumberImpl(state, _blockNumber); } + /** + * Get worker params for an epoch given a particular block number + * + * @param _blockNumber Block number + * @return Epoch's first block number + * @return Seed + * @return Array of worker's signing addresses + * @return Array of worker's stakes + */ function getWorkerParams(uint _blockNumber) public view diff --git a/test/ethereum/scripts/contracts/impl/EnigmaCommon.sol b/test/ethereum/scripts/contracts/impl/EnigmaCommon.sol index 4bd9dbf7..1944bdbf 100644 --- a/test/ethereum/scripts/contracts/impl/EnigmaCommon.sol +++ b/test/ethereum/scripts/contracts/impl/EnigmaCommon.sol @@ -16,8 +16,8 @@ library EnigmaCommon { struct TaskRecord { address sender; // Sender of TaskRecord - bytes32 inputsHash; // Inputs hash of encryptedFn, encryptedArgs, and contract address/preCodeHash) - bytes32 outputHash; // Output hash + bytes32 inputsHash; // Inputs hash of encryptedFn, encryptedArgs, and contract address/preCodeHash + bytes32 outputHash; // Output hash of task computation uint gasLimit; // ENG gas limit units uint gasPx; // ENG gas px in grains (10 ** 8) amount uint blockNumber; // Block number TaskRecord was mined @@ -29,8 +29,8 @@ library EnigmaCommon { address signer; // Enclave address WorkerStatus status; // Unregistered: 0, LoggedIn: 1, LoggedOut: 2 bytes report; // Decided to store this as one RLP encoded attribute for easier external storage in the future - uint256 balance; // ENG balance - WorkerLog[] workerLogs; + uint256 balance; // ENG balance of worker + WorkerLog[] workerLogs; // Logs containing info regarding updates in worker status } /** @@ -61,7 +61,8 @@ library EnigmaCommon { // ========================================== Enums ========================================== - enum TaskStatus {RecordUndefined, RecordCreated, ReceiptVerified, ReceiptFailed} + enum TaskStatus {RecordUndefined, RecordCreated, ReceiptVerified, ReceiptFailed, ReceiptFailedETH, + ReceiptFailedReturn} enum WorkerStatus {Unregistered, LoggedIn, LoggedOut} @@ -71,17 +72,33 @@ library EnigmaCommon { // ========================================== Shared Functions ========================================== + /** + * Append the length of a variable and the variable to an existing bytes buffer + * + * @param _message Bytes buffer being appended to + * @param _var Bytes representation of value that needs to be concatenated to existing buffer + * @return New bytes buffer + */ function appendMessage(bytes memory _message, bytes memory _var) internal + pure returns (bytes memory) { return (_message.concat(uint64(_var.length).toBytesFromUint64())).concat(_var); } - function appendMessageArrayLength(uint256 arrayLength, bytes memory _message) + /** + * Append the length of an array to an existing bytes buffer + * + * @param _message Bytes buffer being appended to + * @param _arraylength Length of array + * @return New bytes buffer + */ + function appendMessageArrayLength(uint256 _arraylength, bytes memory _message) internal + pure returns (bytes memory) { - return _message.concat(uint64(arrayLength).toBytesFromUint64()); + return _message.concat(uint64(_arraylength).toBytesFromUint64()); } } diff --git a/test/ethereum/scripts/contracts/impl/EnigmaEvents.sol b/test/ethereum/scripts/contracts/impl/EnigmaEvents.sol index b48c201e..8c07bb38 100644 --- a/test/ethereum/scripts/contracts/impl/EnigmaEvents.sol +++ b/test/ethereum/scripts/contracts/impl/EnigmaEvents.sol @@ -16,11 +16,13 @@ contract EnigmaEvents { uint blockNumber); event TaskRecordsCreated(bytes32[] taskIds, bytes32[] inputsHashes, uint[] gasLimits, uint[] gasPxs, address sender, uint blockNumber); - event ReceiptVerified(bytes32 taskId, bytes32 stateDeltaHash, bytes32 outputHash, uint deltaHashIndex, - bytes optionalEthereumData, address optionalEthereumContractAddress, bytes sig); + event ReceiptVerified(bytes32 taskId, bytes32 stateDeltaHash, bytes32 outputHash, bytes32 scAddr, uint gasUsed, + uint deltaHashIndex, bytes optionalEthereumData, address optionalEthereumContractAddress, bytes sig); event ReceiptsVerified(bytes32[] taskIds, bytes32[] stateDeltaHashes, bytes32[] outputHashes, bytes optionalEthereumData, address optionalEthereumContractAddress, bytes sig); event ReceiptFailed(bytes32 taskId, bytes sig); + event ReceiptFailedETH(bytes32 taskId, bytes sig); + event ReceiptsFailedETH(bytes32[] taskIds, bytes sig); event TaskFeeReturned(bytes32 taskId); event DepositSuccessful(address from, uint value); event WithdrawSuccessful(address to, uint value); diff --git a/test/ethereum/scripts/contracts/impl/Getters.sol b/test/ethereum/scripts/contracts/impl/Getters.sol index 3b1db68d..63286285 100644 --- a/test/ethereum/scripts/contracts/impl/Getters.sol +++ b/test/ethereum/scripts/contracts/impl/Getters.sol @@ -10,14 +10,32 @@ import {EnigmaStorage} from "./EnigmaStorage.sol"; * Getter functions to be used by Enigma library to access state variables */ contract Getters is EnigmaStorage { + /** + * Get signing address of calling worker + * + * @return Signing address + */ function getSigningAddress() public view returns (address) { return state.workers[msg.sender].signer; } + /** + * Get Worker struct from a given worker's ethereum address + * + * @param _worker Worker's ethereum address + * @return Worker struct + */ function getWorker(address _worker) public view returns (EnigmaCommon.Worker memory) { return state.workers[_worker]; } + /** + * Get Worker struct from a given worker's signing address + * + * @param _signer Worker's signing address + * @return Ethereum address + * @return Worker struct + */ function getWorkerFromSigningAddress(address _signer) public view returns (address, EnigmaCommon.Worker memory) { address account; EnigmaCommon.Worker memory worker; @@ -31,23 +49,60 @@ contract Getters is EnigmaStorage { return (account, worker); } + /** + * Get the current number/index (used as unique nonce value) of task deployments for a given user user + * + * @param _sender Task sender's ethereum address + * @return Current number for task deployments for user + */ function getUserTaskDeployments(address _sender) public view returns (uint) { return state.userTaskDeployments[_sender]; } + /** + * Get the epoch block size + * + * @return Epoch size + */ function getEpochSize() public view returns (uint) { return state.epochSize; } + /** + * Get a TaskRecord struct given a particular task's ID + * + * @param _taskId Unique identifier for a given task + * @return TaskRecord struct + */ function getTaskRecord(bytes32 _taskId) public view returns (EnigmaCommon.TaskRecord memory) { return state.tasks[_taskId]; } + /** + * Get a SecretContract struct given a particular secret contract address + * + * @param _scAddr Secret contract address + * @return SecretContract struct + */ function getSecretContract(bytes32 _scAddr) public view returns (EnigmaCommon.SecretContract memory) { return state.contracts[_scAddr]; } + /** + * Get epoch-based history of worker params information + * + * @return Array of WorkersParams structs + */ function getWorkersParams() public view returns (EnigmaCommon.WorkersParams[5] memory) { return state.workersParams; } + + /** + * Get all secret contract addresses + * + * @return Array of secret contract addresses + */ + function getAllSecretContractAddresses() public view returns (bytes32[] memory) { + return state.scAddresses; + } } diff --git a/test/ethereum/scripts/contracts/impl/PrincipalImpl.sol b/test/ethereum/scripts/contracts/impl/PrincipalImpl.sol index c5a99869..36836c66 100644 --- a/test/ethereum/scripts/contracts/impl/PrincipalImpl.sol +++ b/test/ethereum/scripts/contracts/impl/PrincipalImpl.sol @@ -96,7 +96,7 @@ library PrincipalImpl { for (uint i = 0; i < maxLength; i++) { EnigmaCommon.Worker memory worker = state.workers[state.workerAddresses[i]]; - EnigmaCommon.WorkerLog memory workerLog = WorkersImpl.getLatestWorkerLogImpl(state, worker, _blockNumber); + EnigmaCommon.WorkerLog memory workerLog = WorkersImpl.getLatestWorkerLogImpl(worker, _blockNumber); if (((workerLog.workerEventType == EnigmaCommon.WorkerLogType.LogIn) || (workerLog.workerEventType == EnigmaCommon.WorkerLogType.Compound)) && worker.signer != state.principal) diff --git a/test/ethereum/scripts/contracts/impl/TaskImpl.sol b/test/ethereum/scripts/contracts/impl/TaskImpl.sol index 10963486..6e213a05 100644 --- a/test/ethereum/scripts/contracts/impl/TaskImpl.sol +++ b/test/ethereum/scripts/contracts/impl/TaskImpl.sol @@ -28,11 +28,12 @@ library TaskImpl { event TaskRecordsCreated(bytes32[] taskIds, bytes32[] inputsHashes, uint[] gasLimits, uint[] gasPxs, address sender, uint blockNumber); event SecretContractDeployed(bytes32 scAddr, bytes32 codeHash, bytes32 initStateDeltaHash); - event ReceiptVerified(bytes32 taskId, bytes32 stateDeltaHash, bytes32 outputHash, uint deltaHashIndex, - bytes optionalEthereumData, address optionalEthereumContractAddress, bytes sig); + event ReceiptVerified(bytes32 taskId, bytes32 stateDeltaHash, bytes32 outputHash, bytes32 scAddr, uint gasUsed, + uint deltaHashIndex, bytes optionalEthereumData, address optionalEthereumContractAddress, bytes sig); event ReceiptsVerified(bytes32[] taskIds, bytes32[] stateDeltaHashes, bytes32[] outputHashes, bytes _optionalEthereumData, address optionalEthereumContractAddress, bytes sig); event ReceiptFailed(bytes32 taskId, bytes sig); + event ReceiptFailedETH(bytes32 taskId, bytes sig); event TaskFeeReturned(bytes32 taskId); function createDeploymentTaskRecordImpl( @@ -77,8 +78,8 @@ library TaskImpl { emit TaskRecordCreated(taskId, _inputsHash, _gasLimit, _gasPx, msg.sender, block.number); } - function deploySecretContractFailureImpl(EnigmaState.State storage state, bytes32 _taskId, uint64 _gasUsed, - bytes memory _sig) + function deploySecretContractFailureImpl(EnigmaState.State storage state, bytes32 _taskId, bytes32 _codeHash, + uint64 _gasUsed, bytes memory _sig) public { EnigmaCommon.TaskRecord storage task = state.tasks[_taskId]; @@ -98,6 +99,7 @@ library TaskImpl { // Update proof and status attributes of TaskRecord task.proof = _sig; task.status = EnigmaCommon.TaskStatus.ReceiptFailed; + task.outputHash = _codeHash; //MOCK //transferFundsAfterTask(state, msg.sender, task.sender, _gasUsed, task.gasLimit.sub(_gasUsed), task.gasPx); @@ -114,26 +116,25 @@ library TaskImpl { emit ReceiptFailed(_taskId, _sig); } - function verifyDeployReceipt(EnigmaState.State storage state, bytes32 _taskId, uint _gasUsed, address _sender, - bytes memory _sig) + function verifyDeployReceipt(EnigmaState.State storage state, bytes32 _taskId, bytes32 _codeHash, + bytes32 _initStateDeltaHash, bytes memory _optionalEthereumData, address _optionalEthereumContractAddress, + uint64 _gasUsed, address _sender, bytes memory _sig) internal + view { - EnigmaCommon.TaskRecord storage task = state.tasks[_taskId]; - require(task.status == EnigmaCommon.TaskStatus.RecordCreated, 'Invalid task status'); - - EnigmaCommon.Worker memory worker = state.workers[_sender]; - // Worker deploying task must be the appropriate worker as per the worker selection algorithm - require(worker.signer == WorkersImpl.getWorkerGroupImpl(state, task.blockNumber, _taskId)[0], - "Not the selected worker for this task"); - - // Check that worker isn't charging the user too high of a fee - require(task.gasLimit >= _gasUsed, "Too much gas used for task"); - - // Update proof and status attributes of TaskRecord - task.proof = _sig; - task.status = EnigmaCommon.TaskStatus.ReceiptVerified; + validateReceipt(state, _gasUsed, _sender, _taskId, _taskId); - transferFundsAfterTask(state, _sender, task.sender, _gasUsed, task.gasLimit.sub(_gasUsed), task.gasPx); + // Verify the worker's signature + bytes memory message; + message = EnigmaCommon.appendMessage(message, state.tasks[_taskId].inputsHash.toBytes()); + message = EnigmaCommon.appendMessage(message, _codeHash.toBytes()); + message = EnigmaCommon.appendMessage(message, _initStateDeltaHash.toBytes()); + message = EnigmaCommon.appendMessage(message, _gasUsed.toBytesFromUint64()); + message = EnigmaCommon.appendMessage(message, _optionalEthereumData); + message = EnigmaCommon.appendMessage(message, _optionalEthereumContractAddress.toBytes()); + message = EnigmaCommon.appendMessage(message, hex"01"); + bytes32 msgHash = keccak256(message); + require(msgHash.recover(_sig) == state.workers[msg.sender].signer, "Invalid signature"); } function deploySecretContractImpl(EnigmaState.State storage state, bytes32 _taskId, bytes32 _preCodeHash, @@ -141,38 +142,43 @@ library TaskImpl { address _optionalEthereumContractAddress, uint64 _gasUsed, bytes memory _sig) public { - // MOCK - //verifyDeployReceipt(state, _taskId, _gasUsed, msg.sender, _sig); - EnigmaCommon.TaskRecord memory task = state.tasks[_taskId]; - - // MOCK - // Verify the worker's signature - //bytes memory message; - //message = EnigmaCommon.appendMessage(message, task.inputsHash.toBytes()); - //message = EnigmaCommon.appendMessage(message, _codeHash.toBytes()); - //message = EnigmaCommon.appendMessage(message, _initStateDeltaHash.toBytes()); - //message = EnigmaCommon.appendMessage(message, _gasUsed.toBytesFromUint64()); - //message = EnigmaCommon.appendMessage(message, _optionalEthereumData); - //message = EnigmaCommon.appendMessage(message, _optionalEthereumContractAddress.toBytes()); - //message = EnigmaCommon.appendMessage(message, hex"01"); - //bytes32 msgHash = keccak256(message); - //require(msgHash.recover(_sig) == state.workers[msg.sender].signer, "Invalid signature"); - - // Set the secret contract's attributes in registry EnigmaCommon.SecretContract storage secretContract = state.contracts[_taskId]; - secretContract.owner = task.sender; - secretContract.preCodeHash = _preCodeHash; - secretContract.codeHash = _codeHash; - secretContract.status = EnigmaCommon.SecretContractStatus.Deployed; - secretContract.stateDeltaHashes.push(_initStateDeltaHash); - state.scAddresses.push(_taskId); + EnigmaCommon.TaskRecord storage task = state.tasks[_taskId]; + // MOCK + //verifyDeployReceipt(state, _taskId, _codeHash, _initStateDeltaHash, _optionalEthereumData, + // _optionalEthereumContractAddress, _gasUsed, msg.sender, _sig); + task.proof = _sig; if (_optionalEthereumContractAddress != address(0)) { - (bool success,) = _optionalEthereumContractAddress.call(_optionalEthereumData); - require(success, "Ethereum call failed"); + require(gasleft() > 150000, "Not enough gas from worker for eth callback"); + (bool success,) = _optionalEthereumContractAddress.call.gas(gasleft().sub(100000))(_optionalEthereumData); + // MOCK + //transferFundsAfterTaskETH(state, msg.sender, task.gasLimit, task.gasPx); + if (success) { + task.status = EnigmaCommon.TaskStatus.ReceiptVerified; + secretContract.owner = task.sender; + secretContract.preCodeHash = _preCodeHash; + secretContract.codeHash = _codeHash; + secretContract.status = EnigmaCommon.SecretContractStatus.Deployed; + secretContract.stateDeltaHashes.push(_initStateDeltaHash); + state.scAddresses.push(_taskId); + emit SecretContractDeployed(_taskId, _codeHash, _initStateDeltaHash); + } else { + task.status = EnigmaCommon.TaskStatus.ReceiptFailedETH; + emit ReceiptFailedETH(_taskId, _sig); + } + } else { + // MOCK + //transferFundsAfterTask(state, msg.sender, task.sender, _gasUsed, task.gasLimit.sub(_gasUsed), task.gasPx); + task.status = EnigmaCommon.TaskStatus.ReceiptVerified; + secretContract.owner = task.sender; + secretContract.preCodeHash = _preCodeHash; + secretContract.codeHash = _codeHash; + secretContract.status = EnigmaCommon.SecretContractStatus.Deployed; + secretContract.stateDeltaHashes.push(_initStateDeltaHash); + state.scAddresses.push(_taskId); + emit SecretContractDeployed(_taskId, _codeHash, _initStateDeltaHash); } - - emit SecretContractDeployed(_taskId, _codeHash, _initStateDeltaHash); } function transferFundsAfterTask(EnigmaState.State storage state, address _worker, address _user, uint _gasUsed, @@ -186,6 +192,12 @@ library TaskImpl { "Token transfer failed"); } + function transferFundsAfterTaskETH(EnigmaState.State storage state, address _worker, uint _gasLimit, uint _gasPx) + internal { + // Credit worker with the fees associated with this task + state.workers[_worker].balance = state.workers[_worker].balance.add(_gasLimit.mul(_gasPx)); + } + function createTaskRecordImpl( EnigmaState.State storage state, bytes32 _inputsHash, @@ -225,6 +237,7 @@ library TaskImpl { EnigmaState.State storage state, bytes32 _scAddr, bytes32 _taskId, + bytes32 _outputHash, uint64 _gasUsed, bytes memory _sig ) @@ -248,6 +261,7 @@ library TaskImpl { // Update proof and status attributes of TaskRecord task.proof = _sig; task.status = EnigmaCommon.TaskStatus.ReceiptFailed; + task.outputHash = _outputHash; // MOCK //transferFundsAfterTask(state, msg.sender, task.sender, _gasUsed, task.gasLimit.sub(_gasUsed), task.gasPx); @@ -265,29 +279,50 @@ library TaskImpl { emit ReceiptFailed(_taskId, _sig); } - function verifyReceipt(EnigmaState.State storage state, bytes32 _scAddr, bytes32 _taskId, bytes32 _stateDeltaHash, uint _gasUsed, address _sender, - bytes memory _sig) + function validateReceipt(EnigmaState.State storage state, uint64 _gasUsed, address _sender, bytes32 _scAddr, + bytes32 _taskId) internal + view { - EnigmaCommon.TaskRecord storage task = state.tasks[_taskId]; + EnigmaCommon.Worker memory worker = state.workers[_sender]; + EnigmaCommon.TaskRecord memory task = state.tasks[_taskId]; // MOCK //require(task.status == EnigmaCommon.TaskStatus.RecordCreated, 'Invalid task status'); - EnigmaCommon.Worker memory worker = state.workers[_sender]; - // MOCK // Worker deploying task must be the appropriate worker as per the worker selection algorithm //require(worker.signer == WorkersImpl.getWorkerGroupImpl(state, task.blockNumber, _scAddr)[0], // "Not the selected worker for this task"); // Check that worker isn't charging the user too high of a fee //require(task.gasLimit >= _gasUsed, "Too much gas used for task"); + } - // Update proof and status attributes of TaskRecord - task.proof = _sig; - task.status = EnigmaCommon.TaskStatus.ReceiptVerified; + function verifyReceipt(EnigmaState.State storage state, bytes32 _scAddr, bytes32 _taskId, bytes32 _stateDeltaHash, + bytes32 _outputHash, bytes memory _optionalEthereumData, address _optionalEthereumContractAddress, + uint64 _gasUsed, address _sender, bytes memory _sig) + internal + view + { + EnigmaCommon.SecretContract memory secretContract = state.contracts[_scAddr]; + validateReceipt(state, _gasUsed, _sender, _scAddr, _taskId); + + bytes32 lastStateDeltaHash = secretContract.stateDeltaHashes[secretContract.stateDeltaHashes.length - 1]; + + // Verify the worker's signature + bytes memory message; + message = EnigmaCommon.appendMessage(message, secretContract.codeHash.toBytes()); + message = EnigmaCommon.appendMessage(message, state.tasks[_taskId].inputsHash.toBytes()); + message = EnigmaCommon.appendMessage(message, lastStateDeltaHash.toBytes()); + message = EnigmaCommon.appendMessage(message, _stateDeltaHash.toBytes()); + message = EnigmaCommon.appendMessage(message, _outputHash.toBytes()); + message = EnigmaCommon.appendMessage(message, _gasUsed.toBytesFromUint64()); + message = EnigmaCommon.appendMessage(message, _optionalEthereumData); + message = EnigmaCommon.appendMessage(message, _optionalEthereumContractAddress.toBytes()); + message = EnigmaCommon.appendMessage(message, hex"01"); + bytes32 msgHash = keccak256(message); // MOCK - //transferFundsAfterTask(state, _sender, task.sender, _gasUsed, task.gasLimit.sub(_gasUsed), task.gasPx); + //require(msgHash.recover(_sig) == state.workers[_sender].signer, "Invalid signature"); } function commitReceiptImpl( @@ -304,39 +339,39 @@ library TaskImpl { public { EnigmaCommon.SecretContract storage secretContract = state.contracts[_scAddr]; - // Obtain the last state delta hash the contract is aware of - bytes32 lastStateDeltaHash = secretContract.stateDeltaHashes[secretContract.stateDeltaHashes.length - 1]; + EnigmaCommon.TaskRecord storage task = state.tasks[_taskId]; // Verify the receipt - verifyReceipt(state, _scAddr, _taskId, _stateDeltaHash, _gasUsed, msg.sender, _sig); - - uint deltaHashIndex = _stateDeltaHash != bytes32(0) ? secretContract.stateDeltaHashes.push(_stateDeltaHash) - 1 : - 0; - state.tasks[_taskId].outputHash = _outputHash; - - // Verify the worker's signature - bytes memory message; - message = EnigmaCommon.appendMessage(message, secretContract.codeHash.toBytes()); - message = EnigmaCommon.appendMessage(message, state.tasks[_taskId].inputsHash.toBytes()); - message = EnigmaCommon.appendMessage(message, lastStateDeltaHash.toBytes()); - message = EnigmaCommon.appendMessage(message, _stateDeltaHash.toBytes()); - message = EnigmaCommon.appendMessage(message, _outputHash.toBytes()); - message = EnigmaCommon.appendMessage(message, _gasUsed.toBytesFromUint64()); - message = EnigmaCommon.appendMessage(message, _optionalEthereumData); - message = EnigmaCommon.appendMessage(message, _optionalEthereumContractAddress.toBytes()); - message = EnigmaCommon.appendMessage(message, hex"01"); - bytes32 msgHash = keccak256(message); - - // MOCK - //require(msgHash.recover(_sig) == state.workers[msg.sender].signer, "Invalid signature"); + verifyReceipt(state, _scAddr, _taskId, _stateDeltaHash, _outputHash, _optionalEthereumData, + _optionalEthereumContractAddress, _gasUsed, msg.sender, _sig); + task.proof = _sig; if (_optionalEthereumContractAddress != address(0)) { - (bool success,) = _optionalEthereumContractAddress.call(_optionalEthereumData); - require(success, "Ethereum call failed"); + require(gasleft() > 150000, "Not enough gas from worker for minimum eth callback"); + (bool success,) = _optionalEthereumContractAddress.call.gas(gasleft().sub(100000))(_optionalEthereumData); + // MOCK + //transferFundsAfterTaskETH(state, msg.sender, task.gasLimit, task.gasPx); + if (success) { + task.status = EnigmaCommon.TaskStatus.ReceiptVerified; + uint deltaHashIndex = _stateDeltaHash != bytes32(0) ? + secretContract.stateDeltaHashes.push(_stateDeltaHash) - 1 : 0; + state.tasks[_taskId].outputHash = _outputHash; + emit ReceiptVerified(_taskId, _stateDeltaHash, _outputHash, _scAddr, _gasUsed, deltaHashIndex, + _optionalEthereumData, _optionalEthereumContractAddress, _sig); + } else { + task.status = EnigmaCommon.TaskStatus.ReceiptFailedETH; + emit ReceiptFailedETH(_taskId, _sig); + } + } else { + // MOCK + //transferFundsAfterTask(state, msg.sender, task.sender, _gasUsed, task.gasLimit.sub(_gasUsed), task.gasPx); + task.status = EnigmaCommon.TaskStatus.ReceiptVerified; + uint deltaHashIndex = _stateDeltaHash != bytes32(0) ? + secretContract.stateDeltaHashes.push(_stateDeltaHash) - 1 : 0; + state.tasks[_taskId].outputHash = _outputHash; + emit ReceiptVerified(_taskId, _stateDeltaHash, _outputHash, _scAddr, _gasUsed, deltaHashIndex, + _optionalEthereumData, _optionalEthereumContractAddress, _sig); } - - emit ReceiptVerified(_taskId, _stateDeltaHash, _outputHash, deltaHashIndex, _optionalEthereumData, - _optionalEthereumContractAddress, _sig); } function createTaskRecordsImpl( @@ -376,55 +411,47 @@ library TaskImpl { emit TaskRecordsCreated(taskIds, _inputsHashes, _gasLimits, _gasPxs, msg.sender, block.number); } - function commitReceiptsImpl( - EnigmaState.State storage state, - bytes32 _scAddr, - bytes32[] memory _taskIds, - bytes32[] memory _stateDeltaHashes, - bytes32[] memory _outputHashes, - bytes memory _optionalEthereumData, - address _optionalEthereumContractAddress, - uint64[] memory _gasesUsed, - bytes memory _sig - ) - public + function verifyReceipts(EnigmaState.State storage state, bytes32 _scAddr, bytes32[] memory _taskIds, + bytes32[] memory _stateDeltaHashes, bytes32[] memory _outputHashes, bytes memory _optionalEthereumData, + address _optionalEthereumContractAddress, uint64[] memory _gasesUsed, address _sender, bytes memory _sig) + internal + view { + EnigmaCommon.SecretContract memory secretContract = state.contracts[_scAddr]; bytes32[] memory inputsHashes = new bytes32[](_taskIds.length); - EnigmaCommon.SecretContract storage secretContract = state.contracts[_scAddr]; - // Obtain the last state delta hash the contract is aware of - bytes32 lastStateDeltaHash = secretContract.stateDeltaHashes[secretContract.stateDeltaHashes.length - 1]; - for (uint i = 0; i < _taskIds.length; i++) { - // Verify the receipt - verifyReceipt(state, _scAddr, _taskIds[i], _stateDeltaHashes[i], _gasesUsed[i], msg.sender, _sig); - inputsHashes[i] = state.tasks[_taskIds[i]].inputsHash; + validateReceipt(state, _gasesUsed[i], _sender, _scAddr, _taskIds[i]); - // Append the new state delta hash - secretContract.stateDeltaHashes.push(_stateDeltaHashes[i]); - state.tasks[_taskIds[i]].outputHash = _outputHashes[i]; + inputsHashes[i] = state.tasks[_taskIds[i]].inputsHash; } - // Verify the worker's signature - bytes32 msgHash = keccak256(abi.encodePacked(secretContract.codeHash, - inputsHashes, - lastStateDeltaHash, - _stateDeltaHashes, - _outputHashes, - _gasesUsed, - uint64(_optionalEthereumData.length), _optionalEthereumData, - uint64(20), _optionalEthereumContractAddress, - bytes1(0x01))); - - // MOCK - //require(msgHash.recover(_sig) == state.workers[msg.sender].signer, "Invalid signature"); + bytes32 lastStateDeltaHash = secretContract.stateDeltaHashes[secretContract.stateDeltaHashes.length - 1]; - if (_optionalEthereumContractAddress != address(0)) { - (bool success,) = _optionalEthereumContractAddress.call(_optionalEthereumData); - require(success, "Ethereum call failed"); + // Verify the principal's signature + bytes memory message; + message = EnigmaCommon.appendMessage(message, secretContract.codeHash.toBytes()); + message = EnigmaCommon.appendMessageArrayLength(inputsHashes.length, message); + for (uint i = 0; i < inputsHashes.length; i++) { + message = EnigmaCommon.appendMessage(message, inputsHashes[i].toBytes()); } - - emit ReceiptsVerified(_taskIds, _stateDeltaHashes, _outputHashes, _optionalEthereumData, - _optionalEthereumContractAddress, _sig); + message = EnigmaCommon.appendMessage(message, lastStateDeltaHash.toBytes()); + message = EnigmaCommon.appendMessageArrayLength(_stateDeltaHashes.length, message); + for (uint j = 0; j < _stateDeltaHashes.length; j++) { + message = EnigmaCommon.appendMessage(message, _stateDeltaHashes[j].toBytes()); + } + message = EnigmaCommon.appendMessageArrayLength(_outputHashes.length, message); + for (uint k = 0; k < _outputHashes.length; k++) { + message = EnigmaCommon.appendMessage(message, _outputHashes[k].toBytes()); + } + message = EnigmaCommon.appendMessageArrayLength(_gasesUsed.length, message); + for (uint m = 0; m < _gasesUsed.length; m++) { + message = EnigmaCommon.appendMessage(message, _gasesUsed[m].toBytesFromUint64()); + } + message = EnigmaCommon.appendMessage(message, _optionalEthereumData); + message = EnigmaCommon.appendMessage(message, _optionalEthereumContractAddress.toBytes()); + message = EnigmaCommon.appendMessage(message, hex"01"); + bytes32 msgHash = keccak256(message); + require(msgHash.recover(_sig) == state.workers[_sender].signer, "Invalid signature"); } function returnFeesForTaskImpl( @@ -442,7 +469,7 @@ library TaskImpl { require(state.engToken.transfer(task.sender, task.gasLimit.mul(task.gasPx)), "Token transfer failed"); // Set task's status to ReceiptFailed and emit event - task.status = EnigmaCommon.TaskStatus.ReceiptFailed; + task.status = EnigmaCommon.TaskStatus.ReceiptFailedReturn; emit TaskFeeReturned(_taskId); } } diff --git a/test/ethereum/scripts/contracts/impl/WorkersImpl.sol b/test/ethereum/scripts/contracts/impl/WorkersImpl.sol index fa4db402..3ee32ed9 100644 --- a/test/ethereum/scripts/contracts/impl/WorkersImpl.sol +++ b/test/ethereum/scripts/contracts/impl/WorkersImpl.sol @@ -286,10 +286,9 @@ library WorkersImpl { return selectedWorkers; } - function getLatestWorkerLogImpl(EnigmaState.State storage state, EnigmaCommon.Worker memory worker, - uint _blockNumber) + function getLatestWorkerLogImpl(EnigmaCommon.Worker memory worker, uint _blockNumber) public - view + pure returns (EnigmaCommon.WorkerLog memory) { EnigmaCommon.WorkerLog memory workerLog; for (uint i = worker.workerLogs.length; i > 0; i--) { diff --git a/test/ethereum/scripts/includes/build/BasicToken.json b/test/ethereum/scripts/includes/build/BasicToken.json deleted file mode 100644 index 00e0c0a3..00000000 --- a/test/ethereum/scripts/includes/build/BasicToken.json +++ /dev/null @@ -1,2580 +0,0 @@ -{ - "contractName": "BasicToken", - "abi": [ - { - "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" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "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": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b5061027a806100206000396000f3006080604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318160ddd811461005b57806370a0823114610082578063a9059cbb146100b0575b600080fd5b34801561006757600080fd5b506100706100f5565b60408051918252519081900360200190f35b34801561008e57600080fd5b5061007073ffffffffffffffffffffffffffffffffffffffff600435166100fb565b3480156100bc57600080fd5b506100e173ffffffffffffffffffffffffffffffffffffffff60043516602435610123565b604080519115158252519081900360200190f35b60015490565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b3360009081526020819052604081205482111561013f57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316151561016157600080fd5b33600090815260208190526040902054610181908363ffffffff61022916565b336000908152602081905260408082209290925573ffffffffffffffffffffffffffffffffffffffff8516815220546101c0908363ffffffff61023b16565b73ffffffffffffffffffffffffffffffffffffffff8416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60008282111561023557fe5b50900390565b8181018281101561024857fe5b929150505600a165627a7a7230582035b5921d1c34612d3393e559911a761ff3e83433d8cb40bf98cbfc5bd8a4a9ab0029", - "deployedBytecode": "0x6080604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318160ddd811461005b57806370a0823114610082578063a9059cbb146100b0575b600080fd5b34801561006757600080fd5b506100706100f5565b60408051918252519081900360200190f35b34801561008e57600080fd5b5061007073ffffffffffffffffffffffffffffffffffffffff600435166100fb565b3480156100bc57600080fd5b506100e173ffffffffffffffffffffffffffffffffffffffff60043516602435610123565b604080519115158252519081900360200190f35b60015490565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b3360009081526020819052604081205482111561013f57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316151561016157600080fd5b33600090815260208190526040902054610181908363ffffffff61022916565b336000908152602081905260408082209290925573ffffffffffffffffffffffffffffffffffffffff8516815220546101c0908363ffffffff61023b16565b73ffffffffffffffffffffffffffffffffffffffff8416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60008282111561023557fe5b50900390565b8181018281101561024857fe5b929150505600a165627a7a7230582035b5921d1c34612d3393e559911a761ff3e83433d8cb40bf98cbfc5bd8a4a9ab0029", - "sourceMap": "180:1071:8:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;180:1071:8;;;;;;;", - "deployedSourceMap": "180:1071:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;389:83;;8:9:-1;5:2;;;30:1;27;20:12;5:2;389:83:8;;;;;;;;;;;;;;;;;;;;1149:99;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1149:99:8;;;;;;;626:321;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;626:321:8;;;;;;;;;;;;;;;;;;;;;;;;;;;389:83;455:12;;389:83;:::o;1149:99::-;1227:16;;1205:7;1227:16;;;;;;;;;;;;1149:99::o;626:321::-;728:10;689:4;719:20;;;;;;;;;;;709:30;;;701:39;;;;;;754:17;;;;;746:26;;;;;;811:10;802:8;:20;;;;;;;;;;;:32;;827:6;802:32;:24;:32;:::i;:::-;788:10;779:8;:20;;;;;;;;;;;:55;;;;:20;856:13;;;;;;:25;;874:6;856:25;:17;:25;:::i;:::-;840:13;;;:8;:13;;;;;;;;;;;;:41;;;;892:33;;;;;;;840:13;;901:10;;892:33;;;;;;;;;;-1:-1:-1;938:4:8;626:321;;;;:::o;1060:116:7:-;1120:7;1142:8;;;;1135:16;;;;-1:-1:-1;1164:7:7;;;1060:116::o;1238:128::-;1319:7;;;1339;;;;1332:15;;;;1238:128;;;;:::o", - "source": "pragma solidity ^0.4.24;\n\n\nimport \"./ERC20Basic.sol\";\nimport \"../../math/SafeMath.sol\";\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) internal balances;\n\n uint256 internal totalSupply_;\n\n /**\n * @dev Total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev Transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_value <= balances[msg.sender]);\n require(_to != address(0));\n\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n emit Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256) {\n return balances[_owner];\n }\n\n}\n", - "sourcePath": "openzeppelin-solidity/contracts/token/ERC20/BasicToken.sol", - "ast": { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/BasicToken.sol", - "exportedSymbols": { - "BasicToken": [ - 3111 - ] - }, - "id": 3112, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 3017, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:8" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol", - "file": "./ERC20Basic.sol", - "id": 3018, - "nodeType": "ImportDirective", - "scope": 3112, - "sourceUnit": 3187, - "src": "27:26:8", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "file": "../../math/SafeMath.sol", - "id": 3019, - "nodeType": "ImportDirective", - "scope": 3112, - "sourceUnit": 3016, - "src": "54:33:8", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3020, - "name": "ERC20Basic", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3186, - "src": "203:10:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20Basic_$3186", - "typeString": "contract ERC20Basic" - } - }, - "id": 3021, - "nodeType": "InheritanceSpecifier", - "src": "203:10:8" - } - ], - "contractDependencies": [ - 3186 - ], - "contractKind": "contract", - "documentation": "@title Basic token\n@dev Basic version of StandardToken, with no allowances.", - "fullyImplemented": true, - "id": 3111, - "linearizedBaseContracts": [ - 3111, - 3186 - ], - "name": "BasicToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 3024, - "libraryName": { - "contractScope": null, - "id": 3022, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3015, - "src": "224:8:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$3015", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "218:27:8", - "typeName": { - "id": 3023, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "237:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "constant": false, - "id": 3028, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 3111, - "src": "249:45:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 3027, - "keyType": { - "id": 3025, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "257:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "249:27:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 3026, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "268:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3030, - "name": "totalSupply_", - "nodeType": "VariableDeclaration", - "scope": 3111, - "src": "299:29:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3029, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "299:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": { - "id": 3037, - "nodeType": "Block", - "src": "442:30:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3035, - "name": "totalSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3030, - "src": "455:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3034, - "id": 3036, - "nodeType": "Return", - "src": "448:19:8" - } - ] - }, - "documentation": "@dev Total number of tokens in existence", - "id": 3038, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3031, - "nodeType": "ParameterList", - "parameters": [], - "src": "409:2:8" - }, - "payable": false, - "returnParameters": { - "id": 3034, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3033, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3038, - "src": "433:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3032, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "433:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "432:9:8" - }, - "scope": 3111, - "src": "389:83:8", - "stateMutability": "view", - "superFunction": 3161, - "visibility": "public" - }, - { - "body": { - "id": 3097, - "nodeType": "Block", - "src": "695:252:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3053, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3048, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3042, - "src": "709:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3049, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "719:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3052, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3050, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "728:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "728:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "719:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "709:30:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 3047, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3451, - "src": "701:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 3054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "701:39:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3055, - "nodeType": "ExpressionStatement", - "src": "701:39:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3061, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3057, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3040, - "src": "754:3:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3059, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "769:1:8", - "subdenomination": null, - "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": 3058, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "761:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3060, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "761:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "754:17:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 3056, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3451, - "src": "746:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 3062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "746:26:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3063, - "nodeType": "ExpressionStatement", - "src": "746:26:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 3075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3064, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "779:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3067, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3065, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "788:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3066, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "788:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "779:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3073, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3042, - "src": "827:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3068, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "802:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3071, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3069, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "811:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "811:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "802:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "802:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3074, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "802:32:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "779:55:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3076, - "nodeType": "ExpressionStatement", - "src": "779:55:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 3086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3077, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "840:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3079, - "indexExpression": { - "argumentTypes": null, - "id": 3078, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3040, - "src": "849:3:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "840:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3084, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3042, - "src": "874:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3080, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "856:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3082, - "indexExpression": { - "argumentTypes": null, - "id": 3081, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3040, - "src": "865:3:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "856:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3083, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "856:17:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3085, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "856:25:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "840:41:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3087, - "nodeType": "ExpressionStatement", - "src": "840:41:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3089, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "901:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3090, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "901:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3091, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3040, - "src": "913:3:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3092, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3042, - "src": "918:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3088, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3185, - "src": "892:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "892:33:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3094, - "nodeType": "EmitStatement", - "src": "887:38:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3095, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "938:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3046, - "id": 3096, - "nodeType": "Return", - "src": "931:11:8" - } - ] - }, - "documentation": "@dev Transfer token for a specified address\n@param _to The address to transfer to.\n@param _value The amount to be transferred.", - "id": 3098, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3043, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3040, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 3098, - "src": "644:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3039, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3042, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 3098, - "src": "657:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3041, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "657:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "643:29:8" - }, - "payable": false, - "returnParameters": { - "id": 3046, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3045, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3098, - "src": "689:4:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3044, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "689:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "688:6:8" - }, - "scope": 3111, - "src": "626:321:8", - "stateMutability": "nonpayable", - "superFunction": 3177, - "visibility": "public" - }, - { - "body": { - "id": 3109, - "nodeType": "Block", - "src": "1214:34:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3105, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "1227:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3107, - "indexExpression": { - "argumentTypes": null, - "id": 3106, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3100, - "src": "1236:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1227:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3104, - "id": 3108, - "nodeType": "Return", - "src": "1220:23:8" - } - ] - }, - "documentation": "@dev Gets the balance of the specified address.\n@param _owner The address to query the the balance of.\n@return An uint256 representing the amount owned by the passed address.", - "id": 3110, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3101, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3100, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 3110, - "src": "1168:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3099, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1168:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1167:16:8" - }, - "payable": false, - "returnParameters": { - "id": 3104, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3103, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3110, - "src": "1205:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3102, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1205:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1204:9:8" - }, - "scope": 3111, - "src": "1149:99:8", - "stateMutability": "view", - "superFunction": 3168, - "visibility": "public" - } - ], - "scope": 3112, - "src": "180:1071:8" - } - ], - "src": "0:1252:8" - }, - "legacyAST": { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/BasicToken.sol", - "exportedSymbols": { - "BasicToken": [ - 3111 - ] - }, - "id": 3112, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 3017, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:8" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol", - "file": "./ERC20Basic.sol", - "id": 3018, - "nodeType": "ImportDirective", - "scope": 3112, - "sourceUnit": 3187, - "src": "27:26:8", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "file": "../../math/SafeMath.sol", - "id": 3019, - "nodeType": "ImportDirective", - "scope": 3112, - "sourceUnit": 3016, - "src": "54:33:8", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3020, - "name": "ERC20Basic", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3186, - "src": "203:10:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20Basic_$3186", - "typeString": "contract ERC20Basic" - } - }, - "id": 3021, - "nodeType": "InheritanceSpecifier", - "src": "203:10:8" - } - ], - "contractDependencies": [ - 3186 - ], - "contractKind": "contract", - "documentation": "@title Basic token\n@dev Basic version of StandardToken, with no allowances.", - "fullyImplemented": true, - "id": 3111, - "linearizedBaseContracts": [ - 3111, - 3186 - ], - "name": "BasicToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 3024, - "libraryName": { - "contractScope": null, - "id": 3022, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3015, - "src": "224:8:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$3015", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "218:27:8", - "typeName": { - "id": 3023, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "237:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "constant": false, - "id": 3028, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 3111, - "src": "249:45:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 3027, - "keyType": { - "id": 3025, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "257:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "249:27:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 3026, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "268:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3030, - "name": "totalSupply_", - "nodeType": "VariableDeclaration", - "scope": 3111, - "src": "299:29:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3029, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "299:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": { - "id": 3037, - "nodeType": "Block", - "src": "442:30:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3035, - "name": "totalSupply_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3030, - "src": "455:12:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3034, - "id": 3036, - "nodeType": "Return", - "src": "448:19:8" - } - ] - }, - "documentation": "@dev Total number of tokens in existence", - "id": 3038, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3031, - "nodeType": "ParameterList", - "parameters": [], - "src": "409:2:8" - }, - "payable": false, - "returnParameters": { - "id": 3034, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3033, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3038, - "src": "433:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3032, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "433:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "432:9:8" - }, - "scope": 3111, - "src": "389:83:8", - "stateMutability": "view", - "superFunction": 3161, - "visibility": "public" - }, - { - "body": { - "id": 3097, - "nodeType": "Block", - "src": "695:252:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3053, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3048, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3042, - "src": "709:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3049, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "719:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3052, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3050, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "728:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3051, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "728:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "719:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "709:30:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 3047, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3451, - "src": "701:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 3054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "701:39:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3055, - "nodeType": "ExpressionStatement", - "src": "701:39:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3061, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3057, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3040, - "src": "754:3:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3059, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "769:1:8", - "subdenomination": null, - "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": 3058, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "761:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3060, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "761:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "754:17:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 3056, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3451, - "src": "746:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 3062, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "746:26:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3063, - "nodeType": "ExpressionStatement", - "src": "746:26:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 3075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3064, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "779:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3067, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3065, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "788:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3066, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "788:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "779:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3073, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3042, - "src": "827:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3068, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "802:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3071, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3069, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "811:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3070, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "811:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "802:20:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3072, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "802:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3074, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "802:32:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "779:55:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3076, - "nodeType": "ExpressionStatement", - "src": "779:55:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 3086, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3077, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "840:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3079, - "indexExpression": { - "argumentTypes": null, - "id": 3078, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3040, - "src": "849:3:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "840:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3084, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3042, - "src": "874:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3080, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "856:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3082, - "indexExpression": { - "argumentTypes": null, - "id": 3081, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3040, - "src": "865:3:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "856:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3083, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "856:17:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3085, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "856:25:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "840:41:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3087, - "nodeType": "ExpressionStatement", - "src": "840:41:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3089, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "901:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3090, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "901:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3091, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3040, - "src": "913:3:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3092, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3042, - "src": "918:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3088, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3185, - "src": "892:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "892:33:8", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3094, - "nodeType": "EmitStatement", - "src": "887:38:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3095, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "938:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3046, - "id": 3096, - "nodeType": "Return", - "src": "931:11:8" - } - ] - }, - "documentation": "@dev Transfer token for a specified address\n@param _to The address to transfer to.\n@param _value The amount to be transferred.", - "id": 3098, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3043, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3040, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 3098, - "src": "644:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3039, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3042, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 3098, - "src": "657:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3041, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "657:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "643:29:8" - }, - "payable": false, - "returnParameters": { - "id": 3046, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3045, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3098, - "src": "689:4:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3044, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "689:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "688:6:8" - }, - "scope": 3111, - "src": "626:321:8", - "stateMutability": "nonpayable", - "superFunction": 3177, - "visibility": "public" - }, - { - "body": { - "id": 3109, - "nodeType": "Block", - "src": "1214:34:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3105, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "1227:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3107, - "indexExpression": { - "argumentTypes": null, - "id": 3106, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3100, - "src": "1236:6:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1227:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3104, - "id": 3108, - "nodeType": "Return", - "src": "1220:23:8" - } - ] - }, - "documentation": "@dev Gets the balance of the specified address.\n@param _owner The address to query the the balance of.\n@return An uint256 representing the amount owned by the passed address.", - "id": 3110, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3101, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3100, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 3110, - "src": "1168:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3099, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1168:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1167:16:8" - }, - "payable": false, - "returnParameters": { - "id": 3104, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3103, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3110, - "src": "1205:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3102, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1205:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1204:9:8" - }, - "scope": 3111, - "src": "1149:99:8", - "stateMutability": "view", - "superFunction": 3168, - "visibility": "public" - } - ], - "scope": 3112, - "src": "180:1071:8" - } - ], - "src": "0:1252:8" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "2.0.0", - "updatedAt": "2018-10-10T12:57:03.070Z" -} \ No newline at end of file diff --git a/test/ethereum/scripts/includes/build/Billionare.json b/test/ethereum/scripts/includes/build/Billionare.json deleted file mode 100644 index 3d28b9c6..00000000 --- a/test/ethereum/scripts/includes/build/Billionare.json +++ /dev/null @@ -1,2097 +0,0 @@ -{ - "contractName": "Billionare", - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "n_one", - "type": "string" - }, - { - "name": "one", - "type": "uint256" - }, - { - "name": "n_two", - "type": "string" - }, - { - "name": "two", - "type": "uint256" - }, - { - "name": "n_three", - "type": "string" - }, - { - "name": "three", - "type": "uint256" - } - ], - "name": "check", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "name", - "type": "string" - } - ], - "name": "commit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "get_winner", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "clear_winner", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b5061045e806100206000396000f3006080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631f59446f81146100665780637bcd540f1461008d5780639867db74146101e5578063bb4c4f1c14610240575b600080fd5b34801561007257600080fd5b5061007b610255565b60408051918252519081900360200190f35b34801561009957600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261017094369492936024939284019190819084018382808284375050604080516020601f818a01358b0180359182018390048302840183018552818452989b8a359b909a90999401975091955091820193509150819084018382808284375050604080516020601f818a01358b0180359182018390048302840183018552818452989b8a359b909a90999401975091955091820193509150819084018382808284375094975050933594506102689350505050565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101aa578181015183820152602001610192565b50505050905090810190601f1680156101d75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101f157600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261023e9436949293602493928401919081908401838280828437509497506102a69650505050505050565b005b34801561024c57600080fd5b506101706102bd565b60006102618180610353565b5060005b90565b60608686851080159061027b5750828510155b156102835750845b8483101580156102935750868310155b1561029b5750825b979650505050505050565b80516102b990600090602084019061039a565b5050565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103495780601f1061031e57610100808354040283529160200191610349565b820191906000526020600020905b81548152906001019060200180831161032c57829003601f168201915b5050505050905090565b50805460018160011615610100020316600290046000825580601f106103795750610397565b601f0160209004906000526020600020908101906103979190610418565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106103db57805160ff1916838001178555610408565b82800160010185558215610408579182015b828111156104085782518255916020019190600101906103ed565b50610414929150610418565b5090565b61026591905b80821115610414576000815560010161041e5600a165627a7a72305820ab8026c686ba9b2099e4d3209e1a32264caeffe880784900c87bf5593d6f044c0029", - "deployedBytecode": "0x6080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631f59446f81146100665780637bcd540f1461008d5780639867db74146101e5578063bb4c4f1c14610240575b600080fd5b34801561007257600080fd5b5061007b610255565b60408051918252519081900360200190f35b34801561009957600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261017094369492936024939284019190819084018382808284375050604080516020601f818a01358b0180359182018390048302840183018552818452989b8a359b909a90999401975091955091820193509150819084018382808284375050604080516020601f818a01358b0180359182018390048302840183018552818452989b8a359b909a90999401975091955091820193509150819084018382808284375094975050933594506102689350505050565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101aa578181015183820152602001610192565b50505050905090810190601f1680156101d75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101f157600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261023e9436949293602493928401919081908401838280828437509497506102a69650505050505050565b005b34801561024c57600080fd5b506101706102bd565b60006102618180610353565b5060005b90565b60608686851080159061027b5750828510155b156102835750845b8483101580156102935750868310155b1561029b5750825b979650505050505050565b80516102b990600090602084019061039a565b5050565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103495780601f1061031e57610100808354040283529160200191610349565b820191906000526020600020905b81548152906001019060200180831161032c57829003601f168201915b5050505050905090565b50805460018160011615610100020316600290046000825580601f106103795750610397565b601f0160209004906000526020600020908101906103979190610418565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106103db57805160ff1916838001178555610408565b82800160010185558215610408579182015b828111156104085782518255916020019190600101906103ed565b50610414929150610418565b5090565b61026591905b80821115610414576000815560010161041e5600a165627a7a72305820ab8026c686ba9b2099e4d3209e1a32264caeffe880784900c87bf5593d6f044c0029", - "sourceMap": "26:727:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26:727:0;;;;;;;", - "deployedSourceMap": "26:727:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;658:93;;8:9:-1;5:2;;;30:1;27;20:12;5:2;658:93:0;;;;;;;;;;;;;;;;;;;;71:423;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;71:423:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;71:423:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;71:423:0;;-1:-1:-1;71:423:0;;;;-1:-1:-1;71:423:0;-1:-1:-1;71:423:0;;;;;;;;;;-1:-1:-1;;71:423:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;71:423:0;;-1:-1:-1;71:423:0;;;;-1:-1:-1;71:423:0;-1:-1:-1;71:423:0;;;;;;;;;;-1:-1:-1;71:423:0;;-1:-1:-1;;71:423:0;;;-1:-1:-1;71:423:0;;-1:-1:-1;;;;71:423:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;71:423:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;500:66;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;500:66:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;500:66:0;;-1:-1:-1;500:66:0;;-1:-1:-1;;;;;;;500:66:0;;;572:80;;8:9:-1;5:2;;;30:1;27;20:12;5:2;572:80:0;;;;658:93;697:4;713:13;697:4;;713:13;:::i;:::-;-1:-1:-1;743:1:0;658:93;;:::o;71:423::-;261:6;303:5;322:10;;;;;;:26;;;343:5;336:3;:12;;322:26;318:68;;;-1:-1:-1;370:5:0;318:68;408:3;399:5;:12;;:28;;;;;424:3;415:5;:12;;399:28;395:72;;;-1:-1:-1;449:7:0;395:72;484:3;71:423;-1:-1:-1;;;;;;;71:423:0:o;500:66::-;546:13;;;;:6;;:13;;;;;:::i;:::-;;500:66;:::o;572:80::-;639:6;632:13;;;;;;;;-1:-1:-1;;632:13:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;614:6;;632:13;;639:6;;632:13;;639:6;632:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;572:80;:::o;26:727::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;26:727:0;;;-1:-1:-1;26:727:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;", - "source": "pragma solidity ^0.4.24;\n\ncontract Billionare {\n string winner;\n function check(\n string n_one,\n uint one,\n string n_two,\n uint two,\n string n_three,\n uint three\n )\n public\n pure\n returns (string)\n {\n string memory max = n_one;\n if (two >= one && two >= three) {\n max = n_two;\n }\n if (three >= two && three >= one) {\n max = n_three;\n }\n\n return max;\n }\n\n function commit(string name) public {\n winner = name;\n }\n\n function get_winner() public view returns(string) {\n return winner;\n }\n\n function clear_winner() public returns(uint) {\n delete winner;\n return 0;\n }\n}", - "sourcePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/Billionare.sol", - "ast": { - "absolutePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/Billionare.sol", - "exportedSymbols": { - "Billionare": [ - 83 - ] - }, - "id": 84, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:0" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 83, - "linearizedBaseContracts": [ - 83 - ], - "name": "Billionare", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 3, - "name": "winner", - "nodeType": "VariableDeclaration", - "scope": 83, - "src": "52:13:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 2, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "52:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": { - "id": 52, - "nodeType": "Block", - "src": "273:221:0", - "statements": [ - { - "assignments": [ - 21 - ], - "declarations": [ - { - "constant": false, - "id": 21, - "name": "max", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "283:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 20, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "283:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 23, - "initialValue": { - "argumentTypes": null, - "id": 22, - "name": "n_one", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5, - "src": "303:5:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "283:25:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 30, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 26, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 24, - "name": "two", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "322:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 25, - "name": "one", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "329:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "322:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 27, - "name": "two", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "336:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 28, - "name": "three", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "343:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "336:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "322:26:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 36, - "nodeType": "IfStatement", - "src": "318:68:0", - "trueBody": { - "id": 35, - "nodeType": "Block", - "src": "350:36:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 33, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 31, - "name": "max", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "364:3:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 32, - "name": "n_two", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "370:5:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "364:11:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "id": 34, - "nodeType": "ExpressionStatement", - "src": "364:11:0" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 43, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 39, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 37, - "name": "three", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "399:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 38, - "name": "two", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "408:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "399:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 42, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 40, - "name": "three", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "415:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 41, - "name": "one", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "424:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "415:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "399:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 49, - "nodeType": "IfStatement", - "src": "395:72:0", - "trueBody": { - "id": 48, - "nodeType": "Block", - "src": "429:38:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 44, - "name": "max", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "443:3:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 45, - "name": "n_three", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "449:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "443:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "id": 47, - "nodeType": "ExpressionStatement", - "src": "443:13:0" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 50, - "name": "max", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "484:3:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 19, - "id": 51, - "nodeType": "Return", - "src": "477:10:0" - } - ] - }, - "documentation": null, - "id": 53, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "check", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5, - "name": "n_one", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "95:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "95:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7, - "name": "one", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "117:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "117:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9, - "name": "n_two", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "135:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 8, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "135:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11, - "name": "two", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "157:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "157:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13, - "name": "n_three", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "175:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "175:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15, - "name": "three", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "199:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "199:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "85:130:0" - }, - "payable": false, - "returnParameters": { - "id": 19, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "261:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "261:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "260:8:0" - }, - "scope": 83, - "src": "71:423:0", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 62, - "nodeType": "Block", - "src": "536:30:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 60, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 58, - "name": "winner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "546:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 59, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "555:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "546:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 61, - "nodeType": "ExpressionStatement", - "src": "546:13:0" - } - ] - }, - "documentation": null, - "id": 63, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "commit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 56, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 55, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 63, - "src": "516:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 54, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "516:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "515:13:0" - }, - "payable": false, - "returnParameters": { - "id": 57, - "nodeType": "ParameterList", - "parameters": [], - "src": "536:0:0" - }, - "scope": 83, - "src": "500:66:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 70, - "nodeType": "Block", - "src": "622:30:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 68, - "name": "winner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "639:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 67, - "id": 69, - "nodeType": "Return", - "src": "632:13:0" - } - ] - }, - "documentation": null, - "id": 71, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "get_winner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 64, - "nodeType": "ParameterList", - "parameters": [], - "src": "591:2:0" - }, - "payable": false, - "returnParameters": { - "id": 67, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 66, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 71, - "src": "614:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 65, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "614:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "613:8:0" - }, - "scope": 83, - "src": "572:80:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 81, - "nodeType": "Block", - "src": "703:48:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 77, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "delete", - "prefix": true, - "src": "713:13:0", - "subExpression": { - "argumentTypes": null, - "id": 76, - "name": "winner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "720:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 78, - "nodeType": "ExpressionStatement", - "src": "713:13:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 79, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "743:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 75, - "id": 80, - "nodeType": "Return", - "src": "736:8:0" - } - ] - }, - "documentation": null, - "id": 82, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "clear_winner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 72, - "nodeType": "ParameterList", - "parameters": [], - "src": "679:2:0" - }, - "payable": false, - "returnParameters": { - "id": 75, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 74, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 82, - "src": "697:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 73, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "697:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "696:6:0" - }, - "scope": 83, - "src": "658:93:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 84, - "src": "26:727:0" - } - ], - "src": "0:753:0" - }, - "legacyAST": { - "absolutePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/Billionare.sol", - "exportedSymbols": { - "Billionare": [ - 83 - ] - }, - "id": 84, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:0" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 83, - "linearizedBaseContracts": [ - 83 - ], - "name": "Billionare", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 3, - "name": "winner", - "nodeType": "VariableDeclaration", - "scope": 83, - "src": "52:13:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 2, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "52:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": { - "id": 52, - "nodeType": "Block", - "src": "273:221:0", - "statements": [ - { - "assignments": [ - 21 - ], - "declarations": [ - { - "constant": false, - "id": 21, - "name": "max", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "283:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 20, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "283:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 23, - "initialValue": { - "argumentTypes": null, - "id": 22, - "name": "n_one", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5, - "src": "303:5:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "283:25:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 30, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 26, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 24, - "name": "two", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "322:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 25, - "name": "one", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "329:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "322:10:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 27, - "name": "two", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "336:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 28, - "name": "three", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "343:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "336:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "322:26:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 36, - "nodeType": "IfStatement", - "src": "318:68:0", - "trueBody": { - "id": 35, - "nodeType": "Block", - "src": "350:36:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 33, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 31, - "name": "max", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "364:3:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 32, - "name": "n_two", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "370:5:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "364:11:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "id": 34, - "nodeType": "ExpressionStatement", - "src": "364:11:0" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 43, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 39, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 37, - "name": "three", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "399:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 38, - "name": "two", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 11, - "src": "408:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "399:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 42, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 40, - "name": "three", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "415:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 41, - "name": "one", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "424:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "415:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "399:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 49, - "nodeType": "IfStatement", - "src": "395:72:0", - "trueBody": { - "id": 48, - "nodeType": "Block", - "src": "429:38:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 44, - "name": "max", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "443:3:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 45, - "name": "n_three", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "449:7:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "443:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "id": 47, - "nodeType": "ExpressionStatement", - "src": "443:13:0" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 50, - "name": "max", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "484:3:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "functionReturnParameters": 19, - "id": 51, - "nodeType": "Return", - "src": "477:10:0" - } - ] - }, - "documentation": null, - "id": 53, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "check", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 16, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 5, - "name": "n_one", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "95:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 4, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "95:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 7, - "name": "one", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "117:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "117:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 9, - "name": "n_two", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "135:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 8, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "135:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 11, - "name": "two", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "157:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 10, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "157:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 13, - "name": "n_three", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "175:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 12, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "175:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 15, - "name": "three", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "199:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 14, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "199:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "85:130:0" - }, - "payable": false, - "returnParameters": { - "id": 19, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 18, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 53, - "src": "261:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 17, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "261:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "260:8:0" - }, - "scope": 83, - "src": "71:423:0", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 62, - "nodeType": "Block", - "src": "536:30:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 60, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 58, - "name": "winner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "546:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 59, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "555:4:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "546:13:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 61, - "nodeType": "ExpressionStatement", - "src": "546:13:0" - } - ] - }, - "documentation": null, - "id": 63, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "commit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 56, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 55, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 63, - "src": "516:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 54, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "516:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "515:13:0" - }, - "payable": false, - "returnParameters": { - "id": 57, - "nodeType": "ParameterList", - "parameters": [], - "src": "536:0:0" - }, - "scope": 83, - "src": "500:66:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 70, - "nodeType": "Block", - "src": "622:30:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 68, - "name": "winner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "639:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "functionReturnParameters": 67, - "id": 69, - "nodeType": "Return", - "src": "632:13:0" - } - ] - }, - "documentation": null, - "id": 71, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "get_winner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 64, - "nodeType": "ParameterList", - "parameters": [], - "src": "591:2:0" - }, - "payable": false, - "returnParameters": { - "id": 67, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 66, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 71, - "src": "614:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 65, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "614:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "613:8:0" - }, - "scope": 83, - "src": "572:80:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 81, - "nodeType": "Block", - "src": "703:48:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 77, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "delete", - "prefix": true, - "src": "713:13:0", - "subExpression": { - "argumentTypes": null, - "id": 76, - "name": "winner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "720:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 78, - "nodeType": "ExpressionStatement", - "src": "713:13:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 79, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "743:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 75, - "id": 80, - "nodeType": "Return", - "src": "736:8:0" - } - ] - }, - "documentation": null, - "id": 82, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "clear_winner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 72, - "nodeType": "ParameterList", - "parameters": [], - "src": "679:2:0" - }, - "payable": false, - "returnParameters": { - "id": 75, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 74, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 82, - "src": "697:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 73, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "697:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "696:6:0" - }, - "scope": 83, - "src": "658:93:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 84, - "src": "26:727:0" - } - ], - "src": "0:753:0" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "2.0.0", - "updatedAt": "2018-10-10T12:57:03.041Z" -} \ No newline at end of file diff --git a/test/ethereum/scripts/includes/build/CoinMixer.json b/test/ethereum/scripts/includes/build/CoinMixer.json deleted file mode 100644 index 8e0aa413..00000000 --- a/test/ethereum/scripts/includes/build/CoinMixer.json +++ /dev/null @@ -1,20027 +0,0 @@ -{ - "contractName": "CoinMixer", - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "deals", - "outputs": [ - { - "name": "organizer", - "type": "address" - }, - { - "name": "startTime", - "type": "uint48" - }, - { - "name": "status", - "type": "uint8" - }, - { - "name": "depositSum", - "type": "uint256" - }, - { - "name": "numDeposits", - "type": "uint256" - }, - { - "name": "depositInWei", - "type": "uint256" - }, - { - "name": "numParticipants", - "type": "uint256" - }, - { - "name": "title", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "enigma", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "name": "_enigmaAddress", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "user", - "type": "address" - }, - { - "indexed": true, - "name": "_dealId", - "type": "uint32" - }, - { - "indexed": false, - "name": "_startTime", - "type": "uint48" - }, - { - "indexed": false, - "name": "_title", - "type": "bytes32" - }, - { - "indexed": false, - "name": "_depositInWei", - "type": "uint256" - }, - { - "indexed": false, - "name": "_numParticipants", - "type": "uint256" - }, - { - "indexed": false, - "name": "_success", - "type": "bool" - }, - { - "indexed": false, - "name": "_err", - "type": "string" - } - ], - "name": "NewDeal", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_depositor", - "type": "address" - }, - { - "indexed": true, - "name": "_dealId", - "type": "uint32" - }, - { - "indexed": false, - "name": "_encryptedDestAddress", - "type": "bytes" - }, - { - "indexed": false, - "name": "_value", - "type": "uint256" - }, - { - "indexed": false, - "name": "_success", - "type": "bool" - }, - { - "indexed": false, - "name": "_err", - "type": "string" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_dealId", - "type": "uint32" - }, - { - "indexed": false, - "name": "individualAmountInWei", - "type": "uint256" - }, - { - "indexed": false, - "name": "destAddresses", - "type": "address[]" - }, - { - "indexed": false, - "name": "nbTransfers", - "type": "uint32" - }, - { - "indexed": false, - "name": "_success", - "type": "bool" - }, - { - "indexed": false, - "name": "_err", - "type": "string" - } - ], - "name": "Distribute", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "TransferredToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "FailedTransfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_dealId", - "type": "uint32" - } - ], - "name": "DealFullyFunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_dealId", - "type": "uint32" - }, - { - "indexed": false, - "name": "_success", - "type": "bool" - } - ], - "name": "DealExecuted", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "_title", - "type": "bytes32" - }, - { - "name": "_depositInWei", - "type": "uint256" - }, - { - "name": "_numParticipants", - "type": "uint256" - } - ], - "name": "newDeal", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "dealId", - "type": "uint32" - }, - { - "name": "encryptedDestAddress", - "type": "bytes" - } - ], - "name": "makeDeposit", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "dealId", - "type": "uint32" - }, - { - "name": "destAddresses", - "type": "address[]" - }, - { - "name": "rand", - "type": "uint256" - } - ], - "name": "mixAddresses", - "outputs": [ - { - "name": "", - "type": "uint32" - }, - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "dealId", - "type": "uint32" - }, - { - "name": "destAddresses", - "type": "address[]" - } - ], - "name": "distribute", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "listDeals", - "outputs": [ - { - "name": "", - "type": "uint256[]" - }, - { - "name": "", - "type": "uint256[]" - }, - { - "name": "", - "type": "uint256[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_dealId", - "type": "uint32" - } - ], - "name": "dealStatus", - "outputs": [ - { - "name": "", - "type": "bytes32" - }, - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_dealId", - "type": "uint32" - } - ], - "name": "countEncryptedAddresses", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_dealId", - "type": "uint32" - }, - { - "name": "index", - "type": "uint256" - } - ], - "name": "getEncryptedAddress", - "outputs": [ - { - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b506040516020806118f4833981016040525160008054600160a060020a03909216600160a060020a03199092169190911790556118a2806100526000396000f3006080604052600436106100a35763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166303988f8481146100a857806310f11e84146101145780632aaf281b146102075780633b8332451461028257806357f5fc28146102b2578063a06a585614610348578063b24fd5c514610366578063d10e1e6914610397578063daefe738146103f7578063dd20866e14610448575b600080fd5b3480156100b457600080fd5b506100c0600435610511565b60408051600160a060020a03909916895265ffffffffffff909716602089015260ff909516878701526060870193909352608086019190915260a085015260c084015260e083015251908190036101000190f35b34801561012057600080fd5b50610129610588565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b83811015610171578181015183820152602001610159565b50505050905001848103835286818151815260200191508051906020019060200280838360005b838110156101b0578181015183820152602001610198565b50505050905001848103825285818151815260200191508051906020019060200280838360005b838110156101ef5781810151838201526020016101d7565b50505050905001965050505050505060405180910390f35b60408051602060046024803582810135601f810185900485028601850190965285855261025e95833563ffffffff1695369560449491939091019190819084018382808284375094975061072e9650505050505050565b6040518082600181111561026e57fe5b60ff16815260200191505060405180910390f35b34801561028e57600080fd5b506102a063ffffffff60043516610b08565b60408051918252519081900360200190f35b3480156102be57600080fd5b506102d363ffffffff60043516602435610b39565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561030d5781810151838201526020016102f5565b50505050905090810190601f16801561033a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561035457600080fd5b5061025e600435602435604435610c09565b34801561037257600080fd5b5061037b610f58565b60408051600160a060020a039092168252519081900360200190f35b3480156103a357600080fd5b5060408051602060046024803582810135848102808701860190975280865261025e96843563ffffffff1696369660449591949091019291829185019084908082843750949750610f679650505050505050565b34801561040357600080fd5b5061041563ffffffff600435166112ee565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b34801561045457600080fd5b506040805160206004602480358281013584810280870186019097528086526104aa96843563ffffffff1696369660449591949091019291829185019084908082843750949750509335945061140c9350505050565b604051808363ffffffff1663ffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156104fc5781810151838201526020016104e4565b50505050905001935050505060405180910390f35b600180548290811061051f57fe5b6000918252602090912060099091020180546001820154600283015460038401546004850154600590950154600160a060020a038516965074010000000000000000000000000000000000000000850465ffffffffffff169560d060020a90950460ff16949088565b60608060608060608060006001805490506040519080825280602002602001820160405280156105c2578160200160208202803883390190505b5060015460408051828152602080840282010190915291955080156105f1578160200160208202803883390190505b506001546040805182815260208084028201019091529194508015610620578160200160208202803883390190505b509150600090505b60015481101561072157600180548290811061064057fe5b9060005260206000209060090201600001601a9054906101000a900460ff1660ff16848281518110151561067057fe5b6020908102909101015260018054600091908390811061068c57fe5b600091825260208083203384526008600990930201919091019052604090205411156106cd57600183828151811015156106c257fe5b602090810290910101525b60018054339190839081106106de57fe5b6000918252602090912060099091020154600160a060020a03161415610719576001828281518110151561070e57fe5b602090810290910101525b600101610628565b5091959094509092509050565b600080348110610788576040805160e560020a62461bcd02815260206004820152601f60248201527f4465706f7369742076616c7565206d75737420626520706f7369746976652e00604482015290519081900360640190fd5b6001805463ffffffff861690811061079c57fe5b600091825260209091206009909102015460d060020a900460ff161561080c576040805160e560020a62461bcd02815260206004820152601b60248201527f496c6c6567616c20737461746520666f72206465706f736974732e0000000000604482015290519081900360640190fd5b6001805463ffffffff861690811061082057fe5b9060005260206000209060090201905080600301543481151561083f57fe5b06156108bb576040805160e560020a62461bcd02815260206004820152603060248201527f4465706f7369742076616c7565206d7573742062652061206d756c7469706c6560448201527f206f6620636c61696d2076616c75652e00000000000000000000000000000000606482015290519081900360840190fd5b33600090815260088201602052604090205415610948576040805160e560020a62461bcd02815260206004820152602b60248201527f43616e6e6f74206465706f73697420747769636520776974682074686520736160448201527f6d6520616464726573732e000000000000000000000000000000000000000000606482015290519081900360840190fd5b600181018054349081019091553360009081526008830160205260409020556002810154600682018054859290811061097d57fe5b90600052602060002001908051906020019061099a929190611593565b506002810180546001908101909155604080513460208083018290529282018490526080808352875190830152865163ffffffff89169433947fce7036acc3606aaa1ec3a2e7b4d13b3f4da34ee1eac298fc47524074de74a3bf948a949390918291606083019160a08401919088019080838360005b83811015610a28578181015183820152602001610a10565b50505050905090810190601f168015610a555780820380516001836020036101000a031916815260200191505b50928303905250600881527f616c6c20676f6f6400000000000000000000000000000000000000000000000060208201526040805191829003019350915050a36004810154600282015410610afe5780547aff0000000000000000000000000000000000000000000000000000191660d060020a17815560405163ffffffff8516907fa98c11bc69afe22b520fe800f82e421f9594d4f06259a7600711b75af05a43b990600090a25b5060009392505050565b600060018263ffffffff16815481101515610b1f57fe5b600091825260209091206006600990920201015492915050565b606060018363ffffffff16815481101515610b5057fe5b906000526020600020906009020160060182815481101515610b6e57fe5b600091825260209182902001805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610bfc5780601f10610bd157610100808354040283529160200191610bfc565b820191906000526020600020905b815481529060010190602001808311610bdf57829003601f168201915b5050505050905092915050565b600180546000918190610c1e90828101611611565b503360018263ffffffff16815481101515610c3557fe5b906000526020600020906009020160000160006101000a815481600160a060020a030219169083600160a060020a031602179055508460018263ffffffff16815481101515610c8057fe5b600091825260208220600560099092020101919091556001805463ffffffff8416908110610caa57fe5b906000526020600020906009020160010181905550600060018263ffffffff16815481101515610cd657fe5b9060005260206000209060090201600201819055504260018263ffffffff16815481101515610d0157fe5b906000526020600020906009020160000160146101000a81548165ffffffffffff021916908365ffffffffffff1602179055508360018263ffffffff16815481101515610d4a57fe5b9060005260206000209060090201600301819055508260018263ffffffff16815481101515610d7557fe5b90600052602060002090600902016004018190555082604051908082528060200260200182016040528015610dbe57816020015b6060815260200190600190039081610da95790505b506001805463ffffffff8416908110610dd357fe5b90600052602060002090600902016006019080519060200190610df7929190611642565b5082604051908082528060200260200182016040528015610e22578160200160208202803883390190505b506001805463ffffffff8416908110610e3757fe5b90600052602060002090600902016007019080519060200190610e5b92919061169b565b50600060018263ffffffff16815481101515610e7357fe5b6000918252602091829020600990910201805460ff9390931660d060020a027aff000000000000000000000000000000000000000000000000000019909316929092179091556040805165ffffffffffff42168152918201879052818101869052606082018590526001608083015260c060a083018190526008908301527f616c6c20676f6f6400000000000000000000000000000000000000000000000060e08301525163ffffffff83169133917f876b9043d809880bec360c3c9d8e8819a90016c1d6a6958015ece6039873f790918190036101000190a3506000949350505050565b600054600160a060020a031681565b600080548190600160a060020a03163314610ff2576040805160e560020a62461bcd02815260206004820152602260248201527f53656e646572206973206e6f742074686520456e69676d6120636f6e7472616360448201527f742e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6001805463ffffffff861690811061100657fe5b600091825260209091206009909102015460d060020a900460ff16600114611078576040805160e560020a62461bcd02815260206004820152601560248201527f4465616c206973206e6f742065786563757465642e0000000000000000000000604482015290519081900360640190fd5b8260018563ffffffff1681548110151561108e57fe5b906000526020600020906009020160070190805190602001906110b292919061169b565b50600090505b6001805463ffffffff86169081106110cc57fe5b906000526020600020906009020160070180549050811015611191576001805463ffffffff86169081106110fc57fe5b90600052602060002090600902016007018181548110151561111a57fe5b60009182526020909120015460018054600160a060020a03909216916108fc919063ffffffff881690811061114b57fe5b9060005260206000209060090201600301549081150290604051600060405180830381858888f19350505050158015611188573d6000803e3d6000fd5b506001016110b8565b6001805463ffffffff8616917f1187ca8b8cb5197d0ccbe2a81015221695030dd9d87d9d5fc1f6678d65d5813491839081106111c957fe5b90600052602060002090600902016003015460018763ffffffff168154811015156111f057fe5b906000526020600020906009020160070160018863ffffffff1681548110151561121657fe5b906000526020600020906009020160070180549050600160405180858152602001806020018463ffffffff1663ffffffff168152602001831515151581526020018060200183810383528681815481526020019150805480156112a257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611284575b5050928303905250600881527f616c6c20676f6f640000000000000000000000000000000000000000000000006020820152604080519182900301945092505050a25060009392505050565b60008060008060008060008060008060008060018d63ffffffff1681548110151561131557fe5b906000526020600020906009020160050154955060018d63ffffffff1681548110151561133e57fe5b906000526020600020906009020160040154945060018d63ffffffff1681548110151561136757fe5b906000526020600020906009020160030154935060018d63ffffffff1681548110151561139057fe5b906000526020600020906009020160020154925060018d63ffffffff168154811015156113b957fe5b906000526020600020906009020160010154915060018d63ffffffff168154811015156113e257fe5b6000918252602090912060076009909202010154959d949c50929a50909850965091945092505050565b815160009060609082805b6000831115611587578286600101604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106114735780518252601f199092019160209182019101611454565b5181516020939093036101000a60001901801990911692169190911790526040519201829003909120925050508115156114a957fe5b06915086600184038151811015156114bd57fe5b90602001906020020151600160a060020a031687838151811015156114de57fe5b60209081029091010151600160a060020a03161461157b57866001840381518110151561150757fe5b906020019060200201519050868281518110151561152157fe5b90602001906020020151876001850381518110151561153c57fe5b600160a060020a039092166020928302909101909101528651819088908490811061156357fe5b600160a060020a039092166020928302909101909101525b60001990920191611417565b50959694955050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106115d457805160ff1916838001178555611601565b82800160010185558215611601579182015b828111156116015782518255916020019190600101906115e6565b5061160d929150611709565b5090565b81548183558181111561163d5760090281600902836000526020600020918201910161163d9190611726565b505050565b82805482825590600052602060002090810192821561168f579160200282015b8281111561168f578251805161167f918491602090910190611593565b5091602001919060010190611662565b5061160d92915061179f565b8280548282559060005260206000209081019282156116fd579160200282015b828111156116fd578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039091161782556020909201916001909101906116bb565b5061160d9291506117c2565b61172391905b8082111561160d576000815560010161170f565b90565b61172391905b8082111561160d5780547affffffffffffffffffffffffffffffffffffffffffffffffffffff191681556000600182018190556002820181905560038201819055600482018190556005820181905561178860068301826117f3565b611796600783016000611814565b5060090161172c565b61172391905b8082111561160d5760006117b98282611832565b506001016117a5565b61172391905b8082111561160d57805473ffffffffffffffffffffffffffffffffffffffff191681556001016117c8565b5080546000825590600052602060002090810190611811919061179f565b50565b50805460008255906000526020600020908101906118119190611709565b50805460018160011615610100020316600290046000825580601f106118585750611811565b601f01602090049060005260206000209081019061181191906117095600a165627a7a72305820b79db93c7571320bf50efd924c3b78e05079bf8f4afd870902607e6be2575f380029", - "deployedBytecode": "0x6080604052600436106100a35763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166303988f8481146100a857806310f11e84146101145780632aaf281b146102075780633b8332451461028257806357f5fc28146102b2578063a06a585614610348578063b24fd5c514610366578063d10e1e6914610397578063daefe738146103f7578063dd20866e14610448575b600080fd5b3480156100b457600080fd5b506100c0600435610511565b60408051600160a060020a03909916895265ffffffffffff909716602089015260ff909516878701526060870193909352608086019190915260a085015260c084015260e083015251908190036101000190f35b34801561012057600080fd5b50610129610588565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b83811015610171578181015183820152602001610159565b50505050905001848103835286818151815260200191508051906020019060200280838360005b838110156101b0578181015183820152602001610198565b50505050905001848103825285818151815260200191508051906020019060200280838360005b838110156101ef5781810151838201526020016101d7565b50505050905001965050505050505060405180910390f35b60408051602060046024803582810135601f810185900485028601850190965285855261025e95833563ffffffff1695369560449491939091019190819084018382808284375094975061072e9650505050505050565b6040518082600181111561026e57fe5b60ff16815260200191505060405180910390f35b34801561028e57600080fd5b506102a063ffffffff60043516610b08565b60408051918252519081900360200190f35b3480156102be57600080fd5b506102d363ffffffff60043516602435610b39565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561030d5781810151838201526020016102f5565b50505050905090810190601f16801561033a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561035457600080fd5b5061025e600435602435604435610c09565b34801561037257600080fd5b5061037b610f58565b60408051600160a060020a039092168252519081900360200190f35b3480156103a357600080fd5b5060408051602060046024803582810135848102808701860190975280865261025e96843563ffffffff1696369660449591949091019291829185019084908082843750949750610f679650505050505050565b34801561040357600080fd5b5061041563ffffffff600435166112ee565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b34801561045457600080fd5b506040805160206004602480358281013584810280870186019097528086526104aa96843563ffffffff1696369660449591949091019291829185019084908082843750949750509335945061140c9350505050565b604051808363ffffffff1663ffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156104fc5781810151838201526020016104e4565b50505050905001935050505060405180910390f35b600180548290811061051f57fe5b6000918252602090912060099091020180546001820154600283015460038401546004850154600590950154600160a060020a038516965074010000000000000000000000000000000000000000850465ffffffffffff169560d060020a90950460ff16949088565b60608060608060608060006001805490506040519080825280602002602001820160405280156105c2578160200160208202803883390190505b5060015460408051828152602080840282010190915291955080156105f1578160200160208202803883390190505b506001546040805182815260208084028201019091529194508015610620578160200160208202803883390190505b509150600090505b60015481101561072157600180548290811061064057fe5b9060005260206000209060090201600001601a9054906101000a900460ff1660ff16848281518110151561067057fe5b6020908102909101015260018054600091908390811061068c57fe5b600091825260208083203384526008600990930201919091019052604090205411156106cd57600183828151811015156106c257fe5b602090810290910101525b60018054339190839081106106de57fe5b6000918252602090912060099091020154600160a060020a03161415610719576001828281518110151561070e57fe5b602090810290910101525b600101610628565b5091959094509092509050565b600080348110610788576040805160e560020a62461bcd02815260206004820152601f60248201527f4465706f7369742076616c7565206d75737420626520706f7369746976652e00604482015290519081900360640190fd5b6001805463ffffffff861690811061079c57fe5b600091825260209091206009909102015460d060020a900460ff161561080c576040805160e560020a62461bcd02815260206004820152601b60248201527f496c6c6567616c20737461746520666f72206465706f736974732e0000000000604482015290519081900360640190fd5b6001805463ffffffff861690811061082057fe5b9060005260206000209060090201905080600301543481151561083f57fe5b06156108bb576040805160e560020a62461bcd02815260206004820152603060248201527f4465706f7369742076616c7565206d7573742062652061206d756c7469706c6560448201527f206f6620636c61696d2076616c75652e00000000000000000000000000000000606482015290519081900360840190fd5b33600090815260088201602052604090205415610948576040805160e560020a62461bcd02815260206004820152602b60248201527f43616e6e6f74206465706f73697420747769636520776974682074686520736160448201527f6d6520616464726573732e000000000000000000000000000000000000000000606482015290519081900360840190fd5b600181018054349081019091553360009081526008830160205260409020556002810154600682018054859290811061097d57fe5b90600052602060002001908051906020019061099a929190611593565b506002810180546001908101909155604080513460208083018290529282018490526080808352875190830152865163ffffffff89169433947fce7036acc3606aaa1ec3a2e7b4d13b3f4da34ee1eac298fc47524074de74a3bf948a949390918291606083019160a08401919088019080838360005b83811015610a28578181015183820152602001610a10565b50505050905090810190601f168015610a555780820380516001836020036101000a031916815260200191505b50928303905250600881527f616c6c20676f6f6400000000000000000000000000000000000000000000000060208201526040805191829003019350915050a36004810154600282015410610afe5780547aff0000000000000000000000000000000000000000000000000000191660d060020a17815560405163ffffffff8516907fa98c11bc69afe22b520fe800f82e421f9594d4f06259a7600711b75af05a43b990600090a25b5060009392505050565b600060018263ffffffff16815481101515610b1f57fe5b600091825260209091206006600990920201015492915050565b606060018363ffffffff16815481101515610b5057fe5b906000526020600020906009020160060182815481101515610b6e57fe5b600091825260209182902001805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610bfc5780601f10610bd157610100808354040283529160200191610bfc565b820191906000526020600020905b815481529060010190602001808311610bdf57829003601f168201915b5050505050905092915050565b600180546000918190610c1e90828101611611565b503360018263ffffffff16815481101515610c3557fe5b906000526020600020906009020160000160006101000a815481600160a060020a030219169083600160a060020a031602179055508460018263ffffffff16815481101515610c8057fe5b600091825260208220600560099092020101919091556001805463ffffffff8416908110610caa57fe5b906000526020600020906009020160010181905550600060018263ffffffff16815481101515610cd657fe5b9060005260206000209060090201600201819055504260018263ffffffff16815481101515610d0157fe5b906000526020600020906009020160000160146101000a81548165ffffffffffff021916908365ffffffffffff1602179055508360018263ffffffff16815481101515610d4a57fe5b9060005260206000209060090201600301819055508260018263ffffffff16815481101515610d7557fe5b90600052602060002090600902016004018190555082604051908082528060200260200182016040528015610dbe57816020015b6060815260200190600190039081610da95790505b506001805463ffffffff8416908110610dd357fe5b90600052602060002090600902016006019080519060200190610df7929190611642565b5082604051908082528060200260200182016040528015610e22578160200160208202803883390190505b506001805463ffffffff8416908110610e3757fe5b90600052602060002090600902016007019080519060200190610e5b92919061169b565b50600060018263ffffffff16815481101515610e7357fe5b6000918252602091829020600990910201805460ff9390931660d060020a027aff000000000000000000000000000000000000000000000000000019909316929092179091556040805165ffffffffffff42168152918201879052818101869052606082018590526001608083015260c060a083018190526008908301527f616c6c20676f6f6400000000000000000000000000000000000000000000000060e08301525163ffffffff83169133917f876b9043d809880bec360c3c9d8e8819a90016c1d6a6958015ece6039873f790918190036101000190a3506000949350505050565b600054600160a060020a031681565b600080548190600160a060020a03163314610ff2576040805160e560020a62461bcd02815260206004820152602260248201527f53656e646572206973206e6f742074686520456e69676d6120636f6e7472616360448201527f742e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6001805463ffffffff861690811061100657fe5b600091825260209091206009909102015460d060020a900460ff16600114611078576040805160e560020a62461bcd02815260206004820152601560248201527f4465616c206973206e6f742065786563757465642e0000000000000000000000604482015290519081900360640190fd5b8260018563ffffffff1681548110151561108e57fe5b906000526020600020906009020160070190805190602001906110b292919061169b565b50600090505b6001805463ffffffff86169081106110cc57fe5b906000526020600020906009020160070180549050811015611191576001805463ffffffff86169081106110fc57fe5b90600052602060002090600902016007018181548110151561111a57fe5b60009182526020909120015460018054600160a060020a03909216916108fc919063ffffffff881690811061114b57fe5b9060005260206000209060090201600301549081150290604051600060405180830381858888f19350505050158015611188573d6000803e3d6000fd5b506001016110b8565b6001805463ffffffff8616917f1187ca8b8cb5197d0ccbe2a81015221695030dd9d87d9d5fc1f6678d65d5813491839081106111c957fe5b90600052602060002090600902016003015460018763ffffffff168154811015156111f057fe5b906000526020600020906009020160070160018863ffffffff1681548110151561121657fe5b906000526020600020906009020160070180549050600160405180858152602001806020018463ffffffff1663ffffffff168152602001831515151581526020018060200183810383528681815481526020019150805480156112a257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611284575b5050928303905250600881527f616c6c20676f6f640000000000000000000000000000000000000000000000006020820152604080519182900301945092505050a25060009392505050565b60008060008060008060008060008060008060018d63ffffffff1681548110151561131557fe5b906000526020600020906009020160050154955060018d63ffffffff1681548110151561133e57fe5b906000526020600020906009020160040154945060018d63ffffffff1681548110151561136757fe5b906000526020600020906009020160030154935060018d63ffffffff1681548110151561139057fe5b906000526020600020906009020160020154925060018d63ffffffff168154811015156113b957fe5b906000526020600020906009020160010154915060018d63ffffffff168154811015156113e257fe5b6000918252602090912060076009909202010154959d949c50929a50909850965091945092505050565b815160009060609082805b6000831115611587578286600101604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106114735780518252601f199092019160209182019101611454565b5181516020939093036101000a60001901801990911692169190911790526040519201829003909120925050508115156114a957fe5b06915086600184038151811015156114bd57fe5b90602001906020020151600160a060020a031687838151811015156114de57fe5b60209081029091010151600160a060020a03161461157b57866001840381518110151561150757fe5b906020019060200201519050868281518110151561152157fe5b90602001906020020151876001850381518110151561153c57fe5b600160a060020a039092166020928302909101909101528651819088908490811061156357fe5b600160a060020a039092166020928302909101909101525b60001990920191611417565b50959694955050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106115d457805160ff1916838001178555611601565b82800160010185558215611601579182015b828111156116015782518255916020019190600101906115e6565b5061160d929150611709565b5090565b81548183558181111561163d5760090281600902836000526020600020918201910161163d9190611726565b505050565b82805482825590600052602060002090810192821561168f579160200282015b8281111561168f578251805161167f918491602090910190611593565b5091602001919060010190611662565b5061160d92915061179f565b8280548282559060005260206000209081019282156116fd579160200282015b828111156116fd578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039091161782556020909201916001909101906116bb565b5061160d9291506117c2565b61172391905b8082111561160d576000815560010161170f565b90565b61172391905b8082111561160d5780547affffffffffffffffffffffffffffffffffffffffffffffffffffff191681556000600182018190556002820181905560038201819055600482018190556005820181905561178860068301826117f3565b611796600783016000611814565b5060090161172c565b61172391905b8082111561160d5760006117b98282611832565b506001016117a5565b61172391905b8082111561160d57805473ffffffffffffffffffffffffffffffffffffffff191681556001016117c8565b5080546000825590600052602060002090810190611811919061179f565b50565b50805460008255906000526020600020908101906118119190611709565b50805460018160011615610100020316600290046000825580601f106118585750611811565b601f01602090049060005260206000209081019061181191906117095600a165627a7a72305820b79db93c7571320bf50efd924c3b78e05079bf8f4afd870902607e6be2575f380029", - "sourceMap": "50:6913:1:-;;;1507:91;8:9:-1;5:2;;;30:1;27;20:12;5:2;1507:91:1;;;;;;;;;;;;;1560:6;:31;;-1:-1:-1;;;;;1560:31:1;;;-1:-1:-1;;;;;;1560:31:1;;;;;;;;;50:6913;;;;;;", - "deployedSourceMap": "50:6913:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;500:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;500:19:1;;;;;;;;;-1:-1:-1;;;;;500:19:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5282:663;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5282:663:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;5282:663:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;5282:663:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;5282:663:1;;;;;;;;;;;;;;;;;;;;;2558:995;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2558:995:1;;-1:-1:-1;2558:995:1;;-1:-1:-1;;;;;;;2558:995:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6544:191;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6544:191:1;;;;;;;;;;;;;;;;;;;;;;;6741:220;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6741:220:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;6741:220:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1604:948;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1604:948:1;;;;;;;;;76:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;76:20:1;;;;;;;;-1:-1:-1;;;;;76:20:1;;;;;;;;;;;;;;4539:737;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4539:737:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4539:737:1;;-1:-1:-1;4539:737:1;;-1:-1:-1;;;;;;;4539:737:1;5951:587;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5951:587:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3559:842;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3559:842:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3559:842:1;;-1:-1:-1;;3559:842:1;;;-1:-1:-1;3559:842:1;;-1:-1:-1;;;;3559:842:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3559:842:1;;;;;;;;;;;;;;;;;;500:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;500:19:1;;;-1:-1:-1;500:19:1;;;;;;-1:-1:-1;;;500:19:1;;;;;;;;:::o;5282:663::-;5324:6;5332;5340;5411:20;5468:26;5531:23;5597:6;5445:5;:12;;;;5434:24;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;5434:24:1;-1:-1:-1;5508:5:1;:12;5497:24;;;;;;;;;;;;;;;;5411:47;;-1:-1:-1;5497:24:1;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;5497:24:1;-1:-1:-1;5568:5:1;:12;5557:24;;;;;;;;;;;;;;;;5468:53;;-1:-1:-1;5557:24:1;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;5557:24:1;;5531:50;;5606:1;5597:10;;5592:297;5613:5;:12;5609:16;;5592:297;;;5658:5;:8;;5664:1;;5658:8;;;;;;;;;;;;;;;;:15;;;;;;;;;;;;5646:27;;:6;5653:1;5646:9;;;;;;;;;;;;;;;;;;:27;5692:5;:8;;5723:1;;5692:5;5698:1;;5692:8;;;;;;;;;;;;;;5709:10;5692:28;;:16;:8;;;;;:16;;;;:28;;;;;;:32;5688:90;;;5762:1;5744:12;5757:1;5744:15;;;;;;;;;;;;;;;;;;:19;5688:90;5796:5;:8;;5818:10;;5796:5;5802:1;;5796:8;;;;;;;;;;;;;;;;;;;:18;-1:-1:-1;;;;;5796:18:1;:32;5792:87;;;5863:1;5848:9;5858:1;5848:12;;;;;;;;;;;;;;;;;;:16;5792:87;5627:3;;5592:297;;;-1:-1:-1;5906:6:1;;5914:12;;-1:-1:-1;5928:9:1;;-1:-1:-1;5282:663:1;-1:-1:-1;5282:663:1:o;2558:995::-;2658:11;;2693:9;:13;-1:-1:-1;2685:57:1;;;;;-1:-1:-1;;;;;2685:57:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;2760:5;:13;;;;;;;;;;;;;;;;;;;;;;;;;:20;-1:-1:-1;;;2760:20:1;;;;:25;2752:65;;;;;-1:-1:-1;;;;;2752:65:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;2848:5;:13;;;;;;;;;;;;;;;;;;;;;;2828:33;;2892:4;:17;;;2880:9;:29;;;;;;;;2879:36;2871:97;;;;;-1:-1:-1;;;;;2871:97:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2999:10;2986:24;;;;:12;;;:24;;;;;;:29;2978:85;;;;;-1:-1:-1;;;;;2978:85:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3100:15;;;:28;;3119:9;3100:28;;;;;;3151:10;3100:15;3138:24;;;:12;;;:24;;;;;:36;3212:16;;;;3184:27;;;:45;;3232:20;;3212:16;3184:45;;;;;;;;;;;;;:68;;;;;;;;;;;;:::i;:::-;-1:-1:-1;3262:16:1;;;:21;;3282:1;3262:21;;;;;;3299:78;;;3349:9;3299:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3307:10;;3299:78;;3327:20;;3349:9;3299:78;;;;;;;;;;;;;;;;;;;3262:16;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;3299:78:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3299:78:1;;;;;-1:-1:-1;3299:78:1;;;;;;;;;;;;;;;;;-1:-1:-1;3299:78:1;-1:-1:-1;;3299:78:1;3412:20;;;;3392:16;;;;:40;3388:128;;3448:15;;-1:-1:-1;;3448:15:1;-1:-1:-1;;;3448:15:1;;;3482:23;;;;;;;;3448:11;;3482:23;3388:128;-1:-1:-1;3532:14:1;;2558:995;-1:-1:-1;;;2558:995:1:o;6544:191::-;6626:4;6684:5;6690:7;6684:14;;;;;;;;;;;;;;;;;;;;:37;:14;;;;;:37;:44;;6544:191;-1:-1:-1;;6544:191:1:o;6741:220::-;6831:5;6910;6916:7;6910:14;;;;;;;;;;;;;;;;;;;;;;:37;;6948:5;6910:44;;;;;;;;;;;;;;;;;;;;6903:51;;;;;;;-1:-1:-1;;6903:51:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6910:44;6903:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6741:220;;;;:::o;1604:948::-;1754:5;:12;;1704:11;;1754:12;;1778:14;;;;;;:::i;:::-;;1828:10;1802:5;1808:6;1802:13;;;;;;;;;;;;;;;;;;;;;;:23;;;:36;;;;;-1:-1:-1;;;;;1802:36:1;;;;;-1:-1:-1;;;;;1802:36:1;;;;;;1870:6;1848:5;1854:6;1848:13;;;;;;;;;;;;;;;;;;;:19;:13;;;;;:19;:28;;;;1886:5;:13;;;;;;;;;;;;;;;;;;;;;;:24;;:28;;;;1952:1;1924:5;1930:6;1924:13;;;;;;;;;;;;;;;;;;;;;;:25;;:29;;;;1996:3;1963:5;1969:6;1963:13;;;;;;;;;;;;;;;;;;;;;;:23;;;:37;;;;;;;;;;;;;;;;;;2039:13;2010:5;2016:6;2010:13;;;;;;;;;;;;;;;;;;;;;;:26;;:42;;;;2094:16;2062:5;2068:6;2062:13;;;;;;;;;;;;;;;;;;;;;;:29;;:48;;;;2171:16;2159:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2120:5:1;:13;;;;;;;;;;;;;;;;;;;;;;:36;;:68;;;;;;;;;;;;:::i;:::-;;2242:16;2228:31;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;2228:31:1;-1:-1:-1;2198:5:1;:13;;;;;;;;;;;;;;;;;;;;;;:27;;:61;;;;;;;;;;;;:::i;:::-;;2292:1;2269:5;2275:6;2269:13;;;;;;;;;;;;;;;;;;;;;;;;;;:24;;;;;;;-1:-1:-1;;;2269:24:1;-1:-1:-1;;2269:24:1;;;;;;;;;;2308:205;;;;2380:3;2308:205;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2308:205:1;;;;;;;;;;;;;;;;;;;;;;;;;;2329:10;;2308:205;;;;;2269:24;2308:205;;;-1:-1:-1;2531:14:1;;1604:948;-1:-1:-1;;;;1604:948:1:o;76:20::-;;;-1:-1:-1;;;;;76:20:1;;:::o;4539:737::-;4640:11;4469:6;;4640:11;;-1:-1:-1;;;;;4469:6:1;4447:10;:29;4439:76;;;;;-1:-1:-1;;;;;4439:76:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4735:5;:13;;;;;;;;;;;;;;;;;;;;;;;;;:20;-1:-1:-1;;;4735:20:1;;;;4759:1;4735:25;4727:59;;;;;-1:-1:-1;;;;;4727:59:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;4826:13;4796:5;4802:6;4796:13;;;;;;;;;;;;;;;;;;;;;;:27;;:43;;;;;;;;;;;;:::i;:::-;;4864:1;4855:10;;4850:154;4871:5;:13;;;;;;;;;;;;;;;;;;;;;;:27;;:34;;;;4867:1;:38;4850:154;;;4926:5;:13;;;;;;;;;;;;;;;;;;;;;;:27;;4954:1;4926:30;;;;;;;;;;;;;;;;;;;;;4966:13;;-1:-1:-1;;;;;4926:30:1;;;;:67;;:30;4966:13;;;;;;;;;;;;;;;;;;;;:26;;;4926:67;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;4907:3:1;;4850:154;;;5063:5;:13;;5019:219;;;;;;;;5063:13;;;;;;;;;;;;;;;;:26;;;5103:5;5109:6;5103:13;;;;;;;;;;;;;;;;;;;;;;:27;;5151:5;5157:6;5151:13;;;;;;;;;;;;;;;;;;;;;;:27;;:34;;;;5200:4;5019:219;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5019:219:1;;;;;;;;;;;;;;;;-1:-1:-1;;5019:219:1;;;;;-1:-1:-1;5019:219:1;;;;;;;;;;;;;;;;;-1:-1:-1;5019:219:1;-1:-1:-1;;;5019:219:1;-1:-1:-1;5255:14:1;;4539:737;-1:-1:-1;;;4539:737:1:o;5951:587::-;6020:7;6029:4;6035;6041;6047;6053;6109:13;6155:20;6218:12;6270:16;6325:15;6378:21;6125:5;6131:7;6125:14;;;;;;;;;;;;;;;;;;;;;;:20;;;6109:36;;6178:5;6184:7;6178:14;;;;;;;;;;;;;;;;;;;;;;:30;;;6155:53;;6233:5;6239:7;6233:14;;;;;;;;;;;;;;;;;;;;;;:27;;;6218:42;;6289:5;6295:7;6289:14;;;;;;;;;;;;;;;;;;;;;;:26;;;6270:45;;6343:5;6349:7;6343:14;;;;;;;;;;;;;;;;;;;;;;:25;;;6325:43;;6402:5;6408:7;6402:14;;;;;;;;;;;;;;;;;;;;:28;:14;;;;;:28;:35;6456:5;;6463:15;;-1:-1:-1;6480:7:1;;-1:-1:-1;6489:11:1;;-1:-1:-1;6502:10:1;-1:-1:-1;6402:35:1;;-1:-1:-1;5951:587:1;-1:-1:-1;;;5951:587:1:o;3559:842::-;3947:20;;3668:6;;3676:9;;3668:6;;3977:378;3988:1;3984;:5;3977:378;;;4060:1;4046:4;4053:1;4046:8;4029:26;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;4029:26:1;;;4019:37;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;4019:37:1;;;;;;;;;;;-1:-1:-1;;;4014:47:1;;;;;;;;4005:56;;4126:13;4144:1;4140;:5;4126:20;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4106:40:1;:13;4120:1;4106:16;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4106:40:1;;4102:226;;4188:13;4206:1;4202;:5;4188:20;;;;;;;;;;;;;;;;;;4166:42;;4249:13;4263:1;4249:16;;;;;;;;;;;;;;;;;;4226:13;4244:1;4240;:5;4226:20;;;;;;;;;;-1:-1:-1;;;;;4226:39:1;;;:20;;;;;;;;;;:39;4283:16;;4302:11;;4283:13;;4297:1;;4283:16;;;;;;-1:-1:-1;;;;;4283:30:1;;;:16;;;;;;;;;;:30;4102:226;-1:-1:-1;;4341:3:1;;;;3977:378;;;-1:-1:-1;4372:6:1;;4380:13;;-1:-1:-1;;;;;3559:842:1:o;50:6913::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;50:6913:1;;;-1:-1:-1;50:6913:1;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;50:6913:1;;;-1:-1:-1;50:6913:1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;50:6913:1;-1:-1:-1;;;;;50:6913:1;;;;;;;;;;;-1:-1:-1;50:6913:1;;;;;;;-1:-1:-1;50:6913:1;;;-1:-1:-1;50:6913:1;:::i;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;-1:-1:-1;;50:6913:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;-1:-1:-1;;50:6913:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i", - "source": "pragma solidity ^0.4.24;\n\nimport \"./Enigma.sol\";\n\ncontract CoinMixer {\n\n Enigma public enigma;\n\n struct Deal {\n address organizer;\n uint48 startTime;\n uint8 status; // 0: active; 1: funded; 2: executed; 3: cancelled\n uint depositSum;\n uint numDeposits;\n uint depositInWei;\n uint numParticipants;\n bytes32 title;\n bytes[] encryptedDestAddresses;\n address[] destAddresses;\n mapping(address => uint) deposit;\n }\n\n Deal[] public deals;\n\n event NewDeal(\n address indexed user,\n uint32 indexed _dealId,\n uint48 _startTime,\n bytes32 _title,\n uint _depositInWei,\n uint _numParticipants,\n bool _success,\n string _err\n );\n event Deposit(\n address indexed _depositor,\n uint32 indexed _dealId,\n bytes _encryptedDestAddress,\n uint _value,\n bool _success,\n string _err\n );\n event Distribute(\n uint32 indexed _dealId,\n uint individualAmountInWei,\n address[] destAddresses,\n uint32 nbTransfers,\n bool _success,\n string _err\n );\n\n event TransferredToken(address indexed to, uint256 value);\n event FailedTransfer(address indexed to, uint256 value);\n\n event DealFullyFunded(uint32 indexed _dealId);\n event DealExecuted(uint32 indexed _dealId, bool _success);\n\n // TODO: switch to require() once it accepts a message parameter\n enum ReturnValue {Ok, Error}\n\n constructor(address _enigmaAddress) public {\n enigma = Enigma(_enigmaAddress);\n }\n\n function newDeal(bytes32 _title, uint _depositInWei, uint _numParticipants)\n public\n returns (ReturnValue)\n {\n uint32 dealId = uint32(deals.length);\n\n deals.length++;\n deals[dealId].organizer = msg.sender;\n deals[dealId].title = _title;\n deals[dealId].depositSum = 0;\n deals[dealId].numDeposits = 0;\n deals[dealId].startTime = uint48(now);\n deals[dealId].depositInWei = _depositInWei;\n deals[dealId].numParticipants = _numParticipants;\n deals[dealId].encryptedDestAddresses = new bytes[](_numParticipants);\n deals[dealId].destAddresses = new address[](_numParticipants);\n deals[dealId].status = 0;\n emit NewDeal(\n msg.sender,\n dealId,\n uint48(now),\n _title,\n _depositInWei,\n _numParticipants,\n true,\n \"all good\"\n );\n\n return ReturnValue.Ok;\n }\n\n function makeDeposit(uint32 dealId, bytes encryptedDestAddress)\n public\n payable\n returns (ReturnValue)\n {\n require(msg.value > 0, \"Deposit value must be positive.\");\n require(deals[dealId].status == 0, \"Illegal state for deposits.\");\n\n Deal storage deal = deals[dealId];\n require((msg.value % deal.depositInWei) == 0, \"Deposit value must be a multiple of claim value.\");\n require(deal.deposit[msg.sender] == 0, \"Cannot deposit twice with the same address.\");\n\n // actual deposit\n deal.depositSum += msg.value;\n deal.deposit[msg.sender] = msg.value;\n deal.encryptedDestAddresses[deal.numDeposits] = encryptedDestAddress;\n deal.numDeposits += 1;\n\n emit Deposit(msg.sender, dealId, encryptedDestAddress, msg.value, true, \"all good\");\n\n if (deal.numDeposits >= deal.numParticipants) {\n deal.status = 1;\n emit DealFullyFunded(dealId);\n }\n return ReturnValue.Ok;\n }\n\n function mixAddresses(uint32 dealId, address[] destAddresses, uint256 rand)\n public\n pure\n returns (uint32, address[])\n {\n // Shuffling the specified address using a random seed.\n // Doing a Fisher-Yates Shuffle with a single integer\n // between 0 and 127. To get more numbers in the loop,\n // we'll add 1 to our seed and hash it.\n uint i = destAddresses.length;\n while (i > 0) {\n uint j = uint(keccak256(abi.encodePacked(rand + 1))) % i;\n\n // Array swap\n if (destAddresses[j] != destAddresses[i - 1]) {\n address destAddress = destAddresses[i - 1];\n destAddresses[i - 1] = destAddresses[j];\n destAddresses[j] = destAddress;\n }\n i--;\n }\n return (dealId, destAddresses);\n }\n\n modifier onlyEnigma() {\n require(msg.sender == address(enigma), \"Sender is not the Enigma contract.\");\n _;\n }\n\n function distribute(uint32 dealId, address[] destAddresses)\n public\n onlyEnigma()\n returns (ReturnValue)\n {\n // Distribute the deposits to destination addresses\n require(deals[dealId].status == 1, \"Deal is not executed.\");\n deals[dealId].destAddresses = destAddresses;\n\n for (uint i = 0; i < deals[dealId].destAddresses.length; i++) {\n deals[dealId].destAddresses[i].transfer(deals[dealId].depositInWei);\n }\n\n emit Distribute(\n dealId,\n deals[dealId].depositInWei,\n deals[dealId].destAddresses,\n uint32(deals[dealId].destAddresses.length),\n true,\n \"all good\"\n );\n return ReturnValue.Ok;\n }\n\n function listDeals() public view returns (uint[], uint[], uint[]) {\n // A list of deals with their key properties\n uint[] memory status = new uint[](deals.length);\n uint[] memory participates = new uint[](deals.length);\n uint[] memory organizes = new uint[](deals.length);\n\n for (uint i = 0; i < deals.length; i++) {\n status[i] = deals[i].status;\n\n if (deals[i].deposit[msg.sender] > 0) {\n participates[i] = 1;\n }\n\n if (deals[i].organizer == msg.sender) {\n organizes[i] = 1;\n }\n }\n return (status, participates, organizes);\n }\n\n function dealStatus(uint32 _dealId)\n public\n view\n returns (bytes32, uint, uint, uint, uint, uint)\n {\n // Key attributes of a deal\n bytes32 title = deals[_dealId].title;\n uint numParticipants = deals[_dealId].numParticipants;\n uint deposit = deals[_dealId].depositInWei;\n uint numDeposits = deals[_dealId].numDeposits;\n uint depositSum = deals[_dealId].depositSum;\n uint numDestAddresses = deals[_dealId].destAddresses.length;\n\n return (title, numParticipants, deposit, numDeposits, depositSum, numDestAddresses);\n }\n\n function countEncryptedAddresses(uint32 _dealId)\n public\n view\n returns (uint)\n {\n // Count the addresses\n return deals[_dealId].encryptedDestAddresses.length;\n }\n\n function getEncryptedAddress(uint32 _dealId, uint index)\n public\n view\n returns (bytes)\n {\n // Returns an array of encrypted addresses\n return deals[_dealId].encryptedDestAddresses[index];\n }\n}\n\n", - "sourcePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/CoinMixer.sol", - "ast": { - "absolutePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/CoinMixer.sol", - "exportedSymbols": { - "CoinMixer": [ - 830 - ] - }, - "id": 831, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 85, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:1" - }, - { - "absolutePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/Enigma.sol", - "file": "./Enigma.sol", - "id": 86, - "nodeType": "ImportDirective", - "scope": 831, - "sourceUnit": 2658, - "src": "26:22:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 830, - "linearizedBaseContracts": [ - 830 - ], - "name": "CoinMixer", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 88, - "name": "enigma", - "nodeType": "VariableDeclaration", - "scope": 830, - "src": "76:20:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Enigma_$2657", - "typeString": "contract Enigma" - }, - "typeName": { - "contractScope": null, - "id": 87, - "name": "Enigma", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2657, - "src": "76:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Enigma_$2657", - "typeString": "contract Enigma" - } - }, - "value": null, - "visibility": "public" - }, - { - "canonicalName": "CoinMixer.Deal", - "id": 115, - "members": [ - { - "constant": false, - "id": 90, - "name": "organizer", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "125:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 89, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "125:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 92, - "name": "startTime", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "152:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - }, - "typeName": { - "id": 91, - "name": "uint48", - "nodeType": "ElementaryTypeName", - "src": "152:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 94, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "178:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 93, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "178:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 96, - "name": "depositSum", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "251:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 95, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "251:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 98, - "name": "numDeposits", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "276:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 97, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "276:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 100, - "name": "depositInWei", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "302:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 99, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "302:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 102, - "name": "numParticipants", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "329:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 101, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "329:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 104, - "name": "title", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "359:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 103, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "359:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 107, - "name": "encryptedDestAddresses", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "382:30:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 105, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "382:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 106, - "length": null, - "nodeType": "ArrayTypeName", - "src": "382:7:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 110, - "name": "destAddresses", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "422:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 108, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "422:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 109, - "length": null, - "nodeType": "ArrayTypeName", - "src": "422:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 114, - "name": "deposit", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "455:32:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 113, - "keyType": { - "id": 111, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "463:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "455:24:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 112, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "474:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Deal", - "nodeType": "StructDefinition", - "scope": 830, - "src": "103:391:1", - "visibility": "public" - }, - { - "constant": false, - "id": 118, - "name": "deals", - "nodeType": "VariableDeclaration", - "scope": 830, - "src": "500:19:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal[]" - }, - "typeName": { - "baseType": { - "contractScope": null, - "id": 116, - "name": "Deal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 115, - "src": "500:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal" - } - }, - "id": 117, - "length": null, - "nodeType": "ArrayTypeName", - "src": "500:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage_ptr", - "typeString": "struct CoinMixer.Deal[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 136, - "name": "NewDeal", - "nodeType": "EventDefinition", - "parameters": { - "id": 135, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 120, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 136, - "src": "549:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 119, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "549:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 122, - "indexed": true, - "name": "_dealId", - "nodeType": "VariableDeclaration", - "scope": 136, - "src": "579:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 121, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "579:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "indexed": false, - "name": "_startTime", - "nodeType": "VariableDeclaration", - "scope": 136, - "src": "611:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - }, - "typeName": { - "id": 123, - "name": "uint48", - "nodeType": "ElementaryTypeName", - "src": "611:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 126, - "indexed": false, - "name": "_title", - "nodeType": "VariableDeclaration", - "scope": 136, - "src": "638:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 125, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "638:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 128, - "indexed": false, - "name": "_depositInWei", - "nodeType": "VariableDeclaration", - "scope": 136, - "src": "662:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 127, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "662:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 130, - "indexed": false, - "name": "_numParticipants", - "nodeType": "VariableDeclaration", - "scope": 136, - "src": "690:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 129, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "690:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 132, - "indexed": false, - "name": "_success", - "nodeType": "VariableDeclaration", - "scope": 136, - "src": "721:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 131, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "721:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 134, - "indexed": false, - "name": "_err", - "nodeType": "VariableDeclaration", - "scope": 136, - "src": "744:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 133, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "744:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "539:222:1" - }, - "src": "526:236:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 150, - "name": "Deposit", - "nodeType": "EventDefinition", - "parameters": { - "id": 149, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 138, - "indexed": true, - "name": "_depositor", - "nodeType": "VariableDeclaration", - "scope": 150, - "src": "790:26:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 137, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "790:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 140, - "indexed": true, - "name": "_dealId", - "nodeType": "VariableDeclaration", - "scope": 150, - "src": "826:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 139, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "826:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 142, - "indexed": false, - "name": "_encryptedDestAddress", - "nodeType": "VariableDeclaration", - "scope": 150, - "src": "858:27:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 141, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "858:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 144, - "indexed": false, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 150, - "src": "895:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 143, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "895:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 146, - "indexed": false, - "name": "_success", - "nodeType": "VariableDeclaration", - "scope": 150, - "src": "916:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 145, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "916:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 148, - "indexed": false, - "name": "_err", - "nodeType": "VariableDeclaration", - "scope": 150, - "src": "939:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 147, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "939:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "780:176:1" - }, - "src": "767:190:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 165, - "name": "Distribute", - "nodeType": "EventDefinition", - "parameters": { - "id": 164, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 152, - "indexed": true, - "name": "_dealId", - "nodeType": "VariableDeclaration", - "scope": 165, - "src": "988:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 151, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "988:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 154, - "indexed": false, - "name": "individualAmountInWei", - "nodeType": "VariableDeclaration", - "scope": 165, - "src": "1020:26:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 153, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1020:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 157, - "indexed": false, - "name": "destAddresses", - "nodeType": "VariableDeclaration", - "scope": 165, - "src": "1056:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 155, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1056:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 156, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1056:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 159, - "indexed": false, - "name": "nbTransfers", - "nodeType": "VariableDeclaration", - "scope": 165, - "src": "1089:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 158, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1089:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 161, - "indexed": false, - "name": "_success", - "nodeType": "VariableDeclaration", - "scope": 165, - "src": "1117:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 160, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1117:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 163, - "indexed": false, - "name": "_err", - "nodeType": "VariableDeclaration", - "scope": 165, - "src": "1140:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 162, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1140:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "978:179:1" - }, - "src": "962:196:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 171, - "name": "TransferredToken", - "nodeType": "EventDefinition", - "parameters": { - "id": 170, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 167, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 171, - "src": "1187:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 166, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1187:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 169, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 171, - "src": "1207:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 168, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1207:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1186:35:1" - }, - "src": "1164:58:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 177, - "name": "FailedTransfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 176, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 173, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 177, - "src": "1248:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 172, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1248:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 175, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 177, - "src": "1268:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 174, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1268:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1247:35:1" - }, - "src": "1227:56:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 181, - "name": "DealFullyFunded", - "nodeType": "EventDefinition", - "parameters": { - "id": 180, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 179, - "indexed": true, - "name": "_dealId", - "nodeType": "VariableDeclaration", - "scope": 181, - "src": "1311:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 178, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1311:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1310:24:1" - }, - "src": "1289:46:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 187, - "name": "DealExecuted", - "nodeType": "EventDefinition", - "parameters": { - "id": 186, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 183, - "indexed": true, - "name": "_dealId", - "nodeType": "VariableDeclaration", - "scope": 187, - "src": "1359:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 182, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1359:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 185, - "indexed": false, - "name": "_success", - "nodeType": "VariableDeclaration", - "scope": 187, - "src": "1383:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 184, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1383:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1358:39:1" - }, - "src": "1340:58:1" - }, - { - "canonicalName": "CoinMixer.ReturnValue", - "id": 190, - "members": [ - { - "id": 188, - "name": "Ok", - "nodeType": "EnumValue", - "src": "1491:2:1" - }, - { - "id": 189, - "name": "Error", - "nodeType": "EnumValue", - "src": "1495:5:1" - } - ], - "name": "ReturnValue", - "nodeType": "EnumDefinition", - "src": "1473:28:1" - }, - { - "body": { - "id": 201, - "nodeType": "Block", - "src": "1550:48:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 199, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 195, - "name": "enigma", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "1560:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Enigma_$2657", - "typeString": "contract Enigma" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 197, - "name": "_enigmaAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 192, - "src": "1576:14:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 196, - "name": "Enigma", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2657, - "src": "1569:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Enigma_$2657_$", - "typeString": "type(contract Enigma)" - } - }, - "id": 198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1569:22:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Enigma_$2657", - "typeString": "contract Enigma" - } - }, - "src": "1560:31:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Enigma_$2657", - "typeString": "contract Enigma" - } - }, - "id": 200, - "nodeType": "ExpressionStatement", - "src": "1560:31:1" - } - ] - }, - "documentation": null, - "id": 202, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 193, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 192, - "name": "_enigmaAddress", - "nodeType": "VariableDeclaration", - "scope": 202, - "src": "1519:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 191, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1519:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1518:24:1" - }, - "payable": false, - "returnParameters": { - "id": 194, - "nodeType": "ParameterList", - "parameters": [], - "src": "1550:0:1" - }, - "scope": 830, - "src": "1507:91:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 323, - "nodeType": "Block", - "src": "1721:831:1", - "statements": [ - { - "assignments": [ - 214 - ], - "declarations": [ - { - "constant": false, - "id": 214, - "name": "dealId", - "nodeType": "VariableDeclaration", - "scope": 324, - "src": "1731:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 213, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1731:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 219, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 216, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1754:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 217, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1754:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 215, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1747:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint32_$", - "typeString": "type(uint32)" - }, - "typeName": "uint32" - }, - "id": 218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1747:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1731:36:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "1778:14:1", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 220, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1778:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 222, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1778:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 224, - "nodeType": "ExpressionStatement", - "src": "1778:14:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 225, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1802:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 227, - "indexExpression": { - "argumentTypes": null, - "id": 226, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "1808:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1802:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 228, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "organizer", - "nodeType": "MemberAccess", - "referencedDeclaration": 90, - "src": "1802:23:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 229, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "1828:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1828:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1802:36:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 232, - "nodeType": "ExpressionStatement", - "src": "1802:36:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 233, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1848:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 235, - "indexExpression": { - "argumentTypes": null, - "id": 234, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "1854:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1848:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 236, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "title", - "nodeType": "MemberAccess", - "referencedDeclaration": 104, - "src": "1848:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 237, - "name": "_title", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 204, - "src": "1870:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "1848:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 239, - "nodeType": "ExpressionStatement", - "src": "1848:28:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 240, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1886:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 242, - "indexExpression": { - "argumentTypes": null, - "id": 241, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "1892:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1886:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 243, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "depositSum", - "nodeType": "MemberAccess", - "referencedDeclaration": 96, - "src": "1886:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 244, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1913:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1886:28:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 246, - "nodeType": "ExpressionStatement", - "src": "1886:28:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 252, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 247, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1924:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 249, - "indexExpression": { - "argumentTypes": null, - "id": 248, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "1930:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1924:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 250, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "numDeposits", - "nodeType": "MemberAccess", - "referencedDeclaration": 98, - "src": "1924:25:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 251, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1952:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1924:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 253, - "nodeType": "ExpressionStatement", - "src": "1924:29:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 261, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 254, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1963:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 256, - "indexExpression": { - "argumentTypes": null, - "id": 255, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "1969:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1963:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 257, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "startTime", - "nodeType": "MemberAccess", - "referencedDeclaration": 92, - "src": "1963:23:1", - "typeDescriptions": { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 259, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3450, - "src": "1996:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 258, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1989:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint48_$", - "typeString": "type(uint48)" - }, - "typeName": "uint48" - }, - "id": 260, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1989:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - } - }, - "src": "1963:37:1", - "typeDescriptions": { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - } - }, - "id": 262, - "nodeType": "ExpressionStatement", - "src": "1963:37:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 263, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "2010:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 265, - "indexExpression": { - "argumentTypes": null, - "id": 264, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "2016:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2010:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 266, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "depositInWei", - "nodeType": "MemberAccess", - "referencedDeclaration": 100, - "src": "2010:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 267, - "name": "_depositInWei", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 206, - "src": "2039:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2010:42:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 269, - "nodeType": "ExpressionStatement", - "src": "2010:42:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 270, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "2062:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 272, - "indexExpression": { - "argumentTypes": null, - "id": 271, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "2068:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2062:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 273, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "numParticipants", - "nodeType": "MemberAccess", - "referencedDeclaration": 102, - "src": "2062:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 274, - "name": "_numParticipants", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "2094:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2062:48:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 276, - "nodeType": "ExpressionStatement", - "src": "2062:48:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 277, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "2120:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 279, - "indexExpression": { - "argumentTypes": null, - "id": 278, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "2126:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2120:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 280, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "encryptedDestAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 107, - "src": "2120:36:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 284, - "name": "_numParticipants", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "2171:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 283, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "2159:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bytes_memory_$dyn_memory_$", - "typeString": "function (uint256) pure returns (bytes memory[] memory)" - }, - "typeName": { - "baseType": { - "id": 281, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2163:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 282, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2163:7:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - } - }, - "id": 285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2159:29:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory", - "typeString": "bytes memory[] memory" - } - }, - "src": "2120:68:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 287, - "nodeType": "ExpressionStatement", - "src": "2120:68:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 288, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "2198:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 290, - "indexExpression": { - "argumentTypes": null, - "id": 289, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "2204:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2198:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 291, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "destAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "2198:27:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 295, - "name": "_numParticipants", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "2242:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 294, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "2228:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 292, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2232:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 293, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2232:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2228:31:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "src": "2198:61:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 298, - "nodeType": "ExpressionStatement", - "src": "2198:61:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 299, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "2269:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 301, - "indexExpression": { - "argumentTypes": null, - "id": 300, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "2275:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2269:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 302, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 94, - "src": "2269:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 303, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2292:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2269:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 305, - "nodeType": "ExpressionStatement", - "src": "2269:24:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 307, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "2329:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2329:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 309, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "2353:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 311, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3450, - "src": "2380:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 310, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2373:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint48_$", - "typeString": "type(uint48)" - }, - "typeName": "uint48" - }, - "id": 312, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2373:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - } - }, - { - "argumentTypes": null, - "id": 313, - "name": "_title", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 204, - "src": "2398:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 314, - "name": "_depositInWei", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 206, - "src": "2418:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 315, - "name": "_numParticipants", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "2445:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 316, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2475:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "hexValue": "616c6c20676f6f64", - "id": 317, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2493:10:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_111585a7e4eebbd44457780c7d70df2a750ced4b0ed7f8e524bfa2b2decf1b05", - "typeString": "literal_string \"all good\"" - }, - "value": "all good" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_111585a7e4eebbd44457780c7d70df2a750ced4b0ed7f8e524bfa2b2decf1b05", - "typeString": "literal_string \"all good\"" - } - ], - "id": 306, - "name": "NewDeal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 136, - "src": "2308:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint32_$_t_uint48_$_t_bytes32_$_t_uint256_$_t_uint256_$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (address,uint32,uint48,bytes32,uint256,uint256,bool,string memory)" - } - }, - "id": 318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2308:205:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 319, - "nodeType": "EmitStatement", - "src": "2303:210:1" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 320, - "name": "ReturnValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 190, - "src": "2531:11:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ReturnValue_$190_$", - "typeString": "type(enum CoinMixer.ReturnValue)" - } - }, - "id": 321, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Ok", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2531:14:1", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - } - }, - "functionReturnParameters": 212, - "id": 322, - "nodeType": "Return", - "src": "2524:21:1" - } - ] - }, - "documentation": null, - "id": 324, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "newDeal", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 209, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 204, - "name": "_title", - "nodeType": "VariableDeclaration", - "scope": 324, - "src": "1621:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 203, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1621:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 206, - "name": "_depositInWei", - "nodeType": "VariableDeclaration", - "scope": 324, - "src": "1637:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 205, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1637:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 208, - "name": "_numParticipants", - "nodeType": "VariableDeclaration", - "scope": 324, - "src": "1657:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 207, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1657:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1620:59:1" - }, - "payable": false, - "returnParameters": { - "id": 212, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 211, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 324, - "src": "1704:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - }, - "typeName": { - "contractScope": null, - "id": 210, - "name": "ReturnValue", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 190, - "src": "1704:11:1", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1703:13:1" - }, - "scope": 830, - "src": "1604:948:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 443, - "nodeType": "Block", - "src": "2675:878:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 337, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 334, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "2693:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2693:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 336, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2705:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2693:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4465706f7369742076616c7565206d75737420626520706f7369746976652e", - "id": 338, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2708:33:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b5b21311df3fa16c7aaa1c5a632aa950e0d41433f8ae7bfd354733f355da73c3", - "typeString": "literal_string \"Deposit value must be positive.\"" - }, - "value": "Deposit value must be positive." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b5b21311df3fa16c7aaa1c5a632aa950e0d41433f8ae7bfd354733f355da73c3", - "typeString": "literal_string \"Deposit value must be positive.\"" - } - ], - "id": 333, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "2685:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2685:57:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 340, - "nodeType": "ExpressionStatement", - "src": "2685:57:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 342, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "2760:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 344, - "indexExpression": { - "argumentTypes": null, - "id": 343, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 326, - "src": "2766:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2760:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 345, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 94, - "src": "2760:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 346, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2784:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2760:25:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496c6c6567616c20737461746520666f72206465706f736974732e", - "id": 348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2787:29:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e0b28cde793bcc610ccba7caaf6623d6c99b0939e9c3af7d33f745581edff24c", - "typeString": "literal_string \"Illegal state for deposits.\"" - }, - "value": "Illegal state for deposits." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e0b28cde793bcc610ccba7caaf6623d6c99b0939e9c3af7d33f745581edff24c", - "typeString": "literal_string \"Illegal state for deposits.\"" - } - ], - "id": 341, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "2752:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 349, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2752:65:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 350, - "nodeType": "ExpressionStatement", - "src": "2752:65:1" - }, - { - "assignments": [ - 352 - ], - "declarations": [ - { - "constant": false, - "id": 352, - "name": "deal", - "nodeType": "VariableDeclaration", - "scope": 444, - "src": "2828:17:1", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal" - }, - "typeName": { - "contractScope": null, - "id": 351, - "name": "Deal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 115, - "src": "2828:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 356, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 353, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "2848:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 355, - "indexExpression": { - "argumentTypes": null, - "id": 354, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 326, - "src": "2854:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2848:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2828:33:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 358, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "2880:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2880:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 360, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "2892:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 361, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "depositInWei", - "nodeType": "MemberAccess", - "referencedDeclaration": 100, - "src": "2892:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2880:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 363, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2879:31:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 364, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2914:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2879:36:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4465706f7369742076616c7565206d7573742062652061206d756c7469706c65206f6620636c61696d2076616c75652e", - "id": 366, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2917:50:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7f10e4bbbb153e2913677eb23ae6c0b8adc00d267af432ea6f232b534ca5b819", - "typeString": "literal_string \"Deposit value must be a multiple of claim value.\"" - }, - "value": "Deposit value must be a multiple of claim value." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7f10e4bbbb153e2913677eb23ae6c0b8adc00d267af432ea6f232b534ca5b819", - "typeString": "literal_string \"Deposit value must be a multiple of claim value.\"" - } - ], - "id": 357, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "2871:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2871:97:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 368, - "nodeType": "ExpressionStatement", - "src": "2871:97:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 370, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "2986:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 371, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "deposit", - "nodeType": "MemberAccess", - "referencedDeclaration": 114, - "src": "2986:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 374, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 372, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "2999:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2999:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2986:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 375, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3014:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2986:29:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74206465706f7369742074776963652077697468207468652073616d6520616464726573732e", - "id": 377, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3017:45:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_468ad83de70234035feed93053cb5355954cb40a49b2bcb90fe83e513e3f2aa0", - "typeString": "literal_string \"Cannot deposit twice with the same address.\"" - }, - "value": "Cannot deposit twice with the same address." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_468ad83de70234035feed93053cb5355954cb40a49b2bcb90fe83e513e3f2aa0", - "typeString": "literal_string \"Cannot deposit twice with the same address.\"" - } - ], - "id": 369, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "2978:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 378, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2978:85:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 379, - "nodeType": "ExpressionStatement", - "src": "2978:85:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 380, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3100:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 382, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "depositSum", - "nodeType": "MemberAccess", - "referencedDeclaration": 96, - "src": "3100:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 383, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3119:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3119:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3100:28:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 386, - "nodeType": "ExpressionStatement", - "src": "3100:28:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 387, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3138:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 391, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "deposit", - "nodeType": "MemberAccess", - "referencedDeclaration": 114, - "src": "3138:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 392, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 389, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3151:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3151:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3138:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 393, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3165:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3165:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3138:36:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 396, - "nodeType": "ExpressionStatement", - "src": "3138:36:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 397, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3184:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 401, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "encryptedDestAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 107, - "src": "3184:27:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 402, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 399, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3212:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 400, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "numDeposits", - "nodeType": "MemberAccess", - "referencedDeclaration": 98, - "src": "3212:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3184:45:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 403, - "name": "encryptedDestAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 328, - "src": "3232:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "3184:68:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 405, - "nodeType": "ExpressionStatement", - "src": "3184:68:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 406, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3262:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 408, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "numDeposits", - "nodeType": "MemberAccess", - "referencedDeclaration": 98, - "src": "3262:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 409, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3282:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3262:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 411, - "nodeType": "ExpressionStatement", - "src": "3262:21:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 413, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3307:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3307:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 415, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 326, - "src": "3319:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "id": 416, - "name": "encryptedDestAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 328, - "src": "3327:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 417, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3349:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3349:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3360:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "hexValue": "616c6c20676f6f64", - "id": 420, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3366:10:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_111585a7e4eebbd44457780c7d70df2a750ced4b0ed7f8e524bfa2b2decf1b05", - "typeString": "literal_string \"all good\"" - }, - "value": "all good" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_111585a7e4eebbd44457780c7d70df2a750ced4b0ed7f8e524bfa2b2decf1b05", - "typeString": "literal_string \"all good\"" - } - ], - "id": 412, - "name": "Deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "3299:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint32_$_t_bytes_memory_ptr_$_t_uint256_$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (address,uint32,bytes memory,uint256,bool,string memory)" - } - }, - "id": 421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3299:78:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 422, - "nodeType": "EmitStatement", - "src": "3294:83:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 423, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3392:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 424, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "numDeposits", - "nodeType": "MemberAccess", - "referencedDeclaration": 98, - "src": "3392:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 425, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3412:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 426, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "numParticipants", - "nodeType": "MemberAccess", - "referencedDeclaration": 102, - "src": "3412:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3392:40:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 439, - "nodeType": "IfStatement", - "src": "3388:128:1", - "trueBody": { - "id": 438, - "nodeType": "Block", - "src": "3434:82:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 432, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 428, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3448:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 430, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 94, - "src": "3448:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 431, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3462:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3448:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 433, - "nodeType": "ExpressionStatement", - "src": "3448:15:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 435, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 326, - "src": "3498:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - ], - "id": 434, - "name": "DealFullyFunded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 181, - "src": "3482:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint32_$returns$__$", - "typeString": "function (uint32)" - } - }, - "id": 436, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3482:23:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 437, - "nodeType": "EmitStatement", - "src": "3477:28:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 440, - "name": "ReturnValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 190, - "src": "3532:11:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ReturnValue_$190_$", - "typeString": "type(enum CoinMixer.ReturnValue)" - } - }, - "id": 441, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Ok", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3532:14:1", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - } - }, - "functionReturnParameters": 332, - "id": 442, - "nodeType": "Return", - "src": "3525:21:1" - } - ] - }, - "documentation": null, - "id": 444, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "makeDeposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 329, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 326, - "name": "dealId", - "nodeType": "VariableDeclaration", - "scope": 444, - "src": "2579:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 325, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "2579:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 328, - "name": "encryptedDestAddress", - "nodeType": "VariableDeclaration", - "scope": 444, - "src": "2594:26:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 327, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2594:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2578:43:1" - }, - "payable": true, - "returnParameters": { - "id": 332, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 331, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 444, - "src": "2658:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - }, - "typeName": { - "contractScope": null, - "id": 330, - "name": "ReturnValue", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 190, - "src": "2658:11:1", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2657:13:1" - }, - "scope": 830, - "src": "2558:995:1", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 526, - "nodeType": "Block", - "src": "3691:710:1", - "statements": [ - { - "assignments": [ - 460 - ], - "declarations": [ - { - "constant": false, - "id": 460, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 527, - "src": "3938:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 459, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3938:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 463, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 461, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "3947:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 462, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3947:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3938:29:1" - }, - { - "body": { - "id": 520, - "nodeType": "Block", - "src": "3991:364:1", - "statements": [ - { - "assignments": [ - 468 - ], - "declarations": [ - { - "constant": false, - "id": 468, - "name": "j", - "nodeType": "VariableDeclaration", - "scope": 527, - "src": "4005:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 467, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4005:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 481, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 473, - "name": "rand", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 451, - "src": "4046:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4053:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4046:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 471, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3435, - "src": "4029:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 472, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4029:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4029:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 470, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3442, - "src": "4019:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4019:37:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 469, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4014:4:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4014:43:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 479, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 460, - "src": "4060:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4014:47:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4005:56:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 482, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4106:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 484, - "indexExpression": { - "argumentTypes": null, - "id": 483, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 468, - "src": "4120:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4106:16:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 485, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4126:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 489, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 486, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 460, - "src": "4140:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 487, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4144:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4140:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4126:20:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4106:40:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 516, - "nodeType": "IfStatement", - "src": "4102:226:1", - "trueBody": { - "id": 515, - "nodeType": "Block", - "src": "4148:180:1", - "statements": [ - { - "assignments": [ - 492 - ], - "declarations": [ - { - "constant": false, - "id": 492, - "name": "destAddress", - "nodeType": "VariableDeclaration", - "scope": 527, - "src": "4166:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 491, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4166:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 498, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 493, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4188:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 497, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 494, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 460, - "src": "4202:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 495, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4206:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4202:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4188:20:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4166:42:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 507, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 499, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4226:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 503, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 500, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 460, - "src": "4240:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 501, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4244:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4240:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4226:20:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 504, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4249:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 506, - "indexExpression": { - "argumentTypes": null, - "id": 505, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 468, - "src": "4263:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4249:16:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4226:39:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 508, - "nodeType": "ExpressionStatement", - "src": "4226:39:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 513, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 509, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4283:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 511, - "indexExpression": { - "argumentTypes": null, - "id": 510, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 468, - "src": "4297:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4283:16:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 512, - "name": "destAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 492, - "src": "4302:11:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4283:30:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 514, - "nodeType": "ExpressionStatement", - "src": "4283:30:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": false, - "src": "4341:3:1", - "subExpression": { - "argumentTypes": null, - "id": 517, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 460, - "src": "4341:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 519, - "nodeType": "ExpressionStatement", - "src": "4341:3:1" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 464, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 460, - "src": "3984:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 465, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3988:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3984:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 521, - "nodeType": "WhileStatement", - "src": "3977:378:1" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 522, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 446, - "src": "4372:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "id": 523, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4380:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - } - ], - "id": 524, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "4371:23:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint32_$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "tuple(uint32,address[] memory)" - } - }, - "functionReturnParameters": 458, - "id": 525, - "nodeType": "Return", - "src": "4364:30:1" - } - ] - }, - "documentation": null, - "id": 527, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "mixAddresses", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 452, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 446, - "name": "dealId", - "nodeType": "VariableDeclaration", - "scope": 527, - "src": "3581:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 445, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "3581:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 449, - "name": "destAddresses", - "nodeType": "VariableDeclaration", - "scope": 527, - "src": "3596:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 447, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3596:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 448, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3596:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 451, - "name": "rand", - "nodeType": "VariableDeclaration", - "scope": 527, - "src": "3621:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 450, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3621:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3580:54:1" - }, - "payable": false, - "returnParameters": { - "id": 458, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 454, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 527, - "src": "3668:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 453, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "3668:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 457, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 527, - "src": "3676:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 455, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3676:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 456, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3676:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3667:19:1" - }, - "scope": 830, - "src": "3559:842:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 540, - "nodeType": "Block", - "src": "4429:104:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 530, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "4447:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4447:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 533, - "name": "enigma", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "4469:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Enigma_$2657", - "typeString": "contract Enigma" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Enigma_$2657", - "typeString": "contract Enigma" - } - ], - "id": 532, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4461:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4461:15:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4447:29:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "53656e646572206973206e6f742074686520456e69676d6120636f6e74726163742e", - "id": 536, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4478:36:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d9941166e9cc0d6780d74833d92481cea08b004084a054f4983bbafea67c785d", - "typeString": "literal_string \"Sender is not the Enigma contract.\"" - }, - "value": "Sender is not the Enigma contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d9941166e9cc0d6780d74833d92481cea08b004084a054f4983bbafea67c785d", - "typeString": "literal_string \"Sender is not the Enigma contract.\"" - } - ], - "id": 529, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "4439:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4439:76:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 538, - "nodeType": "ExpressionStatement", - "src": "4439:76:1" - }, - { - "id": 539, - "nodeType": "PlaceholderStatement", - "src": "4525:1:1" - } - ] - }, - "documentation": null, - "id": 541, - "name": "onlyEnigma", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 528, - "nodeType": "ParameterList", - "parameters": [], - "src": "4426:2:1" - }, - "src": "4407:126:1", - "visibility": "internal" - }, - { - "body": { - "id": 623, - "nodeType": "Block", - "src": "4657:619:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 554, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "4735:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 556, - "indexExpression": { - "argumentTypes": null, - "id": 555, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "4741:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4735:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 557, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 94, - "src": "4735:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 558, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4759:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4735:25:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4465616c206973206e6f742065786563757465642e", - "id": 560, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4762:23:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a8c7515e1428aba3337ad4f7e47e80252a21dcd3827c7eca2dfa5732c02ad7ad", - "typeString": "literal_string \"Deal is not executed.\"" - }, - "value": "Deal is not executed." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a8c7515e1428aba3337ad4f7e47e80252a21dcd3827c7eca2dfa5732c02ad7ad", - "typeString": "literal_string \"Deal is not executed.\"" - } - ], - "id": 553, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "4727:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4727:59:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 562, - "nodeType": "ExpressionStatement", - "src": "4727:59:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 563, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "4796:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 565, - "indexExpression": { - "argumentTypes": null, - "id": 564, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "4802:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4796:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 566, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "destAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "4796:27:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 567, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 546, - "src": "4826:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "src": "4796:43:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 569, - "nodeType": "ExpressionStatement", - "src": "4796:43:1" - }, - { - "body": { - "id": 597, - "nodeType": "Block", - "src": "4912:92:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 591, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "4966:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 593, - "indexExpression": { - "argumentTypes": null, - "id": 592, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "4972:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4966:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 594, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "depositInWei", - "nodeType": "MemberAccess", - "referencedDeclaration": 100, - "src": "4966:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 584, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "4926:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 586, - "indexExpression": { - "argumentTypes": null, - "id": 585, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "4932:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4926:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 587, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "4926:27:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 589, - "indexExpression": { - "argumentTypes": null, - "id": 588, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 571, - "src": "4954:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4926:30:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4926:39:1", - "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4926:67:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 596, - "nodeType": "ExpressionStatement", - "src": "4926:67:1" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 574, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 571, - "src": "4867:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 575, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "4871:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 577, - "indexExpression": { - "argumentTypes": null, - "id": 576, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "4877:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4871:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 578, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "4871:27:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 579, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4871:34:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4867:38:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 598, - "initializationExpression": { - "assignments": [ - 571 - ], - "declarations": [ - { - "constant": false, - "id": 571, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 624, - "src": "4855:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 570, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4855:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 573, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 572, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4864:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "4855:10:1" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 582, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "4907:3:1", - "subExpression": { - "argumentTypes": null, - "id": 581, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 571, - "src": "4907:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 583, - "nodeType": "ExpressionStatement", - "src": "4907:3:1" - }, - "nodeType": "ForStatement", - "src": "4850:154:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 600, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "5043:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 601, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5063:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 603, - "indexExpression": { - "argumentTypes": null, - "id": 602, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "5069:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5063:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 604, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "depositInWei", - "nodeType": "MemberAccess", - "referencedDeclaration": 100, - "src": "5063:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 605, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5103:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 607, - "indexExpression": { - "argumentTypes": null, - "id": 606, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "5109:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5103:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 608, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "5103:27:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 610, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5151:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 612, - "indexExpression": { - "argumentTypes": null, - "id": 611, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "5157:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5151:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 613, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "5151:27:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 614, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5151:34:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 609, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5144:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint32_$", - "typeString": "type(uint32)" - }, - "typeName": "uint32" - }, - "id": 615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5144:42:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 616, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5200:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "hexValue": "616c6c20676f6f64", - "id": 617, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5218:10:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_111585a7e4eebbd44457780c7d70df2a750ced4b0ed7f8e524bfa2b2decf1b05", - "typeString": "literal_string \"all good\"" - }, - "value": "all good" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_111585a7e4eebbd44457780c7d70df2a750ced4b0ed7f8e524bfa2b2decf1b05", - "typeString": "literal_string \"all good\"" - } - ], - "id": 599, - "name": "Distribute", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "5019:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint32_$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_uint32_$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (uint32,uint256,address[] memory,uint32,bool,string memory)" - } - }, - "id": 618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5019:219:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 619, - "nodeType": "EmitStatement", - "src": "5014:224:1" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 620, - "name": "ReturnValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 190, - "src": "5255:11:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ReturnValue_$190_$", - "typeString": "type(enum CoinMixer.ReturnValue)" - } - }, - "id": 621, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Ok", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5255:14:1", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - } - }, - "functionReturnParameters": 552, - "id": 622, - "nodeType": "Return", - "src": "5248:21:1" - } - ] - }, - "documentation": null, - "id": 624, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [], - "id": 549, - "modifierName": { - "argumentTypes": null, - "id": 548, - "name": "onlyEnigma", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 541, - "src": "4614:10:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "4614:12:1" - } - ], - "name": "distribute", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 547, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 543, - "name": "dealId", - "nodeType": "VariableDeclaration", - "scope": 624, - "src": "4559:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 542, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "4559:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 546, - "name": "destAddresses", - "nodeType": "VariableDeclaration", - "scope": 624, - "src": "4574:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 544, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4574:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 545, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4574:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4558:40:1" - }, - "payable": false, - "returnParameters": { - "id": 552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 551, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 624, - "src": "4640:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - }, - "typeName": { - "contractScope": null, - "id": 550, - "name": "ReturnValue", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 190, - "src": "4640:11:1", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4639:13:1" - }, - "scope": 830, - "src": "4539:737:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 728, - "nodeType": "Block", - "src": "5348:597:1", - "statements": [ - { - "assignments": [ - 639 - ], - "declarations": [ - { - "constant": false, - "id": 639, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 729, - "src": "5411:20:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 637, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5411:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 638, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5411:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 646, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 643, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5445:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 644, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5445:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "5434:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - }, - "typeName": { - "baseType": { - "id": 640, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5438:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 641, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5438:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - } - }, - "id": 645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5434:24:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5411:47:1" - }, - { - "assignments": [ - 650 - ], - "declarations": [ - { - "constant": false, - "id": 650, - "name": "participates", - "nodeType": "VariableDeclaration", - "scope": 729, - "src": "5468:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 648, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5468:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 649, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5468:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 657, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 654, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5508:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 655, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5508:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "5497:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - }, - "typeName": { - "baseType": { - "id": 651, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5501:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 652, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5501:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - } - }, - "id": 656, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5497:24:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5468:53:1" - }, - { - "assignments": [ - 661 - ], - "declarations": [ - { - "constant": false, - "id": 661, - "name": "organizes", - "nodeType": "VariableDeclaration", - "scope": 729, - "src": "5531:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 659, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5531:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 660, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5531:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 668, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 665, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5568:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 666, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5568:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "5557:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - }, - "typeName": { - "baseType": { - "id": 662, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5561:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 663, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5561:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - } - }, - "id": 667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5557:24:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5531:50:1" - }, - { - "body": { - "id": 721, - "nodeType": "Block", - "src": "5632:257:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 680, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 639, - "src": "5646:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 682, - "indexExpression": { - "argumentTypes": null, - "id": 681, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "5653:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5646:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 683, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5658:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 685, - "indexExpression": { - "argumentTypes": null, - "id": 684, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "5664:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5658:8:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 686, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 94, - "src": "5658:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "5646:27:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 688, - "nodeType": "ExpressionStatement", - "src": "5646:27:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 689, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5692:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 691, - "indexExpression": { - "argumentTypes": null, - "id": 690, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "5698:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5692:8:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 692, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "deposit", - "nodeType": "MemberAccess", - "referencedDeclaration": 114, - "src": "5692:16:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 695, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 693, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "5709:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5709:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5692:28:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5723:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5692:32:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 705, - "nodeType": "IfStatement", - "src": "5688:90:1", - "trueBody": { - "id": 704, - "nodeType": "Block", - "src": "5726:52:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 698, - "name": "participates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 650, - "src": "5744:12:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 700, - "indexExpression": { - "argumentTypes": null, - "id": 699, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "5757:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5744:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 701, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5762:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5744:19:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 703, - "nodeType": "ExpressionStatement", - "src": "5744:19:1" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 706, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5796:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 708, - "indexExpression": { - "argumentTypes": null, - "id": 707, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "5802:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5796:8:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 709, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "organizer", - "nodeType": "MemberAccess", - "referencedDeclaration": 90, - "src": "5796:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 710, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "5818:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5818:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5796:32:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 720, - "nodeType": "IfStatement", - "src": "5792:87:1", - "trueBody": { - "id": 719, - "nodeType": "Block", - "src": "5830:49:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 713, - "name": "organizes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 661, - "src": "5848:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 715, - "indexExpression": { - "argumentTypes": null, - "id": 714, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "5858:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5848:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 716, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5863:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5848:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 718, - "nodeType": "ExpressionStatement", - "src": "5848:16:1" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 673, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "5609:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 674, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5613:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 675, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5613:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5609:16:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 722, - "initializationExpression": { - "assignments": [ - 670 - ], - "declarations": [ - { - "constant": false, - "id": 670, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 729, - "src": "5597:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 669, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5597:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 672, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 671, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5606:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "5597:10:1" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "5627:3:1", - "subExpression": { - "argumentTypes": null, - "id": 677, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "5627:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 679, - "nodeType": "ExpressionStatement", - "src": "5627:3:1" - }, - "nodeType": "ForStatement", - "src": "5592:297:1" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 723, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 639, - "src": "5906:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 724, - "name": "participates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 650, - "src": "5914:12:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 725, - "name": "organizes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 661, - "src": "5928:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - } - ], - "id": 726, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "5905:33:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "tuple(uint256[] memory,uint256[] memory,uint256[] memory)" - } - }, - "functionReturnParameters": 635, - "id": 727, - "nodeType": "Return", - "src": "5898:40:1" - } - ] - }, - "documentation": null, - "id": 729, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "listDeals", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 625, - "nodeType": "ParameterList", - "parameters": [], - "src": "5300:2:1" - }, - "payable": false, - "returnParameters": { - "id": 635, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 628, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 729, - "src": "5324:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 626, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5324:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 627, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5324:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 631, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 729, - "src": "5332:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 629, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5332:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 630, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5332:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 634, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 729, - "src": "5340:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 632, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5340:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 633, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5340:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5323:24:1" - }, - "scope": 830, - "src": "5282:663:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 797, - "nodeType": "Block", - "src": "6063:475:1", - "statements": [ - { - "assignments": [ - 747 - ], - "declarations": [ - { - "constant": false, - "id": 747, - "name": "title", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6109:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 746, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6109:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 752, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 748, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "6125:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 750, - "indexExpression": { - "argumentTypes": null, - "id": 749, - "name": "_dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 731, - "src": "6131:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6125:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 751, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "title", - "nodeType": "MemberAccess", - "referencedDeclaration": 104, - "src": "6125:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6109:36:1" - }, - { - "assignments": [ - 754 - ], - "declarations": [ - { - "constant": false, - "id": 754, - "name": "numParticipants", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6155:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 753, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6155:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 759, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 755, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "6178:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 757, - "indexExpression": { - "argumentTypes": null, - "id": 756, - "name": "_dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 731, - "src": "6184:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6178:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 758, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "numParticipants", - "nodeType": "MemberAccess", - "referencedDeclaration": 102, - "src": "6178:30:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6155:53:1" - }, - { - "assignments": [ - 761 - ], - "declarations": [ - { - "constant": false, - "id": 761, - "name": "deposit", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6218:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 760, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6218:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 766, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 762, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "6233:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 764, - "indexExpression": { - "argumentTypes": null, - "id": 763, - "name": "_dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 731, - "src": "6239:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6233:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 765, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "depositInWei", - "nodeType": "MemberAccess", - "referencedDeclaration": 100, - "src": "6233:27:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6218:42:1" - }, - { - "assignments": [ - 768 - ], - "declarations": [ - { - "constant": false, - "id": 768, - "name": "numDeposits", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6270:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 767, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6270:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 773, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 769, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "6289:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 771, - "indexExpression": { - "argumentTypes": null, - "id": 770, - "name": "_dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 731, - "src": "6295:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6289:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 772, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "numDeposits", - "nodeType": "MemberAccess", - "referencedDeclaration": 98, - "src": "6289:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6270:45:1" - }, - { - "assignments": [ - 775 - ], - "declarations": [ - { - "constant": false, - "id": 775, - "name": "depositSum", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6325:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 774, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6325:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 780, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 776, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "6343:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 778, - "indexExpression": { - "argumentTypes": null, - "id": 777, - "name": "_dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 731, - "src": "6349:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6343:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 779, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "depositSum", - "nodeType": "MemberAccess", - "referencedDeclaration": 96, - "src": "6343:25:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6325:43:1" - }, - { - "assignments": [ - 782 - ], - "declarations": [ - { - "constant": false, - "id": 782, - "name": "numDestAddresses", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6378:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 781, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6378:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 788, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 783, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "6402:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 785, - "indexExpression": { - "argumentTypes": null, - "id": 784, - "name": "_dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 731, - "src": "6408:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6402:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 786, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "6402:28:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 787, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6402:35:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6378:59:1" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 789, - "name": "title", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 747, - "src": "6456:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 790, - "name": "numParticipants", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 754, - "src": "6463:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 791, - "name": "deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "6480:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 792, - "name": "numDeposits", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 768, - "src": "6489:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 793, - "name": "depositSum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 775, - "src": "6502:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 794, - "name": "numDestAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 782, - "src": "6514:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 795, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "6455:76:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bytes32_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", - "typeString": "tuple(bytes32,uint256,uint256,uint256,uint256,uint256)" - } - }, - "functionReturnParameters": 745, - "id": 796, - "nodeType": "Return", - "src": "6448:83:1" - } - ] - }, - "documentation": null, - "id": 798, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "dealStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 732, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 731, - "name": "_dealId", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "5971:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 730, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "5971:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5970:16:1" - }, - "payable": false, - "returnParameters": { - "id": 745, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 734, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6020:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 733, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6020:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 736, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6029:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 735, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6029:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 738, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6035:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 737, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6035:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 740, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6041:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 739, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6041:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 742, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6047:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 741, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6047:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 744, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6053:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 743, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6053:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6019:39:1" - }, - "scope": 830, - "src": "5951:587:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 811, - "nodeType": "Block", - "src": "6636:99:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 805, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "6684:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 807, - "indexExpression": { - "argumentTypes": null, - "id": 806, - "name": "_dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 800, - "src": "6690:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6684:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 808, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "encryptedDestAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 107, - "src": "6684:37:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 809, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6684:44:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 804, - "id": 810, - "nodeType": "Return", - "src": "6677:51:1" - } - ] - }, - "documentation": null, - "id": 812, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "countEncryptedAddresses", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 801, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 800, - "name": "_dealId", - "nodeType": "VariableDeclaration", - "scope": 812, - "src": "6577:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 799, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "6577:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6576:16:1" - }, - "payable": false, - "returnParameters": { - "id": 804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 803, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 812, - "src": "6626:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 802, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6626:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6625:6:1" - }, - "scope": 830, - "src": "6544:191:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 828, - "nodeType": "Block", - "src": "6842:119:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 821, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "6910:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 823, - "indexExpression": { - "argumentTypes": null, - "id": 822, - "name": "_dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 814, - "src": "6916:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6910:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 824, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "encryptedDestAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 107, - "src": "6910:37:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 826, - "indexExpression": { - "argumentTypes": null, - "id": 825, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 816, - "src": "6948:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6910:44:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "functionReturnParameters": 820, - "id": 827, - "nodeType": "Return", - "src": "6903:51:1" - } - ] - }, - "documentation": null, - "id": 829, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getEncryptedAddress", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 817, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 814, - "name": "_dealId", - "nodeType": "VariableDeclaration", - "scope": 829, - "src": "6770:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 813, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "6770:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 816, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 829, - "src": "6786:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 815, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6786:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6769:28:1" - }, - "payable": false, - "returnParameters": { - "id": 820, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 819, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 829, - "src": "6831:5:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 818, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6831:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6830:7:1" - }, - "scope": 830, - "src": "6741:220:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 831, - "src": "50:6913:1" - } - ], - "src": "0:6965:1" - }, - "legacyAST": { - "absolutePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/CoinMixer.sol", - "exportedSymbols": { - "CoinMixer": [ - 830 - ] - }, - "id": 831, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 85, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:1" - }, - { - "absolutePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/Enigma.sol", - "file": "./Enigma.sol", - "id": 86, - "nodeType": "ImportDirective", - "scope": 831, - "sourceUnit": 2658, - "src": "26:22:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 830, - "linearizedBaseContracts": [ - 830 - ], - "name": "CoinMixer", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 88, - "name": "enigma", - "nodeType": "VariableDeclaration", - "scope": 830, - "src": "76:20:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Enigma_$2657", - "typeString": "contract Enigma" - }, - "typeName": { - "contractScope": null, - "id": 87, - "name": "Enigma", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2657, - "src": "76:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Enigma_$2657", - "typeString": "contract Enigma" - } - }, - "value": null, - "visibility": "public" - }, - { - "canonicalName": "CoinMixer.Deal", - "id": 115, - "members": [ - { - "constant": false, - "id": 90, - "name": "organizer", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "125:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 89, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "125:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 92, - "name": "startTime", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "152:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - }, - "typeName": { - "id": 91, - "name": "uint48", - "nodeType": "ElementaryTypeName", - "src": "152:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 94, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "178:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 93, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "178:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 96, - "name": "depositSum", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "251:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 95, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "251:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 98, - "name": "numDeposits", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "276:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 97, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "276:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 100, - "name": "depositInWei", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "302:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 99, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "302:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 102, - "name": "numParticipants", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "329:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 101, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "329:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 104, - "name": "title", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "359:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 103, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "359:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 107, - "name": "encryptedDestAddresses", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "382:30:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 105, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "382:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 106, - "length": null, - "nodeType": "ArrayTypeName", - "src": "382:7:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 110, - "name": "destAddresses", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "422:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 108, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "422:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 109, - "length": null, - "nodeType": "ArrayTypeName", - "src": "422:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 114, - "name": "deposit", - "nodeType": "VariableDeclaration", - "scope": 115, - "src": "455:32:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 113, - "keyType": { - "id": 111, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "463:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "455:24:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 112, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "474:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Deal", - "nodeType": "StructDefinition", - "scope": 830, - "src": "103:391:1", - "visibility": "public" - }, - { - "constant": false, - "id": 118, - "name": "deals", - "nodeType": "VariableDeclaration", - "scope": 830, - "src": "500:19:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal[]" - }, - "typeName": { - "baseType": { - "contractScope": null, - "id": 116, - "name": "Deal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 115, - "src": "500:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal" - } - }, - "id": 117, - "length": null, - "nodeType": "ArrayTypeName", - "src": "500:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage_ptr", - "typeString": "struct CoinMixer.Deal[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 136, - "name": "NewDeal", - "nodeType": "EventDefinition", - "parameters": { - "id": 135, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 120, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 136, - "src": "549:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 119, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "549:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 122, - "indexed": true, - "name": "_dealId", - "nodeType": "VariableDeclaration", - "scope": 136, - "src": "579:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 121, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "579:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "indexed": false, - "name": "_startTime", - "nodeType": "VariableDeclaration", - "scope": 136, - "src": "611:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - }, - "typeName": { - "id": 123, - "name": "uint48", - "nodeType": "ElementaryTypeName", - "src": "611:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 126, - "indexed": false, - "name": "_title", - "nodeType": "VariableDeclaration", - "scope": 136, - "src": "638:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 125, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "638:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 128, - "indexed": false, - "name": "_depositInWei", - "nodeType": "VariableDeclaration", - "scope": 136, - "src": "662:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 127, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "662:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 130, - "indexed": false, - "name": "_numParticipants", - "nodeType": "VariableDeclaration", - "scope": 136, - "src": "690:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 129, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "690:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 132, - "indexed": false, - "name": "_success", - "nodeType": "VariableDeclaration", - "scope": 136, - "src": "721:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 131, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "721:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 134, - "indexed": false, - "name": "_err", - "nodeType": "VariableDeclaration", - "scope": 136, - "src": "744:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 133, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "744:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "539:222:1" - }, - "src": "526:236:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 150, - "name": "Deposit", - "nodeType": "EventDefinition", - "parameters": { - "id": 149, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 138, - "indexed": true, - "name": "_depositor", - "nodeType": "VariableDeclaration", - "scope": 150, - "src": "790:26:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 137, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "790:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 140, - "indexed": true, - "name": "_dealId", - "nodeType": "VariableDeclaration", - "scope": 150, - "src": "826:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 139, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "826:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 142, - "indexed": false, - "name": "_encryptedDestAddress", - "nodeType": "VariableDeclaration", - "scope": 150, - "src": "858:27:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 141, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "858:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 144, - "indexed": false, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 150, - "src": "895:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 143, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "895:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 146, - "indexed": false, - "name": "_success", - "nodeType": "VariableDeclaration", - "scope": 150, - "src": "916:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 145, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "916:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 148, - "indexed": false, - "name": "_err", - "nodeType": "VariableDeclaration", - "scope": 150, - "src": "939:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 147, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "939:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "780:176:1" - }, - "src": "767:190:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 165, - "name": "Distribute", - "nodeType": "EventDefinition", - "parameters": { - "id": 164, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 152, - "indexed": true, - "name": "_dealId", - "nodeType": "VariableDeclaration", - "scope": 165, - "src": "988:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 151, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "988:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 154, - "indexed": false, - "name": "individualAmountInWei", - "nodeType": "VariableDeclaration", - "scope": 165, - "src": "1020:26:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 153, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1020:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 157, - "indexed": false, - "name": "destAddresses", - "nodeType": "VariableDeclaration", - "scope": 165, - "src": "1056:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 155, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1056:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 156, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1056:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 159, - "indexed": false, - "name": "nbTransfers", - "nodeType": "VariableDeclaration", - "scope": 165, - "src": "1089:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 158, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1089:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 161, - "indexed": false, - "name": "_success", - "nodeType": "VariableDeclaration", - "scope": 165, - "src": "1117:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 160, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1117:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 163, - "indexed": false, - "name": "_err", - "nodeType": "VariableDeclaration", - "scope": 165, - "src": "1140:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 162, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1140:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "978:179:1" - }, - "src": "962:196:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 171, - "name": "TransferredToken", - "nodeType": "EventDefinition", - "parameters": { - "id": 170, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 167, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 171, - "src": "1187:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 166, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1187:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 169, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 171, - "src": "1207:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 168, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1207:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1186:35:1" - }, - "src": "1164:58:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 177, - "name": "FailedTransfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 176, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 173, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 177, - "src": "1248:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 172, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1248:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 175, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 177, - "src": "1268:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 174, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1268:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1247:35:1" - }, - "src": "1227:56:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 181, - "name": "DealFullyFunded", - "nodeType": "EventDefinition", - "parameters": { - "id": 180, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 179, - "indexed": true, - "name": "_dealId", - "nodeType": "VariableDeclaration", - "scope": 181, - "src": "1311:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 178, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1311:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1310:24:1" - }, - "src": "1289:46:1" - }, - { - "anonymous": false, - "documentation": null, - "id": 187, - "name": "DealExecuted", - "nodeType": "EventDefinition", - "parameters": { - "id": 186, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 183, - "indexed": true, - "name": "_dealId", - "nodeType": "VariableDeclaration", - "scope": 187, - "src": "1359:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 182, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1359:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 185, - "indexed": false, - "name": "_success", - "nodeType": "VariableDeclaration", - "scope": 187, - "src": "1383:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 184, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1383:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1358:39:1" - }, - "src": "1340:58:1" - }, - { - "canonicalName": "CoinMixer.ReturnValue", - "id": 190, - "members": [ - { - "id": 188, - "name": "Ok", - "nodeType": "EnumValue", - "src": "1491:2:1" - }, - { - "id": 189, - "name": "Error", - "nodeType": "EnumValue", - "src": "1495:5:1" - } - ], - "name": "ReturnValue", - "nodeType": "EnumDefinition", - "src": "1473:28:1" - }, - { - "body": { - "id": 201, - "nodeType": "Block", - "src": "1550:48:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 199, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 195, - "name": "enigma", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "1560:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Enigma_$2657", - "typeString": "contract Enigma" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 197, - "name": "_enigmaAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 192, - "src": "1576:14:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 196, - "name": "Enigma", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2657, - "src": "1569:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Enigma_$2657_$", - "typeString": "type(contract Enigma)" - } - }, - "id": 198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1569:22:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Enigma_$2657", - "typeString": "contract Enigma" - } - }, - "src": "1560:31:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Enigma_$2657", - "typeString": "contract Enigma" - } - }, - "id": 200, - "nodeType": "ExpressionStatement", - "src": "1560:31:1" - } - ] - }, - "documentation": null, - "id": 202, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 193, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 192, - "name": "_enigmaAddress", - "nodeType": "VariableDeclaration", - "scope": 202, - "src": "1519:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 191, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1519:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1518:24:1" - }, - "payable": false, - "returnParameters": { - "id": 194, - "nodeType": "ParameterList", - "parameters": [], - "src": "1550:0:1" - }, - "scope": 830, - "src": "1507:91:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 323, - "nodeType": "Block", - "src": "1721:831:1", - "statements": [ - { - "assignments": [ - 214 - ], - "declarations": [ - { - "constant": false, - "id": 214, - "name": "dealId", - "nodeType": "VariableDeclaration", - "scope": 324, - "src": "1731:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 213, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "1731:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 219, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 216, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1754:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 217, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1754:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 215, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1747:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint32_$", - "typeString": "type(uint32)" - }, - "typeName": "uint32" - }, - "id": 218, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1747:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1731:36:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "1778:14:1", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 220, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1778:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 222, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1778:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 224, - "nodeType": "ExpressionStatement", - "src": "1778:14:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 225, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1802:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 227, - "indexExpression": { - "argumentTypes": null, - "id": 226, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "1808:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1802:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 228, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "organizer", - "nodeType": "MemberAccess", - "referencedDeclaration": 90, - "src": "1802:23:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 229, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "1828:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1828:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1802:36:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 232, - "nodeType": "ExpressionStatement", - "src": "1802:36:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 233, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1848:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 235, - "indexExpression": { - "argumentTypes": null, - "id": 234, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "1854:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1848:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 236, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "title", - "nodeType": "MemberAccess", - "referencedDeclaration": 104, - "src": "1848:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 237, - "name": "_title", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 204, - "src": "1870:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "1848:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 239, - "nodeType": "ExpressionStatement", - "src": "1848:28:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 240, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1886:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 242, - "indexExpression": { - "argumentTypes": null, - "id": 241, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "1892:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1886:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 243, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "depositSum", - "nodeType": "MemberAccess", - "referencedDeclaration": 96, - "src": "1886:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 244, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1913:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1886:28:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 246, - "nodeType": "ExpressionStatement", - "src": "1886:28:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 252, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 247, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1924:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 249, - "indexExpression": { - "argumentTypes": null, - "id": 248, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "1930:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1924:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 250, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "numDeposits", - "nodeType": "MemberAccess", - "referencedDeclaration": 98, - "src": "1924:25:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 251, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1952:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1924:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 253, - "nodeType": "ExpressionStatement", - "src": "1924:29:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 261, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 254, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1963:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 256, - "indexExpression": { - "argumentTypes": null, - "id": 255, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "1969:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1963:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 257, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "startTime", - "nodeType": "MemberAccess", - "referencedDeclaration": 92, - "src": "1963:23:1", - "typeDescriptions": { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 259, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3450, - "src": "1996:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 258, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1989:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint48_$", - "typeString": "type(uint48)" - }, - "typeName": "uint48" - }, - "id": 260, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1989:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - } - }, - "src": "1963:37:1", - "typeDescriptions": { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - } - }, - "id": 262, - "nodeType": "ExpressionStatement", - "src": "1963:37:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 263, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "2010:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 265, - "indexExpression": { - "argumentTypes": null, - "id": 264, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "2016:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2010:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 266, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "depositInWei", - "nodeType": "MemberAccess", - "referencedDeclaration": 100, - "src": "2010:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 267, - "name": "_depositInWei", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 206, - "src": "2039:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2010:42:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 269, - "nodeType": "ExpressionStatement", - "src": "2010:42:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 270, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "2062:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 272, - "indexExpression": { - "argumentTypes": null, - "id": 271, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "2068:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2062:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 273, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "numParticipants", - "nodeType": "MemberAccess", - "referencedDeclaration": 102, - "src": "2062:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 274, - "name": "_numParticipants", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "2094:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2062:48:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 276, - "nodeType": "ExpressionStatement", - "src": "2062:48:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 277, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "2120:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 279, - "indexExpression": { - "argumentTypes": null, - "id": 278, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "2126:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2120:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 280, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "encryptedDestAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 107, - "src": "2120:36:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 284, - "name": "_numParticipants", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "2171:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 283, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "2159:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bytes_memory_$dyn_memory_$", - "typeString": "function (uint256) pure returns (bytes memory[] memory)" - }, - "typeName": { - "baseType": { - "id": 281, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2163:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 282, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2163:7:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - } - }, - "id": 285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2159:29:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory", - "typeString": "bytes memory[] memory" - } - }, - "src": "2120:68:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 287, - "nodeType": "ExpressionStatement", - "src": "2120:68:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 288, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "2198:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 290, - "indexExpression": { - "argumentTypes": null, - "id": 289, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "2204:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2198:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 291, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "destAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "2198:27:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 295, - "name": "_numParticipants", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "2242:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 294, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "2228:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 292, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2232:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 293, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2232:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2228:31:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "src": "2198:61:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 298, - "nodeType": "ExpressionStatement", - "src": "2198:61:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 299, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "2269:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 301, - "indexExpression": { - "argumentTypes": null, - "id": 300, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "2275:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2269:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 302, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 94, - "src": "2269:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 303, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2292:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2269:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 305, - "nodeType": "ExpressionStatement", - "src": "2269:24:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 307, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "2329:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2329:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 309, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "2353:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 311, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3450, - "src": "2380:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 310, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2373:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint48_$", - "typeString": "type(uint48)" - }, - "typeName": "uint48" - }, - "id": 312, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2373:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - } - }, - { - "argumentTypes": null, - "id": 313, - "name": "_title", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 204, - "src": "2398:6:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 314, - "name": "_depositInWei", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 206, - "src": "2418:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 315, - "name": "_numParticipants", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "2445:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 316, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2475:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "hexValue": "616c6c20676f6f64", - "id": 317, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2493:10:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_111585a7e4eebbd44457780c7d70df2a750ced4b0ed7f8e524bfa2b2decf1b05", - "typeString": "literal_string \"all good\"" - }, - "value": "all good" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint48", - "typeString": "uint48" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_111585a7e4eebbd44457780c7d70df2a750ced4b0ed7f8e524bfa2b2decf1b05", - "typeString": "literal_string \"all good\"" - } - ], - "id": 306, - "name": "NewDeal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 136, - "src": "2308:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint32_$_t_uint48_$_t_bytes32_$_t_uint256_$_t_uint256_$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (address,uint32,uint48,bytes32,uint256,uint256,bool,string memory)" - } - }, - "id": 318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2308:205:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 319, - "nodeType": "EmitStatement", - "src": "2303:210:1" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 320, - "name": "ReturnValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 190, - "src": "2531:11:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ReturnValue_$190_$", - "typeString": "type(enum CoinMixer.ReturnValue)" - } - }, - "id": 321, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Ok", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2531:14:1", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - } - }, - "functionReturnParameters": 212, - "id": 322, - "nodeType": "Return", - "src": "2524:21:1" - } - ] - }, - "documentation": null, - "id": 324, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "newDeal", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 209, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 204, - "name": "_title", - "nodeType": "VariableDeclaration", - "scope": 324, - "src": "1621:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 203, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1621:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 206, - "name": "_depositInWei", - "nodeType": "VariableDeclaration", - "scope": 324, - "src": "1637:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 205, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1637:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 208, - "name": "_numParticipants", - "nodeType": "VariableDeclaration", - "scope": 324, - "src": "1657:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 207, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1657:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1620:59:1" - }, - "payable": false, - "returnParameters": { - "id": 212, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 211, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 324, - "src": "1704:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - }, - "typeName": { - "contractScope": null, - "id": 210, - "name": "ReturnValue", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 190, - "src": "1704:11:1", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1703:13:1" - }, - "scope": 830, - "src": "1604:948:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 443, - "nodeType": "Block", - "src": "2675:878:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 337, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 334, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "2693:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2693:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 336, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2705:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2693:13:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4465706f7369742076616c7565206d75737420626520706f7369746976652e", - "id": 338, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2708:33:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b5b21311df3fa16c7aaa1c5a632aa950e0d41433f8ae7bfd354733f355da73c3", - "typeString": "literal_string \"Deposit value must be positive.\"" - }, - "value": "Deposit value must be positive." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b5b21311df3fa16c7aaa1c5a632aa950e0d41433f8ae7bfd354733f355da73c3", - "typeString": "literal_string \"Deposit value must be positive.\"" - } - ], - "id": 333, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "2685:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2685:57:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 340, - "nodeType": "ExpressionStatement", - "src": "2685:57:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 342, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "2760:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 344, - "indexExpression": { - "argumentTypes": null, - "id": 343, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 326, - "src": "2766:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2760:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 345, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 94, - "src": "2760:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 346, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2784:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2760:25:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496c6c6567616c20737461746520666f72206465706f736974732e", - "id": 348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2787:29:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e0b28cde793bcc610ccba7caaf6623d6c99b0939e9c3af7d33f745581edff24c", - "typeString": "literal_string \"Illegal state for deposits.\"" - }, - "value": "Illegal state for deposits." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e0b28cde793bcc610ccba7caaf6623d6c99b0939e9c3af7d33f745581edff24c", - "typeString": "literal_string \"Illegal state for deposits.\"" - } - ], - "id": 341, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "2752:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 349, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2752:65:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 350, - "nodeType": "ExpressionStatement", - "src": "2752:65:1" - }, - { - "assignments": [ - 352 - ], - "declarations": [ - { - "constant": false, - "id": 352, - "name": "deal", - "nodeType": "VariableDeclaration", - "scope": 444, - "src": "2828:17:1", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal" - }, - "typeName": { - "contractScope": null, - "id": 351, - "name": "Deal", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 115, - "src": "2828:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 356, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 353, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "2848:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 355, - "indexExpression": { - "argumentTypes": null, - "id": 354, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 326, - "src": "2854:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2848:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2828:33:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 358, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "2880:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2880:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 360, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "2892:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 361, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "depositInWei", - "nodeType": "MemberAccess", - "referencedDeclaration": 100, - "src": "2892:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2880:29:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 363, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2879:31:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 364, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2914:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2879:36:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4465706f7369742076616c7565206d7573742062652061206d756c7469706c65206f6620636c61696d2076616c75652e", - "id": 366, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2917:50:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7f10e4bbbb153e2913677eb23ae6c0b8adc00d267af432ea6f232b534ca5b819", - "typeString": "literal_string \"Deposit value must be a multiple of claim value.\"" - }, - "value": "Deposit value must be a multiple of claim value." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7f10e4bbbb153e2913677eb23ae6c0b8adc00d267af432ea6f232b534ca5b819", - "typeString": "literal_string \"Deposit value must be a multiple of claim value.\"" - } - ], - "id": 357, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "2871:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2871:97:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 368, - "nodeType": "ExpressionStatement", - "src": "2871:97:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 376, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 370, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "2986:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 371, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "deposit", - "nodeType": "MemberAccess", - "referencedDeclaration": 114, - "src": "2986:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 374, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 372, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "2999:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 373, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2999:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2986:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 375, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3014:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2986:29:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616e6e6f74206465706f7369742074776963652077697468207468652073616d6520616464726573732e", - "id": 377, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3017:45:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_468ad83de70234035feed93053cb5355954cb40a49b2bcb90fe83e513e3f2aa0", - "typeString": "literal_string \"Cannot deposit twice with the same address.\"" - }, - "value": "Cannot deposit twice with the same address." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_468ad83de70234035feed93053cb5355954cb40a49b2bcb90fe83e513e3f2aa0", - "typeString": "literal_string \"Cannot deposit twice with the same address.\"" - } - ], - "id": 369, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "2978:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 378, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2978:85:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 379, - "nodeType": "ExpressionStatement", - "src": "2978:85:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 380, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3100:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 382, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "depositSum", - "nodeType": "MemberAccess", - "referencedDeclaration": 96, - "src": "3100:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 383, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3119:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3119:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3100:28:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 386, - "nodeType": "ExpressionStatement", - "src": "3100:28:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 387, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3138:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 391, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "deposit", - "nodeType": "MemberAccess", - "referencedDeclaration": 114, - "src": "3138:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 392, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 389, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3151:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 390, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3151:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3138:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 393, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3165:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3165:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3138:36:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 396, - "nodeType": "ExpressionStatement", - "src": "3138:36:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 397, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3184:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 401, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "encryptedDestAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 107, - "src": "3184:27:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 402, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 399, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3212:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 400, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "numDeposits", - "nodeType": "MemberAccess", - "referencedDeclaration": 98, - "src": "3212:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3184:45:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 403, - "name": "encryptedDestAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 328, - "src": "3232:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "3184:68:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 405, - "nodeType": "ExpressionStatement", - "src": "3184:68:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 406, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3262:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 408, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "numDeposits", - "nodeType": "MemberAccess", - "referencedDeclaration": 98, - "src": "3262:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 409, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3282:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3262:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 411, - "nodeType": "ExpressionStatement", - "src": "3262:21:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 413, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3307:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3307:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 415, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 326, - "src": "3319:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "id": 416, - "name": "encryptedDestAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 328, - "src": "3327:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 417, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3349:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3349:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3360:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "hexValue": "616c6c20676f6f64", - "id": 420, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3366:10:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_111585a7e4eebbd44457780c7d70df2a750ced4b0ed7f8e524bfa2b2decf1b05", - "typeString": "literal_string \"all good\"" - }, - "value": "all good" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_111585a7e4eebbd44457780c7d70df2a750ced4b0ed7f8e524bfa2b2decf1b05", - "typeString": "literal_string \"all good\"" - } - ], - "id": 412, - "name": "Deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "3299:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint32_$_t_bytes_memory_ptr_$_t_uint256_$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (address,uint32,bytes memory,uint256,bool,string memory)" - } - }, - "id": 421, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3299:78:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 422, - "nodeType": "EmitStatement", - "src": "3294:83:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 423, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3392:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 424, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "numDeposits", - "nodeType": "MemberAccess", - "referencedDeclaration": 98, - "src": "3392:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 425, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3412:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 426, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "numParticipants", - "nodeType": "MemberAccess", - "referencedDeclaration": 102, - "src": "3412:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3392:40:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 439, - "nodeType": "IfStatement", - "src": "3388:128:1", - "trueBody": { - "id": 438, - "nodeType": "Block", - "src": "3434:82:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 432, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 428, - "name": "deal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 352, - "src": "3448:4:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage_ptr", - "typeString": "struct CoinMixer.Deal storage pointer" - } - }, - "id": 430, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 94, - "src": "3448:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 431, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3462:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3448:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 433, - "nodeType": "ExpressionStatement", - "src": "3448:15:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 435, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 326, - "src": "3498:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - ], - "id": 434, - "name": "DealFullyFunded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 181, - "src": "3482:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint32_$returns$__$", - "typeString": "function (uint32)" - } - }, - "id": 436, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3482:23:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 437, - "nodeType": "EmitStatement", - "src": "3477:28:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 440, - "name": "ReturnValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 190, - "src": "3532:11:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ReturnValue_$190_$", - "typeString": "type(enum CoinMixer.ReturnValue)" - } - }, - "id": 441, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Ok", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3532:14:1", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - } - }, - "functionReturnParameters": 332, - "id": 442, - "nodeType": "Return", - "src": "3525:21:1" - } - ] - }, - "documentation": null, - "id": 444, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "makeDeposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 329, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 326, - "name": "dealId", - "nodeType": "VariableDeclaration", - "scope": 444, - "src": "2579:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 325, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "2579:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 328, - "name": "encryptedDestAddress", - "nodeType": "VariableDeclaration", - "scope": 444, - "src": "2594:26:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 327, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2594:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2578:43:1" - }, - "payable": true, - "returnParameters": { - "id": 332, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 331, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 444, - "src": "2658:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - }, - "typeName": { - "contractScope": null, - "id": 330, - "name": "ReturnValue", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 190, - "src": "2658:11:1", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2657:13:1" - }, - "scope": 830, - "src": "2558:995:1", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 526, - "nodeType": "Block", - "src": "3691:710:1", - "statements": [ - { - "assignments": [ - 460 - ], - "declarations": [ - { - "constant": false, - "id": 460, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 527, - "src": "3938:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 459, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3938:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 463, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 461, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "3947:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 462, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3947:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3938:29:1" - }, - { - "body": { - "id": 520, - "nodeType": "Block", - "src": "3991:364:1", - "statements": [ - { - "assignments": [ - 468 - ], - "declarations": [ - { - "constant": false, - "id": 468, - "name": "j", - "nodeType": "VariableDeclaration", - "scope": 527, - "src": "4005:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 467, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4005:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 481, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 473, - "name": "rand", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 451, - "src": "4046:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4053:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4046:8:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 471, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3435, - "src": "4029:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 472, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4029:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 476, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4029:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 470, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3442, - "src": "4019:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4019:37:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 469, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4014:4:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4014:43:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "id": 479, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 460, - "src": "4060:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4014:47:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4005:56:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 482, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4106:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 484, - "indexExpression": { - "argumentTypes": null, - "id": 483, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 468, - "src": "4120:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4106:16:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 485, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4126:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 489, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 486, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 460, - "src": "4140:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 487, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4144:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4140:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4126:20:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4106:40:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 516, - "nodeType": "IfStatement", - "src": "4102:226:1", - "trueBody": { - "id": 515, - "nodeType": "Block", - "src": "4148:180:1", - "statements": [ - { - "assignments": [ - 492 - ], - "declarations": [ - { - "constant": false, - "id": 492, - "name": "destAddress", - "nodeType": "VariableDeclaration", - "scope": 527, - "src": "4166:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 491, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4166:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 498, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 493, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4188:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 497, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 494, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 460, - "src": "4202:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 495, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4206:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4202:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4188:20:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4166:42:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 507, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 499, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4226:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 503, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 500, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 460, - "src": "4240:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 501, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4244:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4240:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4226:20:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 504, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4249:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 506, - "indexExpression": { - "argumentTypes": null, - "id": 505, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 468, - "src": "4263:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4249:16:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4226:39:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 508, - "nodeType": "ExpressionStatement", - "src": "4226:39:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 513, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 509, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4283:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 511, - "indexExpression": { - "argumentTypes": null, - "id": 510, - "name": "j", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 468, - "src": "4297:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4283:16:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 512, - "name": "destAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 492, - "src": "4302:11:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4283:30:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 514, - "nodeType": "ExpressionStatement", - "src": "4283:30:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": false, - "src": "4341:3:1", - "subExpression": { - "argumentTypes": null, - "id": 517, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 460, - "src": "4341:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 519, - "nodeType": "ExpressionStatement", - "src": "4341:3:1" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 464, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 460, - "src": "3984:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 465, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3988:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3984:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 521, - "nodeType": "WhileStatement", - "src": "3977:378:1" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 522, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 446, - "src": "4372:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "id": 523, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 449, - "src": "4380:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - } - ], - "id": 524, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "4371:23:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint32_$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "tuple(uint32,address[] memory)" - } - }, - "functionReturnParameters": 458, - "id": 525, - "nodeType": "Return", - "src": "4364:30:1" - } - ] - }, - "documentation": null, - "id": 527, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "mixAddresses", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 452, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 446, - "name": "dealId", - "nodeType": "VariableDeclaration", - "scope": 527, - "src": "3581:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 445, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "3581:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 449, - "name": "destAddresses", - "nodeType": "VariableDeclaration", - "scope": 527, - "src": "3596:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 447, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3596:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 448, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3596:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 451, - "name": "rand", - "nodeType": "VariableDeclaration", - "scope": 527, - "src": "3621:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 450, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3621:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3580:54:1" - }, - "payable": false, - "returnParameters": { - "id": 458, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 454, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 527, - "src": "3668:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 453, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "3668:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 457, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 527, - "src": "3676:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 455, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3676:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 456, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3676:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3667:19:1" - }, - "scope": 830, - "src": "3559:842:1", - "stateMutability": "pure", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 540, - "nodeType": "Block", - "src": "4429:104:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 530, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "4447:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4447:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 533, - "name": "enigma", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "4469:6:1", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Enigma_$2657", - "typeString": "contract Enigma" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Enigma_$2657", - "typeString": "contract Enigma" - } - ], - "id": 532, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4461:7:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 534, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4461:15:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4447:29:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "53656e646572206973206e6f742074686520456e69676d6120636f6e74726163742e", - "id": 536, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4478:36:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d9941166e9cc0d6780d74833d92481cea08b004084a054f4983bbafea67c785d", - "typeString": "literal_string \"Sender is not the Enigma contract.\"" - }, - "value": "Sender is not the Enigma contract." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d9941166e9cc0d6780d74833d92481cea08b004084a054f4983bbafea67c785d", - "typeString": "literal_string \"Sender is not the Enigma contract.\"" - } - ], - "id": 529, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "4439:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4439:76:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 538, - "nodeType": "ExpressionStatement", - "src": "4439:76:1" - }, - { - "id": 539, - "nodeType": "PlaceholderStatement", - "src": "4525:1:1" - } - ] - }, - "documentation": null, - "id": 541, - "name": "onlyEnigma", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 528, - "nodeType": "ParameterList", - "parameters": [], - "src": "4426:2:1" - }, - "src": "4407:126:1", - "visibility": "internal" - }, - { - "body": { - "id": 623, - "nodeType": "Block", - "src": "4657:619:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 554, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "4735:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 556, - "indexExpression": { - "argumentTypes": null, - "id": 555, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "4741:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4735:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 557, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 94, - "src": "4735:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 558, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4759:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4735:25:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4465616c206973206e6f742065786563757465642e", - "id": 560, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4762:23:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a8c7515e1428aba3337ad4f7e47e80252a21dcd3827c7eca2dfa5732c02ad7ad", - "typeString": "literal_string \"Deal is not executed.\"" - }, - "value": "Deal is not executed." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a8c7515e1428aba3337ad4f7e47e80252a21dcd3827c7eca2dfa5732c02ad7ad", - "typeString": "literal_string \"Deal is not executed.\"" - } - ], - "id": 553, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "4727:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4727:59:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 562, - "nodeType": "ExpressionStatement", - "src": "4727:59:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 563, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "4796:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 565, - "indexExpression": { - "argumentTypes": null, - "id": 564, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "4802:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4796:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 566, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "destAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "4796:27:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 567, - "name": "destAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 546, - "src": "4826:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "src": "4796:43:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 569, - "nodeType": "ExpressionStatement", - "src": "4796:43:1" - }, - { - "body": { - "id": 597, - "nodeType": "Block", - "src": "4912:92:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 591, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "4966:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 593, - "indexExpression": { - "argumentTypes": null, - "id": 592, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "4972:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4966:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 594, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "depositInWei", - "nodeType": "MemberAccess", - "referencedDeclaration": 100, - "src": "4966:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 584, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "4926:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 586, - "indexExpression": { - "argumentTypes": null, - "id": 585, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "4932:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4926:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 587, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "4926:27:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 589, - "indexExpression": { - "argumentTypes": null, - "id": 588, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 571, - "src": "4954:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4926:30:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4926:39:1", - "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4926:67:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 596, - "nodeType": "ExpressionStatement", - "src": "4926:67:1" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 574, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 571, - "src": "4867:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 575, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "4871:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 577, - "indexExpression": { - "argumentTypes": null, - "id": 576, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "4877:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4871:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 578, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "4871:27:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 579, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4871:34:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4867:38:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 598, - "initializationExpression": { - "assignments": [ - 571 - ], - "declarations": [ - { - "constant": false, - "id": 571, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 624, - "src": "4855:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 570, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4855:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 573, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 572, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4864:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "4855:10:1" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 582, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "4907:3:1", - "subExpression": { - "argumentTypes": null, - "id": 581, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 571, - "src": "4907:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 583, - "nodeType": "ExpressionStatement", - "src": "4907:3:1" - }, - "nodeType": "ForStatement", - "src": "4850:154:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 600, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "5043:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 601, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5063:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 603, - "indexExpression": { - "argumentTypes": null, - "id": 602, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "5069:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5063:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 604, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "depositInWei", - "nodeType": "MemberAccess", - "referencedDeclaration": 100, - "src": "5063:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 605, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5103:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 607, - "indexExpression": { - "argumentTypes": null, - "id": 606, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "5109:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5103:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 608, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "5103:27:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 610, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5151:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 612, - "indexExpression": { - "argumentTypes": null, - "id": 611, - "name": "dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "5157:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5151:13:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 613, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "5151:27:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 614, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5151:34:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 609, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "5144:6:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint32_$", - "typeString": "type(uint32)" - }, - "typeName": "uint32" - }, - "id": 615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5144:42:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 616, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5200:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "hexValue": "616c6c20676f6f64", - "id": 617, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5218:10:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_111585a7e4eebbd44457780c7d70df2a750ced4b0ed7f8e524bfa2b2decf1b05", - "typeString": "literal_string \"all good\"" - }, - "value": "all good" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - }, - { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_111585a7e4eebbd44457780c7d70df2a750ced4b0ed7f8e524bfa2b2decf1b05", - "typeString": "literal_string \"all good\"" - } - ], - "id": 599, - "name": "Distribute", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "5019:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint32_$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_uint32_$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (uint32,uint256,address[] memory,uint32,bool,string memory)" - } - }, - "id": 618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5019:219:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 619, - "nodeType": "EmitStatement", - "src": "5014:224:1" - }, - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 620, - "name": "ReturnValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 190, - "src": "5255:11:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_ReturnValue_$190_$", - "typeString": "type(enum CoinMixer.ReturnValue)" - } - }, - "id": 621, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Ok", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5255:14:1", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - } - }, - "functionReturnParameters": 552, - "id": 622, - "nodeType": "Return", - "src": "5248:21:1" - } - ] - }, - "documentation": null, - "id": 624, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [], - "id": 549, - "modifierName": { - "argumentTypes": null, - "id": 548, - "name": "onlyEnigma", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 541, - "src": "4614:10:1", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "4614:12:1" - } - ], - "name": "distribute", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 547, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 543, - "name": "dealId", - "nodeType": "VariableDeclaration", - "scope": 624, - "src": "4559:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 542, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "4559:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 546, - "name": "destAddresses", - "nodeType": "VariableDeclaration", - "scope": 624, - "src": "4574:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 544, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4574:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 545, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4574:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4558:40:1" - }, - "payable": false, - "returnParameters": { - "id": 552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 551, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 624, - "src": "4640:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - }, - "typeName": { - "contractScope": null, - "id": 550, - "name": "ReturnValue", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 190, - "src": "4640:11:1", - "typeDescriptions": { - "typeIdentifier": "t_enum$_ReturnValue_$190", - "typeString": "enum CoinMixer.ReturnValue" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4639:13:1" - }, - "scope": 830, - "src": "4539:737:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 728, - "nodeType": "Block", - "src": "5348:597:1", - "statements": [ - { - "assignments": [ - 639 - ], - "declarations": [ - { - "constant": false, - "id": 639, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 729, - "src": "5411:20:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 637, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5411:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 638, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5411:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 646, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 643, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5445:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 644, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5445:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "5434:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - }, - "typeName": { - "baseType": { - "id": 640, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5438:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 641, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5438:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - } - }, - "id": 645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5434:24:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5411:47:1" - }, - { - "assignments": [ - 650 - ], - "declarations": [ - { - "constant": false, - "id": 650, - "name": "participates", - "nodeType": "VariableDeclaration", - "scope": 729, - "src": "5468:26:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 648, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5468:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 649, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5468:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 657, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 654, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5508:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 655, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5508:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "5497:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - }, - "typeName": { - "baseType": { - "id": 651, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5501:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 652, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5501:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - } - }, - "id": 656, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5497:24:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5468:53:1" - }, - { - "assignments": [ - 661 - ], - "declarations": [ - { - "constant": false, - "id": 661, - "name": "organizes", - "nodeType": "VariableDeclaration", - "scope": 729, - "src": "5531:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 659, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5531:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 660, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5531:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 668, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 665, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5568:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 666, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5568:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "5557:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - }, - "typeName": { - "baseType": { - "id": 662, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5561:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 663, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5561:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - } - }, - "id": 667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5557:24:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5531:50:1" - }, - { - "body": { - "id": 721, - "nodeType": "Block", - "src": "5632:257:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 680, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 639, - "src": "5646:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 682, - "indexExpression": { - "argumentTypes": null, - "id": 681, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "5653:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5646:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 683, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5658:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 685, - "indexExpression": { - "argumentTypes": null, - "id": 684, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "5664:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5658:8:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 686, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 94, - "src": "5658:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "5646:27:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 688, - "nodeType": "ExpressionStatement", - "src": "5646:27:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 689, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5692:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 691, - "indexExpression": { - "argumentTypes": null, - "id": 690, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "5698:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5692:8:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 692, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "deposit", - "nodeType": "MemberAccess", - "referencedDeclaration": 114, - "src": "5692:16:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 695, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 693, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "5709:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 694, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5709:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5692:28:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 696, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5723:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5692:32:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 705, - "nodeType": "IfStatement", - "src": "5688:90:1", - "trueBody": { - "id": 704, - "nodeType": "Block", - "src": "5726:52:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 702, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 698, - "name": "participates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 650, - "src": "5744:12:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 700, - "indexExpression": { - "argumentTypes": null, - "id": 699, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "5757:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5744:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 701, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5762:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5744:19:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 703, - "nodeType": "ExpressionStatement", - "src": "5744:19:1" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 706, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5796:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 708, - "indexExpression": { - "argumentTypes": null, - "id": 707, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "5802:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5796:8:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 709, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "organizer", - "nodeType": "MemberAccess", - "referencedDeclaration": 90, - "src": "5796:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 710, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "5818:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5818:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "5796:32:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 720, - "nodeType": "IfStatement", - "src": "5792:87:1", - "trueBody": { - "id": 719, - "nodeType": "Block", - "src": "5830:49:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 713, - "name": "organizes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 661, - "src": "5848:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 715, - "indexExpression": { - "argumentTypes": null, - "id": 714, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "5858:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5848:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 716, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5863:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5848:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 718, - "nodeType": "ExpressionStatement", - "src": "5848:16:1" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 673, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "5609:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 674, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "5613:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 675, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5613:12:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "5609:16:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 722, - "initializationExpression": { - "assignments": [ - 670 - ], - "declarations": [ - { - "constant": false, - "id": 670, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 729, - "src": "5597:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 669, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5597:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 672, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 671, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5606:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "5597:10:1" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "5627:3:1", - "subExpression": { - "argumentTypes": null, - "id": 677, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 670, - "src": "5627:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 679, - "nodeType": "ExpressionStatement", - "src": "5627:3:1" - }, - "nodeType": "ForStatement", - "src": "5592:297:1" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 723, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 639, - "src": "5906:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 724, - "name": "participates", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 650, - "src": "5914:12:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 725, - "name": "organizes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 661, - "src": "5928:9:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - } - ], - "id": 726, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "5905:33:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "tuple(uint256[] memory,uint256[] memory,uint256[] memory)" - } - }, - "functionReturnParameters": 635, - "id": 727, - "nodeType": "Return", - "src": "5898:40:1" - } - ] - }, - "documentation": null, - "id": 729, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "listDeals", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 625, - "nodeType": "ParameterList", - "parameters": [], - "src": "5300:2:1" - }, - "payable": false, - "returnParameters": { - "id": 635, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 628, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 729, - "src": "5324:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 626, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5324:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 627, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5324:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 631, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 729, - "src": "5332:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 629, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5332:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 630, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5332:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 634, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 729, - "src": "5340:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 632, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5340:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 633, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5340:6:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5323:24:1" - }, - "scope": 830, - "src": "5282:663:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 797, - "nodeType": "Block", - "src": "6063:475:1", - "statements": [ - { - "assignments": [ - 747 - ], - "declarations": [ - { - "constant": false, - "id": 747, - "name": "title", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6109:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 746, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6109:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 752, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 748, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "6125:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 750, - "indexExpression": { - "argumentTypes": null, - "id": 749, - "name": "_dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 731, - "src": "6131:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6125:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 751, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "title", - "nodeType": "MemberAccess", - "referencedDeclaration": 104, - "src": "6125:20:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6109:36:1" - }, - { - "assignments": [ - 754 - ], - "declarations": [ - { - "constant": false, - "id": 754, - "name": "numParticipants", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6155:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 753, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6155:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 759, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 755, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "6178:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 757, - "indexExpression": { - "argumentTypes": null, - "id": 756, - "name": "_dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 731, - "src": "6184:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6178:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 758, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "numParticipants", - "nodeType": "MemberAccess", - "referencedDeclaration": 102, - "src": "6178:30:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6155:53:1" - }, - { - "assignments": [ - 761 - ], - "declarations": [ - { - "constant": false, - "id": 761, - "name": "deposit", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6218:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 760, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6218:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 766, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 762, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "6233:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 764, - "indexExpression": { - "argumentTypes": null, - "id": 763, - "name": "_dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 731, - "src": "6239:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6233:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 765, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "depositInWei", - "nodeType": "MemberAccess", - "referencedDeclaration": 100, - "src": "6233:27:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6218:42:1" - }, - { - "assignments": [ - 768 - ], - "declarations": [ - { - "constant": false, - "id": 768, - "name": "numDeposits", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6270:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 767, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6270:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 773, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 769, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "6289:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 771, - "indexExpression": { - "argumentTypes": null, - "id": 770, - "name": "_dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 731, - "src": "6295:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6289:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 772, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "numDeposits", - "nodeType": "MemberAccess", - "referencedDeclaration": 98, - "src": "6289:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6270:45:1" - }, - { - "assignments": [ - 775 - ], - "declarations": [ - { - "constant": false, - "id": 775, - "name": "depositSum", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6325:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 774, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6325:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 780, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 776, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "6343:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 778, - "indexExpression": { - "argumentTypes": null, - "id": 777, - "name": "_dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 731, - "src": "6349:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6343:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 779, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "depositSum", - "nodeType": "MemberAccess", - "referencedDeclaration": 96, - "src": "6343:25:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6325:43:1" - }, - { - "assignments": [ - 782 - ], - "declarations": [ - { - "constant": false, - "id": 782, - "name": "numDestAddresses", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6378:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 781, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6378:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 788, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 783, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "6402:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 785, - "indexExpression": { - "argumentTypes": null, - "id": 784, - "name": "_dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 731, - "src": "6408:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6402:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 786, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "destAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 110, - "src": "6402:28:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 787, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6402:35:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6378:59:1" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 789, - "name": "title", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 747, - "src": "6456:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 790, - "name": "numParticipants", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 754, - "src": "6463:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 791, - "name": "deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 761, - "src": "6480:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 792, - "name": "numDeposits", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 768, - "src": "6489:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 793, - "name": "depositSum", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 775, - "src": "6502:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 794, - "name": "numDestAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 782, - "src": "6514:16:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 795, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "6455:76:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bytes32_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", - "typeString": "tuple(bytes32,uint256,uint256,uint256,uint256,uint256)" - } - }, - "functionReturnParameters": 745, - "id": 796, - "nodeType": "Return", - "src": "6448:83:1" - } - ] - }, - "documentation": null, - "id": 798, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "dealStatus", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 732, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 731, - "name": "_dealId", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "5971:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 730, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "5971:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5970:16:1" - }, - "payable": false, - "returnParameters": { - "id": 745, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 734, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6020:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 733, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6020:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 736, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6029:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 735, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6029:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 738, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6035:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 737, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6035:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 740, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6041:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 739, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6041:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 742, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6047:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 741, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6047:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 744, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 798, - "src": "6053:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 743, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6053:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6019:39:1" - }, - "scope": 830, - "src": "5951:587:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 811, - "nodeType": "Block", - "src": "6636:99:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 805, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "6684:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 807, - "indexExpression": { - "argumentTypes": null, - "id": 806, - "name": "_dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 800, - "src": "6690:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6684:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 808, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "encryptedDestAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 107, - "src": "6684:37:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 809, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6684:44:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 804, - "id": 810, - "nodeType": "Return", - "src": "6677:51:1" - } - ] - }, - "documentation": null, - "id": 812, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "countEncryptedAddresses", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 801, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 800, - "name": "_dealId", - "nodeType": "VariableDeclaration", - "scope": 812, - "src": "6577:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 799, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "6577:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6576:16:1" - }, - "payable": false, - "returnParameters": { - "id": 804, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 803, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 812, - "src": "6626:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 802, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6626:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6625:6:1" - }, - "scope": 830, - "src": "6544:191:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 828, - "nodeType": "Block", - "src": "6842:119:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 821, - "name": "deals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "6910:5:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Deal_$115_storage_$dyn_storage", - "typeString": "struct CoinMixer.Deal storage ref[] storage ref" - } - }, - "id": 823, - "indexExpression": { - "argumentTypes": null, - "id": 822, - "name": "_dealId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 814, - "src": "6916:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6910:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Deal_$115_storage", - "typeString": "struct CoinMixer.Deal storage ref" - } - }, - "id": 824, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "encryptedDestAddresses", - "nodeType": "MemberAccess", - "referencedDeclaration": 107, - "src": "6910:37:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage", - "typeString": "bytes storage ref[] storage ref" - } - }, - "id": 826, - "indexExpression": { - "argumentTypes": null, - "id": 825, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 816, - "src": "6948:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6910:44:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "functionReturnParameters": 820, - "id": 827, - "nodeType": "Return", - "src": "6903:51:1" - } - ] - }, - "documentation": null, - "id": 829, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getEncryptedAddress", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 817, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 814, - "name": "_dealId", - "nodeType": "VariableDeclaration", - "scope": 829, - "src": "6770:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - }, - "typeName": { - "id": 813, - "name": "uint32", - "nodeType": "ElementaryTypeName", - "src": "6770:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint32", - "typeString": "uint32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 816, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 829, - "src": "6786:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 815, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6786:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6769:28:1" - }, - "payable": false, - "returnParameters": { - "id": 820, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 819, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 829, - "src": "6831:5:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 818, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "6831:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6830:7:1" - }, - "scope": 830, - "src": "6741:220:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 831, - "src": "50:6913:1" - } - ], - "src": "0:6965:1" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "2.0.0", - "updatedAt": "2018-10-14T09:14:17.685Z" -} \ No newline at end of file diff --git a/test/ethereum/scripts/includes/build/ECRecovery.json b/test/ethereum/scripts/includes/build/ECRecovery.json deleted file mode 100644 index 0540cd84..00000000 --- a/test/ethereum/scripts/includes/build/ECRecovery.json +++ /dev/null @@ -1,2289 +0,0 @@ -{ - "contractName": "ECRecovery", - "abi": [], - "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820d19060762a5c3eaf8b695800f5f7dc43dddef14ac3a0f3d8675cc5b6c47640280029", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820d19060762a5c3eaf8b695800f5f7dc43dddef14ac3a0f3d8675cc5b6c47640280029", - "sourceMap": "301:1658:6:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", - "deployedSourceMap": "301:1658:6:-;;;;;;;;", - "source": "pragma solidity ^0.4.24;\n\n\n/**\n * @title Elliptic curve signature operations\n * @dev Based on https://gist.github.com/axic/5b33912c6f61ae6fd96d6c4a47afde6d\n * TODO Remove this library once solidity supports passing a signature to ecrecover.\n * See https://github.com/ethereum/solidity/issues/864\n */\n\nlibrary ECRecovery {\n\n /**\n * @dev Recover signer address from a message by using their signature\n * @param _hash bytes32 message, the hash is the signed message. What is recovered is the signer address.\n * @param _sig bytes signature, the signature is generated using web3.eth.sign()\n */\n function recover(bytes32 _hash, bytes _sig)\n internal\n pure\n returns (address)\n {\n bytes32 r;\n bytes32 s;\n uint8 v;\n\n // Check the signature length\n if (_sig.length != 65) {\n return (address(0));\n }\n\n // Divide the signature in r, s and v variables\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n r := mload(add(_sig, 32))\n s := mload(add(_sig, 64))\n v := byte(0, mload(add(_sig, 96)))\n }\n\n // Version of signature should be 27 or 28, but 0 and 1 are also possible versions\n if (v < 27) {\n v += 27;\n }\n\n // If the version is correct return the signer address\n if (v != 27 && v != 28) {\n return (address(0));\n } else {\n // solium-disable-next-line arg-overflow\n return ecrecover(_hash, v, r, s);\n }\n }\n\n /**\n * toEthSignedMessageHash\n * @dev prefix a bytes32 value with \"\\x19Ethereum Signed Message:\"\n * and hash the result\n */\n function toEthSignedMessageHash(bytes32 _hash)\n internal\n pure\n returns (bytes32)\n {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(\n abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", _hash)\n );\n }\n}\n", - "sourcePath": "openzeppelin-solidity/contracts/ECRecovery.sol", - "ast": { - "absolutePath": "openzeppelin-solidity/contracts/ECRecovery.sol", - "exportedSymbols": { - "ECRecovery": [ - 2921 - ] - }, - "id": 2922, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2842, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title Elliptic curve signature operations\n@dev Based on https://gist.github.com/axic/5b33912c6f61ae6fd96d6c4a47afde6d\nTODO Remove this library once solidity supports passing a signature to ecrecover.\nSee https://github.com/ethereum/solidity/issues/864", - "fullyImplemented": true, - "id": 2921, - "linearizedBaseContracts": [ - 2921 - ], - "name": "ECRecovery", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 2903, - "nodeType": "Block", - "src": "691:849:6", - "statements": [ - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2852, - "name": "r", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "697:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2851, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "697:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2853, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "697:9:6" - }, - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2855, - "name": "s", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "712:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2854, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "712:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2856, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "712:9:6" - }, - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2858, - "name": "v", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "727:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 2857, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "727:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2859, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "727:7:6" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2860, - "name": "_sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2846, - "src": "779:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 2861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "779:11:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3635", - "id": 2862, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "794:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_65_by_1", - "typeString": "int_const 65" - }, - "value": "65" - }, - "src": "779:17:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2870, - "nodeType": "IfStatement", - "src": "775:57:6", - "trueBody": { - "id": 2869, - "nodeType": "Block", - "src": "798:34:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2865, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "822:1:6", - "subdenomination": null, - "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": 2864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "814:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2866, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 2867, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "813:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2850, - "id": 2868, - "nodeType": "Return", - "src": "806:19:6" - } - ] - } - }, - { - "externalReferences": [ - { - "r": { - "declaration": 2852, - "isOffset": false, - "isSlot": false, - "src": "1082:1:6", - "valueSize": 1 - } - }, - { - "v": { - "declaration": 2858, - "isOffset": false, - "isSlot": false, - "src": "1146:1:6", - "valueSize": 1 - } - }, - { - "_sig": { - "declaration": 2846, - "isOffset": false, - "isSlot": false, - "src": "1097:4:6", - "valueSize": 1 - } - }, - { - "s": { - "declaration": 2855, - "isOffset": false, - "isSlot": false, - "src": "1114:1:6", - "valueSize": 1 - } - }, - { - "_sig": { - "declaration": 2846, - "isOffset": false, - "isSlot": false, - "src": "1129:4:6", - "valueSize": 1 - } - }, - { - "_sig": { - "declaration": 2846, - "isOffset": false, - "isSlot": false, - "src": "1169:4:6", - "valueSize": 1 - } - } - ], - "id": 2871, - "nodeType": "InlineAssembly", - "operations": "{\n r := mload(add(_sig, 32))\n s := mload(add(_sig, 64))\n v := byte(0, mload(add(_sig, 96)))\n}", - "src": "1065:216:6" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 2874, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2872, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2858, - "src": "1283:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3237", - "id": 2873, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1287:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_27_by_1", - "typeString": "int_const 27" - }, - "value": "27" - }, - "src": "1283:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2880, - "nodeType": "IfStatement", - "src": "1279:34:6", - "trueBody": { - "id": 2879, - "nodeType": "Block", - "src": "1291:22:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2875, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2858, - "src": "1299:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3237", - "id": 2876, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1304:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_27_by_1", - "typeString": "int_const 27" - }, - "value": "27" - }, - "src": "1299:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 2878, - "nodeType": "ExpressionStatement", - "src": "1299:7:6" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 2887, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 2883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2881, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2858, - "src": "1382:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3237", - "id": 2882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1387:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_27_by_1", - "typeString": "int_const 27" - }, - "value": "27" - }, - "src": "1382:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 2886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2884, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2858, - "src": "1393:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3238", - "id": 2885, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1398:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_28_by_1", - "typeString": "int_const 28" - }, - "value": "28" - }, - "src": "1393:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1382:18:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2901, - "nodeType": "Block", - "src": "1442:94:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2895, - "name": "_hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2844, - "src": "1514:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2896, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2858, - "src": "1521:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 2897, - "name": "r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2852, - "src": "1524:1:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2898, - "name": "s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2855, - "src": "1527:1:6", - "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": 2894, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3440, - "src": "1504:9:6", - "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": 2899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1504:25:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2850, - "id": 2900, - "nodeType": "Return", - "src": "1497:32:6" - } - ] - }, - "id": 2902, - "nodeType": "IfStatement", - "src": "1378:158:6", - "trueBody": { - "id": 2893, - "nodeType": "Block", - "src": "1402:34:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2889, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1426:1:6", - "subdenomination": null, - "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": 2888, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1418:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2890, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1418:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 2891, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1417:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2850, - "id": 2892, - "nodeType": "Return", - "src": "1410:19:6" - } - ] - } - } - ] - }, - "documentation": "@dev Recover signer address from a message by using their signature\n@param _hash bytes32 message, the hash is the signed message. What is recovered is the signer address.\n@param _sig bytes signature, the signature is generated using web3.eth.sign()", - "id": 2904, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "recover", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2847, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2844, - "name": "_hash", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "618:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2843, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "618:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2846, - "name": "_sig", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "633:10:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2845, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "633:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "617:27:6" - }, - "payable": false, - "returnParameters": { - "id": 2850, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2849, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "680:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2848, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "680:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "679:9:6" - }, - "scope": 2921, - "src": "601:939:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2919, - "nodeType": "Block", - "src": "1771:186:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a3332", - "id": 2914, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1904:34:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73", - "typeString": "literal_string \"\u0019Ethereum Signed Message:\n32\"" - }, - "value": "\u0019Ethereum Signed Message:\n32" - }, - { - "argumentTypes": null, - "id": 2915, - "name": "_hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2906, - "src": "1940:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73", - "typeString": "literal_string \"\u0019Ethereum Signed Message:\n32\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 2912, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3435, - "src": "1887:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2913, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1887:16:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2916, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1887:59:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2911, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3442, - "src": "1870:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1870:82:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 2910, - "id": 2918, - "nodeType": "Return", - "src": "1863:89:6" - } - ] - }, - "documentation": "toEthSignedMessageHash\n@dev prefix a bytes32 value with \"\\x19Ethereum Signed Message:\"\nand hash the result", - "id": 2920, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "toEthSignedMessageHash", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2907, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2906, - "name": "_hash", - "nodeType": "VariableDeclaration", - "scope": 2920, - "src": "1710:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2905, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1710:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1709:15:6" - }, - "payable": false, - "returnParameters": { - "id": 2910, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2909, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2920, - "src": "1760:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2908, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1760:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1759:9:6" - }, - "scope": 2921, - "src": "1678:279:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 2922, - "src": "301:1658:6" - } - ], - "src": "0:1960:6" - }, - "legacyAST": { - "absolutePath": "openzeppelin-solidity/contracts/ECRecovery.sol", - "exportedSymbols": { - "ECRecovery": [ - 2921 - ] - }, - "id": 2922, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2842, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:6" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title Elliptic curve signature operations\n@dev Based on https://gist.github.com/axic/5b33912c6f61ae6fd96d6c4a47afde6d\nTODO Remove this library once solidity supports passing a signature to ecrecover.\nSee https://github.com/ethereum/solidity/issues/864", - "fullyImplemented": true, - "id": 2921, - "linearizedBaseContracts": [ - 2921 - ], - "name": "ECRecovery", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 2903, - "nodeType": "Block", - "src": "691:849:6", - "statements": [ - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2852, - "name": "r", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "697:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2851, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "697:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2853, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "697:9:6" - }, - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2855, - "name": "s", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "712:9:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2854, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "712:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2856, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "712:9:6" - }, - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2858, - "name": "v", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "727:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 2857, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "727:5:6", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2859, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "727:7:6" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2860, - "name": "_sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2846, - "src": "779:4:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 2861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "779:11:6", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3635", - "id": 2862, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "794:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_65_by_1", - "typeString": "int_const 65" - }, - "value": "65" - }, - "src": "779:17:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2870, - "nodeType": "IfStatement", - "src": "775:57:6", - "trueBody": { - "id": 2869, - "nodeType": "Block", - "src": "798:34:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2865, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "822:1:6", - "subdenomination": null, - "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": 2864, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "814:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2866, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 2867, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "813:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2850, - "id": 2868, - "nodeType": "Return", - "src": "806:19:6" - } - ] - } - }, - { - "externalReferences": [ - { - "r": { - "declaration": 2852, - "isOffset": false, - "isSlot": false, - "src": "1082:1:6", - "valueSize": 1 - } - }, - { - "v": { - "declaration": 2858, - "isOffset": false, - "isSlot": false, - "src": "1146:1:6", - "valueSize": 1 - } - }, - { - "_sig": { - "declaration": 2846, - "isOffset": false, - "isSlot": false, - "src": "1097:4:6", - "valueSize": 1 - } - }, - { - "s": { - "declaration": 2855, - "isOffset": false, - "isSlot": false, - "src": "1114:1:6", - "valueSize": 1 - } - }, - { - "_sig": { - "declaration": 2846, - "isOffset": false, - "isSlot": false, - "src": "1129:4:6", - "valueSize": 1 - } - }, - { - "_sig": { - "declaration": 2846, - "isOffset": false, - "isSlot": false, - "src": "1169:4:6", - "valueSize": 1 - } - } - ], - "id": 2871, - "nodeType": "InlineAssembly", - "operations": "{\n r := mload(add(_sig, 32))\n s := mload(add(_sig, 64))\n v := byte(0, mload(add(_sig, 96)))\n}", - "src": "1065:216:6" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 2874, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2872, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2858, - "src": "1283:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3237", - "id": 2873, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1287:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_27_by_1", - "typeString": "int_const 27" - }, - "value": "27" - }, - "src": "1283:6:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2880, - "nodeType": "IfStatement", - "src": "1279:34:6", - "trueBody": { - "id": 2879, - "nodeType": "Block", - "src": "1291:22:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2875, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2858, - "src": "1299:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3237", - "id": 2876, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1304:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_27_by_1", - "typeString": "int_const 27" - }, - "value": "27" - }, - "src": "1299:7:6", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 2878, - "nodeType": "ExpressionStatement", - "src": "1299:7:6" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 2887, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 2883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2881, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2858, - "src": "1382:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3237", - "id": 2882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1387:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_27_by_1", - "typeString": "int_const 27" - }, - "value": "27" - }, - "src": "1382:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 2886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2884, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2858, - "src": "1393:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3238", - "id": 2885, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1398:2:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_28_by_1", - "typeString": "int_const 28" - }, - "value": "28" - }, - "src": "1393:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "1382:18:6", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2901, - "nodeType": "Block", - "src": "1442:94:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2895, - "name": "_hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2844, - "src": "1514:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2896, - "name": "v", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2858, - "src": "1521:1:6", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 2897, - "name": "r", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2852, - "src": "1524:1:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2898, - "name": "s", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2855, - "src": "1527:1:6", - "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": 2894, - "name": "ecrecover", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3440, - "src": "1504:9:6", - "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": 2899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1504:25:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2850, - "id": 2900, - "nodeType": "Return", - "src": "1497:32:6" - } - ] - }, - "id": 2902, - "nodeType": "IfStatement", - "src": "1378:158:6", - "trueBody": { - "id": 2893, - "nodeType": "Block", - "src": "1402:34:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2889, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1426:1:6", - "subdenomination": null, - "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": 2888, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1418:7:6", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 2890, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1418:10:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 2891, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "1417:12:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2850, - "id": 2892, - "nodeType": "Return", - "src": "1410:19:6" - } - ] - } - } - ] - }, - "documentation": "@dev Recover signer address from a message by using their signature\n@param _hash bytes32 message, the hash is the signed message. What is recovered is the signer address.\n@param _sig bytes signature, the signature is generated using web3.eth.sign()", - "id": 2904, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "recover", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2847, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2844, - "name": "_hash", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "618:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2843, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "618:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2846, - "name": "_sig", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "633:10:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2845, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "633:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "617:27:6" - }, - "payable": false, - "returnParameters": { - "id": 2850, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2849, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2904, - "src": "680:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2848, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "680:7:6", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "679:9:6" - }, - "scope": 2921, - "src": "601:939:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2919, - "nodeType": "Block", - "src": "1771:186:6", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a3332", - "id": 2914, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1904:34:6", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73", - "typeString": "literal_string \"\u0019Ethereum Signed Message:\n32\"" - }, - "value": "\u0019Ethereum Signed Message:\n32" - }, - { - "argumentTypes": null, - "id": 2915, - "name": "_hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2906, - "src": "1940:5:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73", - "typeString": "literal_string \"\u0019Ethereum Signed Message:\n32\"" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 2912, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3435, - "src": "1887:3:6", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2913, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1887:16:6", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2916, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1887:59:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2911, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3442, - "src": "1870:9:6", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2917, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1870:82:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 2910, - "id": 2918, - "nodeType": "Return", - "src": "1863:89:6" - } - ] - }, - "documentation": "toEthSignedMessageHash\n@dev prefix a bytes32 value with \"\\x19Ethereum Signed Message:\"\nand hash the result", - "id": 2920, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "toEthSignedMessageHash", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2907, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2906, - "name": "_hash", - "nodeType": "VariableDeclaration", - "scope": 2920, - "src": "1710:13:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2905, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1710:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1709:15:6" - }, - "payable": false, - "returnParameters": { - "id": 2910, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2909, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2920, - "src": "1760:7:6", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2908, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1760:7:6", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1759:9:6" - }, - "scope": 2921, - "src": "1678:279:6", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 2922, - "src": "301:1658:6" - } - ], - "src": "0:1960:6" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "2.0.0", - "updatedAt": "2018-10-10T12:57:03.069Z" -} \ No newline at end of file diff --git a/test/ethereum/scripts/includes/build/ERC20.json b/test/ethereum/scripts/includes/build/ERC20.json deleted file mode 100644 index 4244bfa7..00000000 --- a/test/ethereum/scripts/includes/build/ERC20.json +++ /dev/null @@ -1,47191 +0,0 @@ -{ - "contractName": "ERC20", - "abi": [ - { - "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" - }, - { - "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" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "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": 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": true, - "inputs": [ - { - "name": "who", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "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" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "sourceMap": "", - "deployedSourceMap": "", - "source": "pragma solidity ^0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/ECRecovery.sol\";\n\ncontract ERC20 {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\ncontract Enigma {\n using SafeMath for uint256;\n using ECRecovery for bytes32;\n\n // The interface of the deployed ENG ERC20 token contract\n ERC20 public engToken;\n\n struct Task {\n uint fee;\n address token;\n uint tokenValue;\n bytes proof; // Signature of (taskId, inStateDeltaHash, outStateDeltaHash, ethCall)\n address sender;\n TaskStatus status;\n }\n enum TaskStatus {RecordCreated, ReceiptVerified}\n\n /**\n * The signer address of the principal node\n * This must be set when deploying the contract and remains immutable\n * Since the signer address is derived from the public key of an\n * SGX enclave, this ensures that the principal node cannot be tempered\n * with or replaced.\n */\n address principal;\n\n // The data representation of a worker (or node)\n struct Worker {\n address signer;\n uint8 status; // Uninitialized: 0; Active: 1; Inactive: 2\n bytes report; // Decided to store this as one RLP encoded attribute for easier external storage in the future\n uint256 balance;\n }\n\n /**\n * The data representation of the worker parameters used as input for\n * the worker selection algorithm\n */\n struct WorkersParams {\n uint firstBlockNumber;\n address[] workers;\n uint[] balances;\n uint seed;\n }\n\n struct SecretContract {\n address owner;\n bytes32 codeHash;\n bytes32[] stateDeltaHashes;\n SecretContractStatus status;\n // TODO: consider keeping an index of taskIds\n }\n // TODO: do we want to have a contract lifecycle?\n enum SecretContractStatus {Undefined, Deployed}\n\n /**\n * The last 5 worker parameters\n * We keep a collection of worker parameters to account for latency issues.\n * A computation task might be conceivably given out at a certain block number\n * but executed at a later block in a different epoch. It follows that\n * the contract must have access to the worker parameters effective when giving\n * out the task, otherwise the selected worker would not match. We calculated\n * that keeping the last 5 items should be more than enough to account for\n * all latent tasks. Tasks results will be rejected past this limit.\n */\n WorkersParams[5] workersParams;\n\n // An address-based index of all registered worker\n address[] public workerAddresses;\n // An address-based index of all secret contracts\n address[] public scAddresses;\n\n // A registry of all registered workers with their attributes\n mapping(address => Worker) public workers;\n mapping(bytes32 => Task) public tasks;\n mapping(address => SecretContract) public contracts;\n\n // TODO: do we keep tasks forever? if not, when do we delete them?\n uint stakingThreshold;\n uint workerGroupSize;\n\n // The events emitted by the contract\n event Registered(address custodian, address signer);\n event ValidatedSig(bytes sig, bytes32 hash, address workerAddr);\n event WorkersParameterized(uint seed, uint256 blockNumber, address[] workers, uint[] balances);\n event TaskRecordCreated(bytes32 taskId, uint fee, address token, uint tokenValue, address sender);\n event TaskRecordsCreated(bytes32[] taskIds, uint[] fees, address[] tokens, uint[] tokenValues, address sender);\n event ReceiptVerified(bytes32 taskId, bytes32 inStateDeltaHash, bytes32 outStateDeltaHash, bytes ethCall, bytes sig);\n event ReceiptsVerified(bytes32[] taskIds, bytes32[] inStateDeltaHashes, bytes32[] outStateDeltaHashes, bytes[] ethCalls, bytes[] sigs);\n event DepositSuccessful(address from, uint value);\n event SecretContractDeployed(address scAddr, bytes32 codeHash);\n\n constructor(address _tokenAddress, address _principal) public {\n engToken = ERC20(_tokenAddress);\n principal = _principal;\n stakingThreshold = 1;\n workerGroupSize = 10;\n }\n\n //TODO: break down these methods into services for upgradability\n\n /**\n * Checks if the custodian wallet is registered as a worker\n *\n * @param user The custodian address of the worker\n */\n modifier workerRegistered(address user) {\n Worker memory worker = workers[user];\n require(worker.status > 0, \"Unregistered worker.\");\n _;\n }\n\n modifier contractDeployed(address scAddr) {\n require(contracts[scAddr].status == SecretContractStatus.Deployed, \"Secret contract not deployed.\");\n _;\n }\n\n /**\n * Registers a new worker of change the signer parameters of an existing\n * worker. This should be called by every worker (and the principal)\n * node in order to receive tasks.\n *\n * @param signer The signer address, derived from the enclave public key\n * @param report The RLP encoded report returned by the IAS\n */\n function register(address signer, bytes report)\n public\n {\n // TODO: consider exit if both signer and custodian as matching\n // If the custodian is not already register, we add an index entry\n if (workers[msg.sender].signer == 0x0) {\n // TODO: does workerAddresses.push just work here?\n uint index = workerAddresses.length;\n workerAddresses.length++;\n workerAddresses[index] = msg.sender;\n }\n\n // Set the custodian attributes\n workers[msg.sender].signer = signer;\n workers[msg.sender].balance = 0;\n workers[msg.sender].report = report;\n workers[msg.sender].status = 1;\n\n emit Registered(msg.sender, signer);\n }\n\n function deposit(address custodian, uint amount)\n public\n workerRegistered(custodian)\n {\n// require(engToken.allowance(custodian, to) >= amount, \"Not enough tokens allowed for transfer\");\n// engToken.transferFrom(custodian, this, amount);\n\n workers[custodian].balance = workers[custodian].balance.add(amount);\n\n emit DepositSuccessful(custodian, amount);\n }\n\n // TODO: should the scAddr be computed on-chain from the codeHash + some randomness\n // TODO: should any user deploy a secret contract or only a trusted enclave?\n function deploySecretContract(address scAddr, bytes32 codeHash, address owner, bytes sig)\n public\n workerRegistered(msg.sender)\n {\n require(contracts[scAddr].status == SecretContractStatus.Undefined, \"Secret contract already deployed.\");\n //TODO: verify sig\n\n //TODO: is this too naive?\n contracts[scAddr].owner = owner;\n contracts[scAddr].codeHash = codeHash;\n contracts[scAddr].status = SecretContractStatus.Deployed;\n scAddresses.push(scAddr);\n\n emit SecretContractDeployed(scAddr, codeHash);\n }\n\n function isDeployed(address scAddr)\n public\n view\n returns (bool)\n {\n if (contracts[scAddr].status == SecretContractStatus.Deployed) {\n return true;\n } else {\n return false;\n }\n }\n\n function getCodeHash(address scAddr)\n public\n view\n contractDeployed(scAddr)\n returns (bytes32)\n {\n return contracts[scAddr].codeHash;\n }\n\n function countSecretContracts()\n public\n view\n returns (uint)\n {\n return scAddresses.length;\n }\n\n /**\n * Selects address from start up to, but not including, the stop number\n **/\n function getSecretContractAddresses(uint start, uint stop)\n public\n view\n returns (address[])\n {\n if (stop == 0) {\n stop = scAddresses.length;\n }\n address[] memory addresses = new address[](stop.sub(start));\n uint pos = 0;\n for (uint i = start; i < stop; i++) {\n addresses[pos] = scAddresses[i];\n }\n return addresses;\n }\n\n function countStateDeltas(address scAddr)\n public\n view\n contractDeployed(scAddr)\n returns (uint)\n {\n return contracts[scAddr].stateDeltaHashes.length;\n }\n\n function getStateDeltaHash(address scAddr, uint index)\n public\n view\n contractDeployed(scAddr)\n returns (bytes32)\n {\n return contracts[scAddr].stateDeltaHashes[index];\n }\n\n /**\n * Selects state deltas from start up to, but not including, the stop number\n **/\n function getStateDeltaHashes(address scAddr, uint start, uint stop)\n public\n view\n contractDeployed(scAddr)\n returns (bytes32[])\n {\n if (stop == 0) {\n stop = contracts[scAddr].stateDeltaHashes.length;\n }\n bytes32[] memory deltas = new bytes32[](stop.sub(start));\n uint pos = 0;\n for (uint i = start; i < stop; i++) {\n deltas[pos] = contracts[scAddr].stateDeltaHashes[i];\n }\n return deltas;\n }\n\n function isValidDeltaHash(address scAddr, bytes32 stateDeltaHash)\n public\n view\n contractDeployed(scAddr)\n returns (bool)\n {\n bool valid = false;\n for (uint i = 0; i < contracts[scAddr].stateDeltaHashes.length; i++) {\n if (contracts[scAddr].stateDeltaHashes[i] == stateDeltaHash) {\n valid = true;\n break;\n }\n }\n return valid;\n }\n\n /**\n * Store task record\n *\n */\n function createTaskRecord(\n bytes32 taskId,\n uint fee,\n address token,\n uint tokenValue\n )\n public\n {\n require(tasks[taskId].sender == 0x0, \"Task already exist.\");\n\n tasks[taskId].fee = fee;\n tasks[taskId].token = token;\n tasks[taskId].tokenValue = tokenValue;\n tasks[taskId].sender = msg.sender;\n tasks[taskId].status = TaskStatus.RecordCreated;\n\n emit TaskRecordCreated(taskId, fee, token, tokenValue, msg.sender);\n }\n\n function createTaskRecords(\n bytes32[] taskIds,\n uint[] fees,\n address[] tokens,\n uint[] tokenValues\n )\n public\n {\n for (uint i = 0; i < taskIds.length; i++) {\n require(tasks[taskIds[i]].sender == 0x0, \"Task already exist.\");\n\n tasks[taskIds[i]].fee = fees[i];\n tasks[taskIds[i]].token = tokens[i];\n tasks[taskIds[i]].tokenValue = tokenValues[i];\n tasks[taskIds[i]].sender = msg.sender;\n tasks[taskIds[i]].status = TaskStatus.RecordCreated;\n }\n emit TaskRecordsCreated(taskIds, fees, tokens, tokenValues, msg.sender);\n }\n\n // Execute the encoded function in the specified contract\n function executeCall(address to, uint256 value, bytes data)\n internal\n returns (bool success)\n {\n assembly {\n success := call(gas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function verifyReceipt(\n address scAddr,\n bytes32 taskId,\n bytes32 inStateDeltaHash,\n bytes32 outStateDeltaHash,\n bytes ethCall,\n bytes sig\n )\n internal\n {\n uint index = contracts[scAddr].stateDeltaHashes.length;\n if (index == 0) {\n require(inStateDeltaHash == 0x0, 'Invalid input state delta hash for empty state');\n } else {\n require(inStateDeltaHash == contracts[scAddr].stateDeltaHashes[index.sub(1)], 'Invalid input state delta hash');\n }\n contracts[scAddr].stateDeltaHashes.length++;\n contracts[scAddr].stateDeltaHashes[index] = outStateDeltaHash;\n\n // TODO: execute the Ethereum calls\n\n // Build a hash to validate that the I/Os are matching\n bytes32 hash = keccak256(abi.encodePacked(taskId, inStateDeltaHash, outStateDeltaHash, ethCall));\n\n // The worker address is not a real Ethereum wallet address but\n // one generated from its signing key\n address workerAddr = hash.recover(sig);\n require(workerAddr == workers[msg.sender].signer, \"Invalid signature.\");\n }\n\n /**\n * Commit the computation task results on chain\n */\n function commitReceipt(\n address scAddr,\n bytes32 taskId,\n bytes32 inStateDeltaHash,\n bytes32 outStateDeltaHash,\n bytes ethCall,\n bytes sig\n )\n public\n workerRegistered(msg.sender)\n contractDeployed(scAddr)\n {\n require(tasks[taskId].status == TaskStatus.RecordCreated, 'Invalid task status');\n verifyReceipt(scAddr, taskId, inStateDeltaHash, outStateDeltaHash, ethCall, sig);\n\n tasks[taskId].proof = sig;\n tasks[taskId].status = TaskStatus.ReceiptVerified;\n emit ReceiptVerified(taskId, inStateDeltaHash, outStateDeltaHash, ethCall, sig);\n }\n\n function commitReceipts(\n address scAddr,\n bytes32[] taskIds,\n bytes32[] inStateDeltaHashes,\n bytes32[] outStateDeltaHashes,\n bytes[] ethCalls,\n bytes[] sigs\n )\n public\n workerRegistered(msg.sender)\n contractDeployed(scAddr)\n {\n for (uint i = 0; i < taskIds.length; i++) {\n // TODO: consider aggregate signature\n require(tasks[taskIds[i]].status == TaskStatus.RecordCreated, 'Invalid task status');\n verifyReceipt(scAddr, taskIds[i], inStateDeltaHashes[i], outStateDeltaHashes[i], ethCalls[i], sigs[i]);\n\n tasks[taskIds[i]].proof = sigs[i];\n tasks[taskIds[i]].status = TaskStatus.ReceiptVerified;\n }\n emit ReceiptsVerified(taskIds, inStateDeltaHashes, outStateDeltaHashes, ethCalls, sigs);\n }\n\n // Verify the signature submitted while reparameterizing workers\n function verifyParamsSig(uint256 seed, bytes sig)\n internal\n pure\n returns (address)\n {\n bytes32 hash = keccak256(abi.encodePacked(seed));\n address signer = hash.recover(sig);\n return signer;\n }\n\n /**\n * Reparameterizing workers with a new seed\n * This should be called for each epoch by the Principal node\n *\n * @param seed The random integer generated by the enclave\n * @param sig The random integer signed by the the principal node's enclave\n */\n function setWorkersParams(uint seed, bytes sig)\n public\n workerRegistered(msg.sender)\n {\n // Reparameterizing workers with a new seed\n // This should be called for each epoch by the Principal node\n\n // We assume that the Principal is always the first registered node\n require(workers[msg.sender].signer == principal, \"Only the Principal can update the seed\");\n // TODO: verify the principal sig\n\n // Create a new workers parameters item for the specified seed.\n // The workers parameters list is a sort of cache, it never grows beyond its limit.\n // If the list is full, the new item will replace the item assigned to the lowest block number.\n uint paramIndex = 0;\n for (uint pi = 0; pi < workersParams.length; pi++) {\n // Find an empty slot in the array, if full use the lowest block number\n if (workersParams[pi].firstBlockNumber == 0) {\n paramIndex = pi;\n break;\n } else if (workersParams[pi].firstBlockNumber < workersParams[paramIndex].firstBlockNumber) {\n paramIndex = pi;\n }\n }\n workersParams[paramIndex].firstBlockNumber = block.number;\n workersParams[paramIndex].seed = seed;\n\n // Copy the current worker list\n uint workerIndex = 0;\n for (uint wi = 0; wi < workerAddresses.length; wi++) {\n if (workers[workerAddresses[wi]].balance > stakingThreshold) {\n workersParams[paramIndex].workers.length++;\n workersParams[paramIndex].workers[workerIndex] = workerAddresses[wi];\n\n workersParams[paramIndex].balances.length++;\n workersParams[paramIndex].balances[workerIndex] = workers[workerAddresses[wi]].balance;\n\n workerIndex = workerIndex.add(1);\n }\n }\n emit WorkersParameterized(seed, block.number, workersParams[paramIndex].workers, workersParams[paramIndex].balances);\n }\n\n function getWorkerParamsIndex(uint blockNumber)\n internal\n view\n returns (uint)\n {\n // The workers parameters for a given block number\n int8 index = - 1;\n for (uint i = 0; i < workersParams.length; i++) {\n if (workersParams[i].firstBlockNumber <= blockNumber && (index == - 1 || workersParams[i].firstBlockNumber > workersParams[uint(index)].firstBlockNumber)) {\n index = int8(i);\n }\n }\n require(index != - 1, \"No workers parameters entry for specified block number\");\n return uint(index);\n }\n\n function getWorkerParams(uint blockNumber)\n public\n view\n returns (uint, uint, address[], uint[]) {\n uint index = getWorkerParamsIndex(blockNumber);\n WorkersParams memory params = workersParams[index];\n return (params.firstBlockNumber, params.seed, params.workers, params.balances);\n }\n\n function compileTokens(uint paramIndex)\n internal\n view\n returns (address[])\n {\n WorkersParams memory params = workersParams[paramIndex];\n uint tokenCpt = 0;\n for (uint i = 0; i < params.workers.length; i++) {\n if (params.workers[i] != 0x0) {\n tokenCpt = tokenCpt.add(params.balances[i]);\n }\n }\n address[] memory tokens = new address[](tokenCpt);\n uint tokenIndex = 0;\n for (uint ia = 0; ia < params.workers.length; ia++) {\n if (params.workers[ia] != 0x0) {\n for (uint ib = 0; ib < params.balances[ia]; ib++) {\n tokens[tokenIndex] = params.workers[ia];\n tokenIndex = tokenIndex.add(1);\n }\n }\n }\n return tokens;\n }\n\n function getWorkerGroup(uint blockNumber, address scAddr)\n public\n view\n {\n // Compile a list of selected workers for the block number and\n // secret contract.\n uint paramIndex = getWorkerParamsIndex(blockNumber);\n address[] memory tokens = compileTokens(paramIndex);\n WorkersParams memory params = workersParams[paramIndex];\n\n address[] memory selectedWorkers = new address[](workerGroupSize);\n for (uint it; it < selectedWorkers.length; it++) {\n do {\n uint nonce = 0;\n bytes32 hash = keccak256(abi.encodePacked(nonce, params.seed, blockNumber, scAddr));\n uint index = uint256(hash) % tokens.length;\n address worker = tokens[index];\n bool dup = false;\n for (uint id; id < selectedWorkers.length; id++) {\n if (worker == selectedWorkers[id]) {\n dup = true;\n break;\n }\n }\n if (dup == false) {\n selectedWorkers[it] = worker;\n } else {\n nonce = nonce.add(1);\n }\n }\n while (selectedWorkers[it] == 0x0);\n }\n }\n\n /**\n * The worker parameters corresponding to the specified block number\n *\n * @param blockNumber The reference block number\n */\n function getWorkersParams(uint blockNumber)\n public\n view\n returns (uint, uint, address[], address[])\n {\n // TODO: finalize implementation\n uint firstBlockNumber = 0;\n uint seed = 0;\n address[] memory activeWorkers;\n address[] memory activeContracts;\n return (firstBlockNumber, seed, activeWorkers, activeContracts);\n }\n\n /**\n * The RLP encoded report returned by the IAS server\n *\n * @param custodian The worker's custodian address\n */\n function getReport(address custodian)\n public\n view\n workerRegistered(custodian)\n returns (address, bytes)\n {\n // The RLP encoded report and signer's address for the specified worker\n require(workers[custodian].signer != 0x0, \"Worker not registered\");\n return (workers[custodian].signer, workers[custodian].report);\n }\n}\n", - "sourcePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/Enigma.sol", - "ast": { - "absolutePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/Enigma.sol", - "exportedSymbols": { - "ERC20": [ - 902 - ], - "Enigma": [ - 2657 - ] - }, - "id": 2658, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 832, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:2" - }, - { - "id": 833, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "25:33:2" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "id": 834, - "nodeType": "ImportDirective", - "scope": 2658, - "sourceUnit": 3016, - "src": "60:59:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/ECRecovery.sol", - "file": "openzeppelin-solidity/contracts/ECRecovery.sol", - "id": 835, - "nodeType": "ImportDirective", - "scope": 2658, - "sourceUnit": 2922, - "src": "120:56:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 902, - "linearizedBaseContracts": [ - 902 - ], - "name": "ERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 844, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 840, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 837, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 844, - "src": "218:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 836, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "218:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 839, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 844, - "src": "233:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 838, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "233:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "217:32:2" - }, - "payable": false, - "returnParameters": { - "id": 843, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 842, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 844, - "src": "271:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 841, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "271:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "270:9:2" - }, - "scope": 902, - "src": "199:81:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 855, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 851, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 846, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 855, - "src": "307:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 845, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "307:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 848, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 855, - "src": "321:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 847, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "321:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 850, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 855, - "src": "333:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 849, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "333:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "306:41:2" - }, - "payable": false, - "returnParameters": { - "id": 854, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 853, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 855, - "src": "364:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 852, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "364:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "363:6:2" - }, - "scope": 902, - "src": "285:85:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 864, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 860, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 857, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 864, - "src": "392:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 856, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "392:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 859, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 864, - "src": "409:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 858, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "409:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "391:32:2" - }, - "payable": false, - "returnParameters": { - "id": 863, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 862, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 864, - "src": "440:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 861, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "440:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "439:6:2" - }, - "scope": 902, - "src": "375:71:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 869, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 865, - "nodeType": "ParameterList", - "parameters": [], - "src": "471:2:2" - }, - "payable": false, - "returnParameters": { - "id": 868, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 867, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 869, - "src": "495:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 866, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "495:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "494:9:2" - }, - "scope": 902, - "src": "451:53:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 876, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 872, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 871, - "name": "who", - "nodeType": "VariableDeclaration", - "scope": 876, - "src": "528:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 870, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "528:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "527:13:2" - }, - "payable": false, - "returnParameters": { - "id": 875, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 874, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 876, - "src": "562:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 873, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "562:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "561:9:2" - }, - "scope": 902, - "src": "509:62:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 885, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 881, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 878, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 885, - "src": "594:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 877, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "594:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 880, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 885, - "src": "606:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 879, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "606:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "593:27:2" - }, - "payable": false, - "returnParameters": { - "id": 884, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 883, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 885, - "src": "637:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 882, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "637:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "636:6:2" - }, - "scope": 902, - "src": "576:67:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 893, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 892, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 887, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 893, - "src": "664:20:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 886, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 889, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 893, - "src": "686:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 888, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "686:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 891, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 893, - "src": "706:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 890, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "706:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "663:57:2" - }, - "src": "649:72:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 901, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 900, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 895, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 901, - "src": "741:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 894, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "741:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 897, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 901, - "src": "764:23:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 896, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "764:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 899, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 901, - "src": "789:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 898, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "789:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "740:63:2" - }, - "src": "726:78:2" - } - ], - "scope": 2658, - "src": "178:628:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 2657, - "linearizedBaseContracts": [ - 2657 - ], - "name": "Enigma", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 905, - "libraryName": { - "contractScope": null, - "id": 903, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3015, - "src": "836:8:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$3015", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "830:27:2", - "typeName": { - "id": 904, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "849:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 908, - "libraryName": { - "contractScope": null, - "id": 906, - "name": "ECRecovery", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2921, - "src": "868:10:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ECRecovery_$2921", - "typeString": "library ECRecovery" - } - }, - "nodeType": "UsingForDirective", - "src": "862:29:2", - "typeName": { - "id": 907, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "883:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - }, - { - "constant": false, - "id": 910, - "name": "engToken", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "959:21:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - }, - "typeName": { - "contractScope": null, - "id": 909, - "name": "ERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 902, - "src": "959:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - } - }, - "value": null, - "visibility": "public" - }, - { - "canonicalName": "Enigma.Task", - "id": 923, - "members": [ - { - "constant": false, - "id": 912, - "name": "fee", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1009:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 911, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1009:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 914, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1027:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 913, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1027:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 916, - "name": "tokenValue", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1050:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 915, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1050:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 918, - "name": "proof", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1075:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 917, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1075:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 920, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1167:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 919, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1167:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 922, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1191:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - }, - "typeName": { - "contractScope": null, - "id": 921, - "name": "TaskStatus", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 926, - "src": "1191:10:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Task", - "nodeType": "StructDefinition", - "scope": 2657, - "src": "987:228:2", - "visibility": "public" - }, - { - "canonicalName": "Enigma.TaskStatus", - "id": 926, - "members": [ - { - "id": 924, - "name": "RecordCreated", - "nodeType": "EnumValue", - "src": "1237:13:2" - }, - { - "id": 925, - "name": "ReceiptVerified", - "nodeType": "EnumValue", - "src": "1252:15:2" - } - ], - "name": "TaskStatus", - "nodeType": "EnumDefinition", - "src": "1220:48:2" - }, - { - "constant": false, - "id": 928, - "name": "principal", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "1576:17:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 927, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1576:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "canonicalName": "Enigma.Worker", - "id": 937, - "members": [ - { - "constant": false, - "id": 930, - "name": "signer", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "1677:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 929, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1677:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 932, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "1701:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 931, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1701:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 934, - "name": "report", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "1767:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 933, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1767:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 936, - "name": "balance", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "1886:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 935, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1886:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Worker", - "nodeType": "StructDefinition", - "scope": 2657, - "src": "1653:255:2", - "visibility": "public" - }, - { - "canonicalName": "Enigma.WorkersParams", - "id": 948, - "members": [ - { - "constant": false, - "id": 939, - "name": "firstBlockNumber", - "nodeType": "VariableDeclaration", - "scope": 948, - "src": "2070:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 938, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2070:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 942, - "name": "workers", - "nodeType": "VariableDeclaration", - "scope": 948, - "src": "2101:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 940, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2101:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 941, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2101:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 945, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 948, - "src": "2128:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 943, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2128:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 944, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2128:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 947, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 948, - "src": "2153:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 946, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2153:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "WorkersParams", - "nodeType": "StructDefinition", - "scope": 2657, - "src": "2039:130:2", - "visibility": "public" - }, - { - "canonicalName": "Enigma.SecretContract", - "id": 958, - "members": [ - { - "constant": false, - "id": 950, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 958, - "src": "2207:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 949, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2207:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 952, - "name": "codeHash", - "nodeType": "VariableDeclaration", - "scope": 958, - "src": "2230:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 951, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2230:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 955, - "name": "stateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 958, - "src": "2256:26:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 953, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2256:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 954, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2256:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 957, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 958, - "src": "2292:27:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - }, - "typeName": { - "contractScope": null, - "id": 956, - "name": "SecretContractStatus", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 961, - "src": "2292:20:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "SecretContract", - "nodeType": "StructDefinition", - "scope": 2657, - "src": "2175:205:2", - "visibility": "public" - }, - { - "canonicalName": "Enigma.SecretContractStatus", - "id": 961, - "members": [ - { - "id": 959, - "name": "Undefined", - "nodeType": "EnumValue", - "src": "2466:9:2" - }, - { - "id": 960, - "name": "Deployed", - "nodeType": "EnumValue", - "src": "2477:8:2" - } - ], - "name": "SecretContractStatus", - "nodeType": "EnumDefinition", - "src": "2439:47:2" - }, - { - "constant": false, - "id": 965, - "name": "workersParams", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3091:30:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams[5]" - }, - "typeName": { - "baseType": { - "contractScope": null, - "id": 962, - "name": "WorkersParams", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 948, - "src": "3091:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage_ptr", - "typeString": "struct Enigma.WorkersParams" - } - }, - "id": 964, - "length": { - "argumentTypes": null, - "hexValue": "35", - "id": 963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3105:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "5" - }, - "nodeType": "ArrayTypeName", - "src": "3091:16:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage_ptr", - "typeString": "struct Enigma.WorkersParams[5]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 968, - "name": "workerAddresses", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3183:32:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 966, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3183:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 967, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3183:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 971, - "name": "scAddresses", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3275:28:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 969, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3275:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 970, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3275:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 975, - "name": "workers", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3376:41:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker)" - }, - "typeName": { - "id": 974, - "keyType": { - "id": 972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3384:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3376:26:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker)" - }, - "valueType": { - "contractScope": null, - "id": 973, - "name": "Worker", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 937, - "src": "3395:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage_ptr", - "typeString": "struct Enigma.Worker" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 979, - "name": "tasks", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3423:37:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task)" - }, - "typeName": { - "id": 978, - "keyType": { - "id": 976, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3431:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "3423:24:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task)" - }, - "valueType": { - "contractScope": null, - "id": 977, - "name": "Task", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 923, - "src": "3442:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage_ptr", - "typeString": "struct Enigma.Task" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 983, - "name": "contracts", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3466:51:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract)" - }, - "typeName": { - "id": 982, - "keyType": { - "id": 980, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3474:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3466:34:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract)" - }, - "valueType": { - "contractScope": null, - "id": 981, - "name": "SecretContract", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 958, - "src": "3485:14:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage_ptr", - "typeString": "struct Enigma.SecretContract" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 985, - "name": "stakingThreshold", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3595:21:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 984, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3595:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 987, - "name": "workerGroupSize", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3622:20:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 986, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3622:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "anonymous": false, - "documentation": null, - "id": 993, - "name": "Registered", - "nodeType": "EventDefinition", - "parameters": { - "id": 992, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 989, - "indexed": false, - "name": "custodian", - "nodeType": "VariableDeclaration", - "scope": 993, - "src": "3708:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 988, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3708:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 991, - "indexed": false, - "name": "signer", - "nodeType": "VariableDeclaration", - "scope": 993, - "src": "3727:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 990, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3727:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3707:35:2" - }, - "src": "3691:52:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1001, - "name": "ValidatedSig", - "nodeType": "EventDefinition", - "parameters": { - "id": 1000, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 995, - "indexed": false, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1001, - "src": "3767:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 994, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3767:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 997, - "indexed": false, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 1001, - "src": "3778:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 996, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3778:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 999, - "indexed": false, - "name": "workerAddr", - "nodeType": "VariableDeclaration", - "scope": 1001, - "src": "3792:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 998, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3792:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3766:45:2" - }, - "src": "3748:64:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1013, - "name": "WorkersParameterized", - "nodeType": "EventDefinition", - "parameters": { - "id": 1012, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1003, - "indexed": false, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 1013, - "src": "3844:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1002, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3844:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1005, - "indexed": false, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 1013, - "src": "3855:19:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1004, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3855:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1008, - "indexed": false, - "name": "workers", - "nodeType": "VariableDeclaration", - "scope": 1013, - "src": "3876:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1006, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3876:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1007, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3876:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1011, - "indexed": false, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 1013, - "src": "3895:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1009, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3895:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1010, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3895:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3843:68:2" - }, - "src": "3817:95:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1025, - "name": "TaskRecordCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 1024, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1015, - "indexed": false, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3941:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1014, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3941:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1017, - "indexed": false, - "name": "fee", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3957:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1016, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3957:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1019, - "indexed": false, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3967:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1018, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3967:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1021, - "indexed": false, - "name": "tokenValue", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3982:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1020, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3982:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1023, - "indexed": false, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3999:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1022, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3999:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3940:74:2" - }, - "src": "3917:98:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1041, - "name": "TaskRecordsCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 1040, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1028, - "indexed": false, - "name": "taskIds", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4045:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1026, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4045:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1027, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4045:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1031, - "indexed": false, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4064:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1029, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4064:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1030, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4064:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1034, - "indexed": false, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4077:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1032, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4077:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1033, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4077:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1037, - "indexed": false, - "name": "tokenValues", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4095:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1035, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4095:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1036, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4095:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1039, - "indexed": false, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4115:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1038, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4115:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4044:86:2" - }, - "src": "4020:111:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1053, - "name": "ReceiptVerified", - "nodeType": "EventDefinition", - "parameters": { - "id": 1052, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1043, - "indexed": false, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4158:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1042, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4158:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1045, - "indexed": false, - "name": "inStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4174:24:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1044, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4174:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1047, - "indexed": false, - "name": "outStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4200:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1046, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4200:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1049, - "indexed": false, - "name": "ethCall", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4227:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1048, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4227:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1051, - "indexed": false, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4242:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1050, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4242:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4157:95:2" - }, - "src": "4136:117:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1070, - "name": "ReceiptsVerified", - "nodeType": "EventDefinition", - "parameters": { - "id": 1069, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1056, - "indexed": false, - "name": "taskIds", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4281:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1054, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4281:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1055, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4281:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1059, - "indexed": false, - "name": "inStateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4300:28:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1057, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4300:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1058, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4300:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1062, - "indexed": false, - "name": "outStateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4330:29:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1060, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4330:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1061, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4330:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1065, - "indexed": false, - "name": "ethCalls", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4361:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 1063, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4361:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 1064, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4361:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1068, - "indexed": false, - "name": "sigs", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4379:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 1066, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4379:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 1067, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4379:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4280:112:2" - }, - "src": "4258:135:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1076, - "name": "DepositSuccessful", - "nodeType": "EventDefinition", - "parameters": { - "id": 1075, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1072, - "indexed": false, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 1076, - "src": "4422:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1071, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4422:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1074, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1076, - "src": "4436:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1073, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4436:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4421:26:2" - }, - "src": "4398:50:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1082, - "name": "SecretContractDeployed", - "nodeType": "EventDefinition", - "parameters": { - "id": 1081, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1078, - "indexed": false, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1082, - "src": "4482:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1077, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4482:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1080, - "indexed": false, - "name": "codeHash", - "nodeType": "VariableDeclaration", - "scope": 1082, - "src": "4498:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1079, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4498:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4481:34:2" - }, - "src": "4453:63:2" - }, - { - "body": { - "id": 1107, - "nodeType": "Block", - "src": "4584:140:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1089, - "name": "engToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 910, - "src": "4594:8:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1091, - "name": "_tokenAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1084, - "src": "4611:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1090, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 902, - "src": "4605:5:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$902_$", - "typeString": "type(contract ERC20)" - } - }, - "id": 1092, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4605:20:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - } - }, - "src": "4594:31:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - } - }, - "id": 1094, - "nodeType": "ExpressionStatement", - "src": "4594:31:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1095, - "name": "principal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 928, - "src": "4635:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1096, - "name": "_principal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1086, - "src": "4647:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4635:22:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1098, - "nodeType": "ExpressionStatement", - "src": "4635:22:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1099, - "name": "stakingThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 985, - "src": "4667:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 1100, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4686:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4667:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1102, - "nodeType": "ExpressionStatement", - "src": "4667:20:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1103, - "name": "workerGroupSize", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 987, - "src": "4697:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1104, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4715:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "4697:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1106, - "nodeType": "ExpressionStatement", - "src": "4697:20:2" - } - ] - }, - "documentation": null, - "id": 1108, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1087, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1084, - "name": "_tokenAddress", - "nodeType": "VariableDeclaration", - "scope": 1108, - "src": "4534:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1083, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4534:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1086, - "name": "_principal", - "nodeType": "VariableDeclaration", - "scope": 1108, - "src": "4557:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1085, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4557:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4533:43:2" - }, - "payable": false, - "returnParameters": { - "id": 1088, - "nodeType": "ParameterList", - "parameters": [], - "src": "4584:0:2" - }, - "scope": 2657, - "src": "4522:202:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1127, - "nodeType": "Block", - "src": "4978:124:2", - "statements": [ - { - "assignments": [ - 1113 - ], - "declarations": [ - { - "constant": false, - "id": 1113, - "name": "worker", - "nodeType": "VariableDeclaration", - "scope": 1128, - "src": "4988:20:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_memory_ptr", - "typeString": "struct Enigma.Worker" - }, - "typeName": { - "contractScope": null, - "id": 1112, - "name": "Worker", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 937, - "src": "4988:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage_ptr", - "typeString": "struct Enigma.Worker" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1117, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1114, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "5011:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1116, - "indexExpression": { - "argumentTypes": null, - "id": 1115, - "name": "user", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1110, - "src": "5019:4:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5011:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4988:36:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1119, - "name": "worker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1113, - "src": "5042:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_memory_ptr", - "typeString": "struct Enigma.Worker memory" - } - }, - "id": 1120, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 932, - "src": "5042:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1121, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5058:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5042:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e7265676973746572656420776f726b65722e", - "id": 1123, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5061:22:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_015d526a09bff2dba6bddc24f9efb2c59ba42ae95d5f989298007e714aa8b419", - "typeString": "literal_string \"Unregistered worker.\"" - }, - "value": "Unregistered worker." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_015d526a09bff2dba6bddc24f9efb2c59ba42ae95d5f989298007e714aa8b419", - "typeString": "literal_string \"Unregistered worker.\"" - } - ], - "id": 1118, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "5034:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5034:50:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1125, - "nodeType": "ExpressionStatement", - "src": "5034:50:2" - }, - { - "id": 1126, - "nodeType": "PlaceholderStatement", - "src": "5094:1:2" - } - ] - }, - "documentation": "Checks if the custodian wallet is registered as a worker\n * @param user The custodian address of the worker", - "id": 1128, - "name": "workerRegistered", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 1111, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1110, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 1128, - "src": "4964:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1109, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4964:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4963:14:2" - }, - "src": "4938:164:2", - "visibility": "internal" - }, - { - "body": { - "id": 1144, - "nodeType": "Block", - "src": "5150:127:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - }, - "id": 1139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1133, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "5168:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1135, - "indexExpression": { - "argumentTypes": null, - "id": 1134, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1130, - "src": "5178:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5168:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1136, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 957, - "src": "5168:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1137, - "name": "SecretContractStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "5196:20:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_SecretContractStatus_$961_$", - "typeString": "type(enum Enigma.SecretContractStatus)" - } - }, - "id": 1138, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Deployed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5196:29:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "src": "5168:57:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "53656372657420636f6e7472616374206e6f74206465706c6f7965642e", - "id": 1140, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5227:31:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d75dc00527700c4b910eb9a01254b9dfa870fc7fe0e54f61053a0ea9455cc0d2", - "typeString": "literal_string \"Secret contract not deployed.\"" - }, - "value": "Secret contract not deployed." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d75dc00527700c4b910eb9a01254b9dfa870fc7fe0e54f61053a0ea9455cc0d2", - "typeString": "literal_string \"Secret contract not deployed.\"" - } - ], - "id": 1132, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "5160:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5160:99:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1142, - "nodeType": "ExpressionStatement", - "src": "5160:99:2" - }, - { - "id": 1143, - "nodeType": "PlaceholderStatement", - "src": "5269:1:2" - } - ] - }, - "documentation": null, - "id": 1145, - "name": "contractDeployed", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 1131, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1130, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1145, - "src": "5134:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1129, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5134:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5133:16:2" - }, - "src": "5108:169:2", - "visibility": "internal" - }, - { - "body": { - "id": 1216, - "nodeType": "Block", - "src": "5692:670:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1152, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "5853:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1155, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1153, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "5861:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5861:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5853:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1156, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "5853:26:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1157, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5883:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "5853:33:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1177, - "nodeType": "IfStatement", - "src": "5849:249:2", - "trueBody": { - "id": 1176, - "nodeType": "Block", - "src": "5888:210:2", - "statements": [ - { - "assignments": [ - 1160 - ], - "declarations": [ - { - "constant": false, - "id": 1160, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 1217, - "src": "5965:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1159, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5965:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1163, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1161, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "5978:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1162, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5978:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5965:35:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "6014:24:2", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1164, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "6014:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1166, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6014:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1168, - "nodeType": "ExpressionStatement", - "src": "6014:24:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1169, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "6052:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1171, - "indexExpression": { - "argumentTypes": null, - "id": 1170, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1160, - "src": "6068:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6052:22:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1172, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6077:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6077:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6052:35:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1175, - "nodeType": "ExpressionStatement", - "src": "6052:35:2" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 1184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1178, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6148:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1181, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1179, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6156:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6156:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6148:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1182, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "6148:26:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1183, - "name": "signer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1147, - "src": "6177:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6148:35:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1185, - "nodeType": "ExpressionStatement", - "src": "6148:35:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1186, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6193:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1189, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1187, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6201:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6201:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6193:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1190, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "6193:27:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 1191, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6223:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6193:31:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1193, - "nodeType": "ExpressionStatement", - "src": "6193:31:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1200, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1194, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6234:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1197, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1195, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6242:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1196, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6242:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6234:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1198, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "report", - "nodeType": "MemberAccess", - "referencedDeclaration": 934, - "src": "6234:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1199, - "name": "report", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1149, - "src": "6263:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "6234:35:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 1201, - "nodeType": "ExpressionStatement", - "src": "6234:35:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1202, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6279:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1205, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1203, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6287:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6287:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6279:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1206, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 932, - "src": "6279:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 1207, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6308:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "6279:30:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 1209, - "nodeType": "ExpressionStatement", - "src": "6279:30:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1211, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6336:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1212, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6336:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1213, - "name": "signer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1147, - "src": "6348:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1210, - "name": "Registered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 993, - "src": "6325:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 1214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6325:30:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1215, - "nodeType": "EmitStatement", - "src": "6320:35:2" - } - ] - }, - "documentation": "Registers a new worker of change the signer parameters of an existing\nworker. This should be called by every worker (and the principal)\nnode in order to receive tasks.\n * @param signer The signer address, derived from the enclave public key\n@param report The RLP encoded report returned by the IAS", - "id": 1217, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "register", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1150, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1147, - "name": "signer", - "nodeType": "VariableDeclaration", - "scope": 1217, - "src": "5647:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1146, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5647:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1149, - "name": "report", - "nodeType": "VariableDeclaration", - "scope": 1217, - "src": "5663:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1148, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5663:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5646:30:2" - }, - "payable": false, - "returnParameters": { - "id": 1151, - "nodeType": "ParameterList", - "parameters": [], - "src": "5692:0:2" - }, - "scope": 2657, - "src": "5629:733:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1245, - "nodeType": "Block", - "src": "6464:301:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1227, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6639:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1229, - "indexExpression": { - "argumentTypes": null, - "id": 1228, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1219, - "src": "6647:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6639:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1230, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "6639:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1236, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1221, - "src": "6699:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1231, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6668:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1233, - "indexExpression": { - "argumentTypes": null, - "id": 1232, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1219, - "src": "6676:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6668:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1234, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "6668:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "6668:30:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6668:38:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6639:67:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1239, - "nodeType": "ExpressionStatement", - "src": "6639:67:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1241, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1219, - "src": "6740:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1242, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1221, - "src": "6751:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1240, - "name": "DepositSuccessful", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1076, - "src": "6722:17:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 1243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6722:36:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1244, - "nodeType": "EmitStatement", - "src": "6717:41:2" - } - ] - }, - "documentation": null, - "id": 1246, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1224, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1219, - "src": "6449:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1225, - "modifierName": { - "argumentTypes": null, - "id": 1223, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "6432:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "6432:27:2" - } - ], - "name": "deposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1222, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1219, - "name": "custodian", - "nodeType": "VariableDeclaration", - "scope": 1246, - "src": "6385:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1218, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6385:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1221, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1246, - "src": "6404:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1220, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6404:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6384:32:2" - }, - "payable": false, - "returnParameters": { - "id": 1226, - "nodeType": "ParameterList", - "parameters": [], - "src": "6464:0:2" - }, - "scope": 2657, - "src": "6368:397:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1305, - "nodeType": "Block", - "src": "7078:428:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - }, - "id": 1268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1262, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7096:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1264, - "indexExpression": { - "argumentTypes": null, - "id": 1263, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7106:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7096:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1265, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 957, - "src": "7096:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1266, - "name": "SecretContractStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "7124:20:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_SecretContractStatus_$961_$", - "typeString": "type(enum Enigma.SecretContractStatus)" - } - }, - "id": 1267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Undefined", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7124:30:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "src": "7096:58:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "53656372657420636f6e747261637420616c7265616479206465706c6f7965642e", - "id": 1269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7156:35:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2e032a85504939142c24900a8270f54bd3f5061914a7a38008c3f763afaca760", - "typeString": "literal_string \"Secret contract already deployed.\"" - }, - "value": "Secret contract already deployed." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2e032a85504939142c24900a8270f54bd3f5061914a7a38008c3f763afaca760", - "typeString": "literal_string \"Secret contract already deployed.\"" - } - ], - "id": 1261, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "7088:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7088:104:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1271, - "nodeType": "ExpressionStatement", - "src": "7088:104:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1272, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7265:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1274, - "indexExpression": { - "argumentTypes": null, - "id": 1273, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7275:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7265:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1275, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "owner", - "nodeType": "MemberAccess", - "referencedDeclaration": 950, - "src": "7265:23:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1276, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1252, - "src": "7291:5:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7265:31:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1278, - "nodeType": "ExpressionStatement", - "src": "7265:31:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1279, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7306:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1281, - "indexExpression": { - "argumentTypes": null, - "id": 1280, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7316:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7306:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1282, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "codeHash", - "nodeType": "MemberAccess", - "referencedDeclaration": 952, - "src": "7306:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1283, - "name": "codeHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1250, - "src": "7335:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "7306:37:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1285, - "nodeType": "ExpressionStatement", - "src": "7306:37:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1292, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1286, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7353:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1288, - "indexExpression": { - "argumentTypes": null, - "id": 1287, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7363:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7353:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1289, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 957, - "src": "7353:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1290, - "name": "SecretContractStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "7380:20:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_SecretContractStatus_$961_$", - "typeString": "type(enum Enigma.SecretContractStatus)" - } - }, - "id": 1291, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Deployed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7380:29:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "src": "7353:56:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "id": 1293, - "nodeType": "ExpressionStatement", - "src": "7353:56:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1297, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7436:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1294, - "name": "scAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "7419:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7419:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) returns (uint256)" - } - }, - "id": 1298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7419:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1299, - "nodeType": "ExpressionStatement", - "src": "7419:24:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1301, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7482:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1302, - "name": "codeHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1250, - "src": "7490:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1300, - "name": "SecretContractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1082, - "src": "7459:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$returns$__$", - "typeString": "function (address,bytes32)" - } - }, - "id": 1303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7459:40:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1304, - "nodeType": "EmitStatement", - "src": "7454:45:2" - } - ] - }, - "documentation": null, - "id": 1306, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1257, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "7062:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7062:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1259, - "modifierName": { - "argumentTypes": null, - "id": 1256, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "7045:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "7045:28:2" - } - ], - "name": "deploySecretContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1255, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1248, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "6970:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1247, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6970:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1250, - "name": "codeHash", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "6986:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1249, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6986:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1252, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "7004:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1251, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7004:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1254, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "7019:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1253, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "7019:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6969:60:2" - }, - "payable": false, - "returnParameters": { - "id": 1260, - "nodeType": "ParameterList", - "parameters": [], - "src": "7078:0:2" - }, - "scope": 2657, - "src": "6940:566:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1327, - "nodeType": "Block", - "src": "7591:153:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - }, - "id": 1319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1313, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7604:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1315, - "indexExpression": { - "argumentTypes": null, - "id": 1314, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "7614:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7604:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1316, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 957, - "src": "7604:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1317, - "name": "SecretContractStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "7632:20:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_SecretContractStatus_$961_$", - "typeString": "type(enum Enigma.SecretContractStatus)" - } - }, - "id": 1318, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Deployed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7632:29:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "src": "7604:57:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1325, - "nodeType": "Block", - "src": "7703:35:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 1323, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7723:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 1312, - "id": 1324, - "nodeType": "Return", - "src": "7716:12:2" - } - ] - }, - "id": 1326, - "nodeType": "IfStatement", - "src": "7600:138:2", - "trueBody": { - "id": 1322, - "nodeType": "Block", - "src": "7663:34:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1320, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7683:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1312, - "id": 1321, - "nodeType": "Return", - "src": "7676:11:2" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1328, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isDeployed", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1308, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1328, - "src": "7532:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1307, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7532:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7531:16:2" - }, - "payable": false, - "returnParameters": { - "id": 1312, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1311, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1328, - "src": "7581:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1310, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7581:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7580:6:2" - }, - "scope": 2657, - "src": "7512:232:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1343, - "nodeType": "Block", - "src": "7862:49:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1338, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7878:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1340, - "indexExpression": { - "argumentTypes": null, - "id": 1339, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1330, - "src": "7888:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7878:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1341, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "codeHash", - "nodeType": "MemberAccess", - "referencedDeclaration": 952, - "src": "7878:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 1337, - "id": 1342, - "nodeType": "Return", - "src": "7871:33:2" - } - ] - }, - "documentation": null, - "id": 1344, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1333, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1330, - "src": "7828:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1334, - "modifierName": { - "argumentTypes": null, - "id": 1332, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "7811:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "7811:24:2" - } - ], - "name": "getCodeHash", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1331, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1330, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1344, - "src": "7771:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1329, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7771:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7770:16:2" - }, - "payable": false, - "returnParameters": { - "id": 1337, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1336, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1344, - "src": "7849:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1335, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7849:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7848:9:2" - }, - "scope": 2657, - "src": "7750:161:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1352, - "nodeType": "Block", - "src": "7992:42:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1349, - "name": "scAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "8009:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1350, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8009:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1348, - "id": 1351, - "nodeType": "Return", - "src": "8002:25:2" - } - ] - }, - "documentation": null, - "id": 1353, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "countSecretContracts", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1345, - "nodeType": "ParameterList", - "parameters": [], - "src": "7946:2:2" - }, - "payable": false, - "returnParameters": { - "id": 1348, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1347, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1353, - "src": "7982:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1346, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7982:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7981:6:2" - }, - "scope": 2657, - "src": "7917:117:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1412, - "nodeType": "Block", - "src": "8238:298:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1363, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1357, - "src": "8252:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1364, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8260:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8252:9:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1372, - "nodeType": "IfStatement", - "src": "8248:65:2", - "trueBody": { - "id": 1371, - "nodeType": "Block", - "src": "8263:50:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1366, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1357, - "src": "8277:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1367, - "name": "scAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "8284:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1368, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8284:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8277:25:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1370, - "nodeType": "ExpressionStatement", - "src": "8277:25:2" - } - ] - } - }, - { - "assignments": [ - 1376 - ], - "declarations": [ - { - "constant": false, - "id": 1376, - "name": "addresses", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8322:26:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1374, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8322:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1375, - "length": null, - "nodeType": "ArrayTypeName", - "src": "8322:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1385, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1382, - "name": "start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1355, - "src": "8374:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1380, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1357, - "src": "8365:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "8365:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8365:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1379, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "8351:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 1377, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8355:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1378, - "length": null, - "nodeType": "ArrayTypeName", - "src": "8355:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 1384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8351:30:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8322:59:2" - }, - { - "assignments": [ - 1387 - ], - "declarations": [ - { - "constant": false, - "id": 1387, - "name": "pos", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8391:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1386, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8391:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1389, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8402:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "8391:12:2" - }, - { - "body": { - "id": 1408, - "nodeType": "Block", - "src": "8449:55:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1406, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1400, - "name": "addresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1376, - "src": "8462:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 1402, - "indexExpression": { - "argumentTypes": null, - "id": 1401, - "name": "pos", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1387, - "src": "8472:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8462:14:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1403, - "name": "scAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "8479:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1405, - "indexExpression": { - "argumentTypes": null, - "id": 1404, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1391, - "src": "8491:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8479:14:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8462:31:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1407, - "nodeType": "ExpressionStatement", - "src": "8462:31:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1394, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1391, - "src": "8434:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1395, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1357, - "src": "8438:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8434:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1409, - "initializationExpression": { - "assignments": [ - 1391 - ], - "declarations": [ - { - "constant": false, - "id": 1391, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8418:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1390, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8418:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1393, - "initialValue": { - "argumentTypes": null, - "id": 1392, - "name": "start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1355, - "src": "8427:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8418:14:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "8444:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1397, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1391, - "src": "8444:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1399, - "nodeType": "ExpressionStatement", - "src": "8444:3:2" - }, - "nodeType": "ForStatement", - "src": "8413:91:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1410, - "name": "addresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1376, - "src": "8520:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 1362, - "id": 1411, - "nodeType": "Return", - "src": "8513:16:2" - } - ] - }, - "documentation": "Selects address from start up to, but not including, the stop number*", - "id": 1413, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getSecretContractAddresses", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1358, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1355, - "name": "start", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8167:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1354, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8167:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1357, - "name": "stop", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8179:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1356, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8179:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8166:23:2" - }, - "payable": false, - "returnParameters": { - "id": 1362, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1361, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8223:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1359, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8223:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1360, - "length": null, - "nodeType": "ArrayTypeName", - "src": "8223:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8222:11:2" - }, - "scope": 2657, - "src": "8131:405:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1429, - "nodeType": "Block", - "src": "8656:65:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1423, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "8673:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1425, - "indexExpression": { - "argumentTypes": null, - "id": 1424, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1415, - "src": "8683:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8673:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1426, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "8673:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1427, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8673:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1422, - "id": 1428, - "nodeType": "Return", - "src": "8666:48:2" - } - ] - }, - "documentation": null, - "id": 1430, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1418, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1415, - "src": "8625:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1419, - "modifierName": { - "argumentTypes": null, - "id": 1417, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "8608:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "8608:24:2" - } - ], - "name": "countStateDeltas", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1416, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1415, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1430, - "src": "8568:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1414, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8568:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8567:16:2" - }, - "payable": false, - "returnParameters": { - "id": 1422, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1421, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1430, - "src": "8646:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1420, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8646:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8645:6:2" - }, - "scope": 2657, - "src": "8542:179:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1449, - "nodeType": "Block", - "src": "8857:65:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1442, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "8874:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1444, - "indexExpression": { - "argumentTypes": null, - "id": 1443, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1432, - "src": "8884:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8874:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1445, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "8874:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1447, - "indexExpression": { - "argumentTypes": null, - "id": 1446, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1434, - "src": "8909:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8874:41:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 1441, - "id": 1448, - "nodeType": "Return", - "src": "8867:48:2" - } - ] - }, - "documentation": null, - "id": 1450, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1437, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1432, - "src": "8823:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1438, - "modifierName": { - "argumentTypes": null, - "id": 1436, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "8806:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "8806:24:2" - } - ], - "name": "getStateDeltaHash", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1432, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1450, - "src": "8754:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1431, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8754:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1434, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 1450, - "src": "8770:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1433, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8770:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8753:28:2" - }, - "payable": false, - "returnParameters": { - "id": 1441, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1440, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1450, - "src": "8844:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1439, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8844:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8843:9:2" - }, - "scope": 2657, - "src": "8727:195:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1520, - "nodeType": "Block", - "src": "9169:336:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1465, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "9183:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1466, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9191:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "9183:9:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1477, - "nodeType": "IfStatement", - "src": "9179:88:2", - "trueBody": { - "id": 1476, - "nodeType": "Block", - "src": "9194:73:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1468, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "9208:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1469, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "9215:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1471, - "indexExpression": { - "argumentTypes": null, - "id": 1470, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1452, - "src": "9225:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9215:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1472, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "9215:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1473, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9215:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9208:48:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1475, - "nodeType": "ExpressionStatement", - "src": "9208:48:2" - } - ] - } - }, - { - "assignments": [ - 1481 - ], - "declarations": [ - { - "constant": false, - "id": 1481, - "name": "deltas", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9276:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1479, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9276:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1480, - "length": null, - "nodeType": "ArrayTypeName", - "src": "9276:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1490, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1487, - "name": "start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1454, - "src": "9325:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1485, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "9316:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "9316:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9316:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "9302:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bytes32_$dyn_memory_$", - "typeString": "function (uint256) pure returns (bytes32[] memory)" - }, - "typeName": { - "baseType": { - "id": 1482, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9306:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1483, - "length": null, - "nodeType": "ArrayTypeName", - "src": "9306:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - } - }, - "id": 1489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9302:30:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory", - "typeString": "bytes32[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9276:56:2" - }, - { - "assignments": [ - 1492 - ], - "declarations": [ - { - "constant": false, - "id": 1492, - "name": "pos", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9342:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1491, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9342:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1494, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1493, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9353:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "9342:12:2" - }, - { - "body": { - "id": 1516, - "nodeType": "Block", - "src": "9400:76:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1514, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1505, - "name": "deltas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1481, - "src": "9414:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1507, - "indexExpression": { - "argumentTypes": null, - "id": 1506, - "name": "pos", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1492, - "src": "9421:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9414:11:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1508, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "9428:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1510, - "indexExpression": { - "argumentTypes": null, - "id": 1509, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1452, - "src": "9438:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9428:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1511, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "9428:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1513, - "indexExpression": { - "argumentTypes": null, - "id": 1512, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1496, - "src": "9463:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9428:37:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "9414:51:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1515, - "nodeType": "ExpressionStatement", - "src": "9414:51:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1499, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1496, - "src": "9385:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1500, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "9389:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9385:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1517, - "initializationExpression": { - "assignments": [ - 1496 - ], - "declarations": [ - { - "constant": false, - "id": 1496, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9369:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1495, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9369:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1498, - "initialValue": { - "argumentTypes": null, - "id": 1497, - "name": "start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1454, - "src": "9378:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9369:14:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "9395:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1502, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1496, - "src": "9395:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1504, - "nodeType": "ExpressionStatement", - "src": "9395:3:2" - }, - "nodeType": "ForStatement", - "src": "9364:112:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1518, - "name": "deltas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1481, - "src": "9492:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "functionReturnParameters": 1464, - "id": 1519, - "nodeType": "Return", - "src": "9485:13:2" - } - ] - }, - "documentation": "Selects state deltas from start up to, but not including, the stop number*", - "id": 1521, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1459, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1452, - "src": "9133:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1460, - "modifierName": { - "argumentTypes": null, - "id": 1458, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "9116:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "9116:24:2" - } - ], - "name": "getStateDeltaHashes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1457, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1452, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9053:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1451, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9053:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1454, - "name": "start", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9069:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1453, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9069:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1456, - "name": "stop", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9081:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1455, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9081:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9052:39:2" - }, - "payable": false, - "returnParameters": { - "id": 1464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1463, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9154:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1461, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9154:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1462, - "length": null, - "nodeType": "ArrayTypeName", - "src": "9154:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9153:11:2" - }, - "scope": 2657, - "src": "9024:481:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1570, - "nodeType": "Block", - "src": "9649:284:2", - "statements": [ - { - "assignments": [ - 1534 - ], - "declarations": [ - { - "constant": false, - "id": 1534, - "name": "valid", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9659:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1533, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9659:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1536, - "initialValue": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 1535, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9672:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "nodeType": "VariableDeclarationStatement", - "src": "9659:18:2" - }, - { - "body": { - "id": 1566, - "nodeType": "Block", - "src": "9756:149:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1551, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "9773:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1553, - "indexExpression": { - "argumentTypes": null, - "id": 1552, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1523, - "src": "9783:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9773:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1554, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "9773:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1556, - "indexExpression": { - "argumentTypes": null, - "id": 1555, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1538, - "src": "9808:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9773:37:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1557, - "name": "stateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1525, - "src": "9814:14:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "9773:55:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1565, - "nodeType": "IfStatement", - "src": "9769:126:2", - "trueBody": { - "id": 1564, - "nodeType": "Block", - "src": "9830:65:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1559, - "name": "valid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1534, - "src": "9847:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1560, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9855:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "9847:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1562, - "nodeType": "ExpressionStatement", - "src": "9847:12:2" - }, - { - "id": 1563, - "nodeType": "Break", - "src": "9876:5:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1541, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1538, - "src": "9704:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1542, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "9708:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1544, - "indexExpression": { - "argumentTypes": null, - "id": 1543, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1523, - "src": "9718:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9708:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1545, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "9708:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1546, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9708:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9704:45:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1567, - "initializationExpression": { - "assignments": [ - 1538 - ], - "declarations": [ - { - "constant": false, - "id": 1538, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9692:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1537, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9692:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1540, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1539, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9701:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "9692:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "9751:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1548, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1538, - "src": "9751:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1550, - "nodeType": "ExpressionStatement", - "src": "9751:3:2" - }, - "nodeType": "ForStatement", - "src": "9687:218:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1568, - "name": "valid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1534, - "src": "9921:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1532, - "id": 1569, - "nodeType": "Return", - "src": "9914:12:2" - } - ] - }, - "documentation": null, - "id": 1571, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1528, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1523, - "src": "9618:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1529, - "modifierName": { - "argumentTypes": null, - "id": 1527, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "9601:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "9601:24:2" - } - ], - "name": "isValidDeltaHash", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1526, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1523, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9537:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1522, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9537:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1525, - "name": "stateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9553:22:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1524, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9553:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9536:40:2" - }, - "payable": false, - "returnParameters": { - "id": 1532, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1531, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9639:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1530, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9639:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9638:6:2" - }, - "scope": 2657, - "src": "9511:422:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1638, - "nodeType": "Block", - "src": "10121:371:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1583, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10139:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1585, - "indexExpression": { - "argumentTypes": null, - "id": 1584, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10145:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10139:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1586, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 920, - "src": "10139:20:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1587, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10163:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "10139:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5461736b20616c72656164792065786973742e", - "id": 1589, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10168:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bc6ba0dbf698c73239ebe06639f1000e8b0940a7d6a986a655fda518ab50ea8f", - "typeString": "literal_string \"Task already exist.\"" - }, - "value": "Task already exist." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bc6ba0dbf698c73239ebe06639f1000e8b0940a7d6a986a655fda518ab50ea8f", - "typeString": "literal_string \"Task already exist.\"" - } - ], - "id": 1582, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "10131:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10131:59:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1591, - "nodeType": "ExpressionStatement", - "src": "10131:59:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1592, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10201:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1594, - "indexExpression": { - "argumentTypes": null, - "id": 1593, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10207:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10201:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1595, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "fee", - "nodeType": "MemberAccess", - "referencedDeclaration": 912, - "src": "10201:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1596, - "name": "fee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1575, - "src": "10221:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10201:23:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1598, - "nodeType": "ExpressionStatement", - "src": "10201:23:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1599, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10234:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1601, - "indexExpression": { - "argumentTypes": null, - "id": 1600, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10240:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10234:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1602, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "token", - "nodeType": "MemberAccess", - "referencedDeclaration": 914, - "src": "10234:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1603, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1577, - "src": "10256:5:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10234:27:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1605, - "nodeType": "ExpressionStatement", - "src": "10234:27:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1606, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10271:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1608, - "indexExpression": { - "argumentTypes": null, - "id": 1607, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10277:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10271:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1609, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "tokenValue", - "nodeType": "MemberAccess", - "referencedDeclaration": 916, - "src": "10271:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1610, - "name": "tokenValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1579, - "src": "10298:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10271:37:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1612, - "nodeType": "ExpressionStatement", - "src": "10271:37:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1613, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10318:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1615, - "indexExpression": { - "argumentTypes": null, - "id": 1614, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10324:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10318:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1616, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 920, - "src": "10318:20:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1617, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "10341:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10341:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10318:33:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1620, - "nodeType": "ExpressionStatement", - "src": "10318:33:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1621, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10361:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1623, - "indexExpression": { - "argumentTypes": null, - "id": 1622, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10367:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10361:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1624, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "10361:20:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1625, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "10384:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1626, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "RecordCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10384:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "10361:47:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "id": 1628, - "nodeType": "ExpressionStatement", - "src": "10361:47:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1630, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10442:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1631, - "name": "fee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1575, - "src": "10450:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1632, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1577, - "src": "10455:5:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1633, - "name": "tokenValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1579, - "src": "10462:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1634, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "10474:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1635, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10474:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1629, - "name": "TaskRecordCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "10424:17:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$_t_address_$returns$__$", - "typeString": "function (bytes32,uint256,address,uint256,address)" - } - }, - "id": 1636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10424:61:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1637, - "nodeType": "EmitStatement", - "src": "10419:66:2" - } - ] - }, - "documentation": "Store task record\n ", - "id": 1639, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "createTaskRecord", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1580, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1573, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1639, - "src": "10019:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1572, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10019:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1575, - "name": "fee", - "nodeType": "VariableDeclaration", - "scope": 1639, - "src": "10043:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1574, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10043:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1577, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 1639, - "src": "10061:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1576, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10061:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1579, - "name": "tokenValue", - "nodeType": "VariableDeclaration", - "scope": 1639, - "src": "10084:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1578, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10084:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10009:96:2" - }, - "payable": false, - "returnParameters": { - "id": 1581, - "nodeType": "ParameterList", - "parameters": [], - "src": "10121:0:2" - }, - "scope": 2657, - "src": "9984:508:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1741, - "nodeType": "Block", - "src": "10648:497:2", - "statements": [ - { - "body": { - "id": 1730, - "nodeType": "Block", - "src": "10700:358:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1666, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10722:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1670, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1667, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10728:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1669, - "indexExpression": { - "argumentTypes": null, - "id": 1668, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10736:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10728:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10722:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1671, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 920, - "src": "10722:24:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1672, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10750:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "10722:31:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5461736b20616c72656164792065786973742e", - "id": 1674, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10755:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bc6ba0dbf698c73239ebe06639f1000e8b0940a7d6a986a655fda518ab50ea8f", - "typeString": "literal_string \"Task already exist.\"" - }, - "value": "Task already exist." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bc6ba0dbf698c73239ebe06639f1000e8b0940a7d6a986a655fda518ab50ea8f", - "typeString": "literal_string \"Task already exist.\"" - } - ], - "id": 1665, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "10714:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10714:63:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1676, - "nodeType": "ExpressionStatement", - "src": "10714:63:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1677, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10792:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1681, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1678, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10798:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1680, - "indexExpression": { - "argumentTypes": null, - "id": 1679, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10806:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10798:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10792:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1682, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "fee", - "nodeType": "MemberAccess", - "referencedDeclaration": 912, - "src": "10792:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1683, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1645, - "src": "10816:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1685, - "indexExpression": { - "argumentTypes": null, - "id": 1684, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10821:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10816:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10792:31:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1687, - "nodeType": "ExpressionStatement", - "src": "10792:31:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1688, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10837:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1692, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1689, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10843:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1691, - "indexExpression": { - "argumentTypes": null, - "id": 1690, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10851:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10843:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10837:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1693, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "token", - "nodeType": "MemberAccess", - "referencedDeclaration": 914, - "src": "10837:23:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1694, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1648, - "src": "10863:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 1696, - "indexExpression": { - "argumentTypes": null, - "id": 1695, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10870:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10863:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10837:35:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1698, - "nodeType": "ExpressionStatement", - "src": "10837:35:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1699, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10886:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1703, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1700, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10892:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1702, - "indexExpression": { - "argumentTypes": null, - "id": 1701, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10900:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10892:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10886:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1704, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "tokenValue", - "nodeType": "MemberAccess", - "referencedDeclaration": 916, - "src": "10886:28:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1705, - "name": "tokenValues", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1651, - "src": "10917:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1707, - "indexExpression": { - "argumentTypes": null, - "id": 1706, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10929:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10917:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10886:45:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1709, - "nodeType": "ExpressionStatement", - "src": "10886:45:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1710, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10945:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1714, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1711, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10951:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1713, - "indexExpression": { - "argumentTypes": null, - "id": 1712, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10959:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10951:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10945:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1715, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 920, - "src": "10945:24:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1716, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "10972:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10972:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10945:37:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1719, - "nodeType": "ExpressionStatement", - "src": "10945:37:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1728, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1720, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10996:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1724, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1721, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "11002:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1723, - "indexExpression": { - "argumentTypes": null, - "id": 1722, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "11010:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11002:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10996:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1725, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "10996:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1726, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "11023:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1727, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "RecordCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11023:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "10996:51:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "id": 1729, - "nodeType": "ExpressionStatement", - "src": "10996:51:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1658, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10675:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1659, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10679:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10679:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10675:18:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1731, - "initializationExpression": { - "assignments": [ - 1655 - ], - "declarations": [ - { - "constant": false, - "id": 1655, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10663:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1654, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10663:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1657, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1656, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10672:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10663:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10695:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1662, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10695:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1664, - "nodeType": "ExpressionStatement", - "src": "10695:3:2" - }, - "nodeType": "ForStatement", - "src": "10658:400:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1733, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "11091:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - { - "argumentTypes": null, - "id": 1734, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1645, - "src": "11100:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1735, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1648, - "src": "11106:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 1736, - "name": "tokenValues", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1651, - "src": "11114:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1737, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "11127:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11127:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1732, - "name": "TaskRecordsCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1041, - "src": "11072:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (bytes32[] memory,uint256[] memory,address[] memory,uint256[] memory,address)" - } - }, - "id": 1739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11072:66:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1740, - "nodeType": "EmitStatement", - "src": "11067:71:2" - } - ] - }, - "documentation": null, - "id": 1742, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "createTaskRecords", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1652, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1642, - "name": "taskIds", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10534:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1640, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10534:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1641, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10534:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1645, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10561:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1643, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10561:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1644, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10561:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1648, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10582:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1646, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10582:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1647, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10582:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1651, - "name": "tokenValues", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10608:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1649, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10608:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1650, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10608:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10524:108:2" - }, - "payable": false, - "returnParameters": { - "id": 1653, - "nodeType": "ParameterList", - "parameters": [], - "src": "10648:0:2" - }, - "scope": 2657, - "src": "10498:647:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1754, - "nodeType": "Block", - "src": "11317:116:2", - "statements": [ - { - "externalReferences": [ - { - "data": { - "declaration": 1748, - "isOffset": false, - "isSlot": false, - "src": "11405:4:2", - "valueSize": 1 - } - }, - { - "data": { - "declaration": 1748, - "isOffset": false, - "isSlot": false, - "src": "11386:4:2", - "valueSize": 1 - } - }, - { - "success": { - "declaration": 1751, - "isOffset": false, - "isSlot": false, - "src": "11350:7:2", - "valueSize": 1 - } - }, - { - "to": { - "declaration": 1744, - "isOffset": false, - "isSlot": false, - "src": "11371:2:2", - "valueSize": 1 - } - }, - { - "value": { - "declaration": 1746, - "isOffset": false, - "isSlot": false, - "src": "11375:5:2", - "valueSize": 1 - } - } - ], - "id": 1753, - "nodeType": "InlineAssembly", - "operations": "{\n success := call(gas(), to, value, add(data, 0x20), mload(data), 0, 0)\n}", - "src": "11327:106:2" - } - ] - }, - "documentation": null, - "id": 1755, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "executeCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1749, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1744, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1755, - "src": "11234:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1743, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11234:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1746, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1755, - "src": "11246:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1745, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11246:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1748, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 1755, - "src": "11261:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1747, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11261:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11233:39:2" - }, - "payable": false, - "returnParameters": { - "id": 1752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1751, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1755, - "src": "11299:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1750, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11299:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11298:14:2" - }, - "scope": 2657, - "src": "11213:220:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1852, - "nodeType": "Block", - "src": "11644:932:2", - "statements": [ - { - "assignments": [ - 1771 - ], - "declarations": [ - { - "constant": false, - "id": 1771, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11654:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1770, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11654:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1777, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1772, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "11667:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1774, - "indexExpression": { - "argumentTypes": null, - "id": 1773, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1757, - "src": "11677:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11667:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1775, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "11667:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1776, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11667:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11654:54:2" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1780, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1778, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1771, - "src": "11722:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1779, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11731:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11722:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1804, - "nodeType": "Block", - "src": "11847:136:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1800, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1790, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1761, - "src": "11869:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1791, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "11889:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1793, - "indexExpression": { - "argumentTypes": null, - "id": 1792, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1757, - "src": "11899:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11889:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1794, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "11889:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1799, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 1797, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11934:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 1795, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1771, - "src": "11924:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1796, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "11924:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1798, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11924:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11889:48:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "11869:68:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c696420696e7075742073746174652064656c74612068617368", - "id": 1801, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11939:32:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3793359aced2caaea2b4a5e03abde718cd02badbe9ea3aab94582eebe44d2119", - "typeString": "literal_string \"Invalid input state delta hash\"" - }, - "value": "Invalid input state delta hash" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3793359aced2caaea2b4a5e03abde718cd02badbe9ea3aab94582eebe44d2119", - "typeString": "literal_string \"Invalid input state delta hash\"" - } - ], - "id": 1789, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "11861:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11861:111:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1803, - "nodeType": "ExpressionStatement", - "src": "11861:111:2" - } - ] - }, - "id": 1805, - "nodeType": "IfStatement", - "src": "11718:265:2", - "trueBody": { - "id": 1788, - "nodeType": "Block", - "src": "11734:107:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1784, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1782, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1761, - "src": "11756:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1783, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11776:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "11756:23:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c696420696e7075742073746174652064656c7461206861736820666f7220656d707479207374617465", - "id": 1785, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11781:48:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_836559a8e1e2ae055c4a308ad98bbb75d85f29059de7757b18c71085d2cd2872", - "typeString": "literal_string \"Invalid input state delta hash for empty state\"" - }, - "value": "Invalid input state delta hash for empty state" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_836559a8e1e2ae055c4a308ad98bbb75d85f29059de7757b18c71085d2cd2872", - "typeString": "literal_string \"Invalid input state delta hash for empty state\"" - } - ], - "id": 1781, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "11748:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1786, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11748:82:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1787, - "nodeType": "ExpressionStatement", - "src": "11748:82:2" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 1811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "11992:43:2", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1806, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "11992:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1808, - "indexExpression": { - "argumentTypes": null, - "id": 1807, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1757, - "src": "12002:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11992:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1809, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "11992:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1810, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11992:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1812, - "nodeType": "ExpressionStatement", - "src": "11992:43:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1813, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "12045:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1815, - "indexExpression": { - "argumentTypes": null, - "id": 1814, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1757, - "src": "12055:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12045:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1816, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "12045:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1818, - "indexExpression": { - "argumentTypes": null, - "id": 1817, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1771, - "src": "12080:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "12045:41:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1819, - "name": "outStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1763, - "src": "12089:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "12045:61:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1821, - "nodeType": "ExpressionStatement", - "src": "12045:61:2" - }, - { - "assignments": [ - 1823 - ], - "declarations": [ - { - "constant": false, - "id": 1823, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "12225:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1822, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12225:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1833, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1827, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1759, - "src": "12267:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1828, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1761, - "src": "12275:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1829, - "name": "outStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1763, - "src": "12293:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1830, - "name": "ethCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1765, - "src": "12312:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 1825, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3435, - "src": "12250:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1826, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12250:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12250:70:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1824, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3442, - "src": "12240:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12240:81:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12225:96:2" - }, - { - "assignments": [ - 1835 - ], - "declarations": [ - { - "constant": false, - "id": 1835, - "name": "workerAddr", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "12450:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1834, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12450:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1840, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1838, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1767, - "src": "12484:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 1836, - "name": "hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1823, - "src": "12471:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "recover", - "nodeType": "MemberAccess", - "referencedDeclaration": 2904, - "src": "12471:12:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_address_$bound_to$_t_bytes32_$", - "typeString": "function (bytes32,bytes memory) pure returns (address)" - } - }, - "id": 1839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12471:17:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12450:38:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1842, - "name": "workerAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1835, - "src": "12506:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1843, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "12520:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1846, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1844, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "12528:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12528:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12520:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1847, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "12520:26:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "12506:40:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c6964207369676e61747572652e", - "id": 1849, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12548:20:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_de618ca49ed109c14f243a6f72f71bc4082410d500e2fcf7ed6cc449e8b19481", - "typeString": "literal_string \"Invalid signature.\"" - }, - "value": "Invalid signature." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_de618ca49ed109c14f243a6f72f71bc4082410d500e2fcf7ed6cc449e8b19481", - "typeString": "literal_string \"Invalid signature.\"" - } - ], - "id": 1841, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "12498:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12498:71:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1851, - "nodeType": "ExpressionStatement", - "src": "12498:71:2" - } - ] - }, - "documentation": null, - "id": 1853, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "verifyReceipt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1757, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11471:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1756, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11471:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1759, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11495:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1758, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11495:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1761, - "name": "inStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11519:24:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1760, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11519:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1763, - "name": "outStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11553:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1762, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11553:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1765, - "name": "ethCall", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11588:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1764, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11588:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1767, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11611:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1766, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11611:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11461:165:2" - }, - "payable": false, - "returnParameters": { - "id": 1769, - "nodeType": "ParameterList", - "parameters": [], - "src": "11644:0:2" - }, - "scope": 2657, - "src": "11439:1137:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1918, - "nodeType": "Block", - "src": "12913:371:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - }, - "id": 1882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1876, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "12931:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1878, - "indexExpression": { - "argumentTypes": null, - "id": 1877, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "12937:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12931:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1879, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "12931:20:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1880, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "12955:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "RecordCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12955:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "12931:48:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c6964207461736b20737461747573", - "id": 1883, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12981:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_35c761622bcc8ab75f9adfaf21a4872a39cd06f2745d5488272d29f1f753f270", - "typeString": "literal_string \"Invalid task status\"" - }, - "value": "Invalid task status" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_35c761622bcc8ab75f9adfaf21a4872a39cd06f2745d5488272d29f1f753f270", - "typeString": "literal_string \"Invalid task status\"" - } - ], - "id": 1875, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "12923:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12923:80:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1885, - "nodeType": "ExpressionStatement", - "src": "12923:80:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1887, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1855, - "src": "13027:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1888, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "13035:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1889, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1859, - "src": "13043:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1890, - "name": "outStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1861, - "src": "13061:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1891, - "name": "ethCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1863, - "src": "13080:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 1892, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1865, - "src": "13089:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1886, - "name": "verifyReceipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1853, - "src": "13013:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,bytes32,bytes32,bytes32,bytes memory,bytes memory)" - } - }, - "id": 1893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13013:80:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1894, - "nodeType": "ExpressionStatement", - "src": "13013:80:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1895, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13104:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1897, - "indexExpression": { - "argumentTypes": null, - "id": 1896, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "13110:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13104:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1898, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "proof", - "nodeType": "MemberAccess", - "referencedDeclaration": 918, - "src": "13104:19:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1899, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1865, - "src": "13126:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "13104:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 1901, - "nodeType": "ExpressionStatement", - "src": "13104:25:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1908, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1902, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13139:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1904, - "indexExpression": { - "argumentTypes": null, - "id": 1903, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "13145:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13139:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1905, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "13139:20:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1906, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "13162:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1907, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "ReceiptVerified", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13162:26:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "13139:49:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "id": 1909, - "nodeType": "ExpressionStatement", - "src": "13139:49:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1911, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "13219:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1912, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1859, - "src": "13227:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1913, - "name": "outStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1861, - "src": "13245:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1914, - "name": "ethCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1863, - "src": "13264:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 1915, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1865, - "src": "13273:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1910, - "name": "ReceiptVerified", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1053, - "src": "13203:15:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (bytes32,bytes32,bytes32,bytes memory,bytes memory)" - } - }, - "id": 1916, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13203:74:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1917, - "nodeType": "EmitStatement", - "src": "13198:79:2" - } - ] - }, - "documentation": "Commit the computation task results on chain", - "id": 1919, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1868, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "12868:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12868:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1870, - "modifierName": { - "argumentTypes": null, - "id": 1867, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "12851:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "12851:28:2" - }, - { - "arguments": [ - { - "argumentTypes": null, - "id": 1872, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1855, - "src": "12901:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1873, - "modifierName": { - "argumentTypes": null, - "id": 1871, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "12884:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "12884:24:2" - } - ], - "name": "commitReceipt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1866, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1855, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12680:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1854, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12680:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1857, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12704:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1856, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12704:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1859, - "name": "inStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12728:24:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1858, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12728:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1861, - "name": "outStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12762:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1860, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12762:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1863, - "name": "ethCall", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12797:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1862, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12797:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1865, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12820:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1864, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12820:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12670:165:2" - }, - "payable": false, - "returnParameters": { - "id": 1874, - "nodeType": "ParameterList", - "parameters": [], - "src": "12913:0:2" - }, - "scope": 2657, - "src": "12648:636:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2020, - "nodeType": "Block", - "src": "13573:545:2", - "statements": [ - { - "body": { - "id": 2010, - "nodeType": "Block", - "src": "13625:390:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - }, - "id": 1966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1958, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13697:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1962, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1959, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13703:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1961, - "indexExpression": { - "argumentTypes": null, - "id": 1960, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13711:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13703:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13697:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1963, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "13697:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1964, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "13725:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "RecordCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13725:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "13697:52:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c6964207461736b20737461747573", - "id": 1967, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13751:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_35c761622bcc8ab75f9adfaf21a4872a39cd06f2745d5488272d29f1f753f270", - "typeString": "literal_string \"Invalid task status\"" - }, - "value": "Invalid task status" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_35c761622bcc8ab75f9adfaf21a4872a39cd06f2745d5488272d29f1f753f270", - "typeString": "literal_string \"Invalid task status\"" - } - ], - "id": 1957, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "13689:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13689:84:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1969, - "nodeType": "ExpressionStatement", - "src": "13689:84:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1971, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1921, - "src": "13801:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1972, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13809:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1974, - "indexExpression": { - "argumentTypes": null, - "id": 1973, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13817:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13809:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1975, - "name": "inStateDeltaHashes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1927, - "src": "13821:18:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1977, - "indexExpression": { - "argumentTypes": null, - "id": 1976, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13840:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13821:21:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1978, - "name": "outStateDeltaHashes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1930, - "src": "13844:19:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1980, - "indexExpression": { - "argumentTypes": null, - "id": 1979, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13864:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13844:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1981, - "name": "ethCalls", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1933, - "src": "13868:8:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 1983, - "indexExpression": { - "argumentTypes": null, - "id": 1982, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13877:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13868:11:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1984, - "name": "sigs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1936, - "src": "13881:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 1986, - "indexExpression": { - "argumentTypes": null, - "id": 1985, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13886:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13881:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - ], - "id": 1970, - "name": "verifyReceipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1853, - "src": "13787:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,bytes32,bytes32,bytes32,bytes memory,bytes memory)" - } - }, - "id": 1987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13787:102:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1988, - "nodeType": "ExpressionStatement", - "src": "13787:102:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1989, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13904:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1993, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1990, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13910:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1992, - "indexExpression": { - "argumentTypes": null, - "id": 1991, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13918:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13910:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13904:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1994, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "proof", - "nodeType": "MemberAccess", - "referencedDeclaration": 918, - "src": "13904:23:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1995, - "name": "sigs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1936, - "src": "13930:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 1997, - "indexExpression": { - "argumentTypes": null, - "id": 1996, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13935:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13930:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - }, - "src": "13904:33:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 1999, - "nodeType": "ExpressionStatement", - "src": "13904:33:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2008, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2000, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13951:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 2004, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2001, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13957:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 2003, - "indexExpression": { - "argumentTypes": null, - "id": 2002, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13965:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13957:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13951:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 2005, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "13951:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2006, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "13978:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 2007, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "ReceiptVerified", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13978:26:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "13951:53:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "id": 2009, - "nodeType": "ExpressionStatement", - "src": "13951:53:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1950, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13600:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1951, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13604:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13604:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13600:18:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2011, - "initializationExpression": { - "assignments": [ - 1947 - ], - "declarations": [ - { - "constant": false, - "id": 1947, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13588:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1946, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "13588:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1949, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1948, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13597:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "13588:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "13620:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1954, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13620:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1956, - "nodeType": "ExpressionStatement", - "src": "13620:3:2" - }, - "nodeType": "ForStatement", - "src": "13583:432:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2013, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "14046:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - { - "argumentTypes": null, - "id": 2014, - "name": "inStateDeltaHashes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1927, - "src": "14055:18:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - { - "argumentTypes": null, - "id": 2015, - "name": "outStateDeltaHashes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1930, - "src": "14075:19:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - { - "argumentTypes": null, - "id": 2016, - "name": "ethCalls", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1933, - "src": "14096:8:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 2017, - "name": "sigs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1936, - "src": "14106:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - ], - "id": 2012, - "name": "ReceiptsVerified", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1070, - "src": "14029:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_bytes_memory_$dyn_memory_ptr_$_t_array$_t_bytes_memory_$dyn_memory_ptr_$returns$__$", - "typeString": "function (bytes32[] memory,bytes32[] memory,bytes32[] memory,bytes memory[] memory,bytes memory[] memory)" - } - }, - "id": 2018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14029:82:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2019, - "nodeType": "EmitStatement", - "src": "14024:87:2" - } - ] - }, - "documentation": null, - "id": 2021, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1939, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "13528:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13528:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1941, - "modifierName": { - "argumentTypes": null, - "id": 1938, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "13511:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "13511:28:2" - }, - { - "arguments": [ - { - "argumentTypes": null, - "id": 1943, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1921, - "src": "13561:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1944, - "modifierName": { - "argumentTypes": null, - "id": 1942, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "13544:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "13544:24:2" - } - ], - "name": "commitReceipts", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1937, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1921, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13323:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1920, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13323:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1924, - "name": "taskIds", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13347:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1922, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13347:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1923, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13347:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1927, - "name": "inStateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13374:28:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1925, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13374:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1926, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13374:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1930, - "name": "outStateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13412:29:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1928, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13412:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1929, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13412:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1933, - "name": "ethCalls", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13451:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 1931, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13451:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 1932, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13451:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1936, - "name": "sigs", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13477:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 1934, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13477:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 1935, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13477:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13313:182:2" - }, - "payable": false, - "returnParameters": { - "id": 1945, - "nodeType": "ParameterList", - "parameters": [], - "src": "13573:0:2" - }, - "scope": 2657, - "src": "13290:828:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2048, - "nodeType": "Block", - "src": "14291:132:2", - "statements": [ - { - "assignments": [ - 2031 - ], - "declarations": [ - { - "constant": false, - "id": 2031, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14301:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2030, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "14301:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2038, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2035, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2023, - "src": "14343:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2033, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3435, - "src": "14326:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2034, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14326:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14326:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2032, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3442, - "src": "14316:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14316:33:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14301:48:2" - }, - { - "assignments": [ - 2040 - ], - "declarations": [ - { - "constant": false, - "id": 2040, - "name": "signer", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14359:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2039, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14359:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2045, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2043, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2025, - "src": "14389:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2041, - "name": "hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2031, - "src": "14376:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 2042, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "recover", - "nodeType": "MemberAccess", - "referencedDeclaration": 2904, - "src": "14376:12:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_address_$bound_to$_t_bytes32_$", - "typeString": "function (bytes32,bytes memory) pure returns (address)" - } - }, - "id": 2044, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14376:17:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14359:34:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2046, - "name": "signer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2040, - "src": "14410:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2029, - "id": 2047, - "nodeType": "Return", - "src": "14403:13:2" - } - ] - }, - "documentation": null, - "id": 2049, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "verifyParamsSig", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2026, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2023, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14218:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2022, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14218:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2025, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14232:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2024, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "14232:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14217:25:2" - }, - "payable": false, - "returnParameters": { - "id": 2029, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2028, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14278:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2027, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14278:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14277:9:2" - }, - "scope": 2657, - "src": "14193:230:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2218, - "nodeType": "Block", - "src": "14799:1905:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2067, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2061, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "15016:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2064, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2062, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "15024:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15024:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15016:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2065, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "15016:26:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2066, - "name": "principal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 928, - "src": "15046:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15016:39:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f6e6c7920746865205072696e636970616c2063616e20757064617465207468652073656564", - "id": 2068, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15057:40:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bc5bcb5ed31af9f048e73c2cbe5de0569fa9bcd43014614ad5223290fd42066d", - "typeString": "literal_string \"Only the Principal can update the seed\"" - }, - "value": "Only the Principal can update the seed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bc5bcb5ed31af9f048e73c2cbe5de0569fa9bcd43014614ad5223290fd42066d", - "typeString": "literal_string \"Only the Principal can update the seed\"" - } - ], - "id": 2060, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "15008:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15008:90:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2070, - "nodeType": "ExpressionStatement", - "src": "15008:90:2" - }, - { - "assignments": [ - 2072 - ], - "declarations": [ - { - "constant": false, - "id": 2072, - "name": "paramIndex", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "15419:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2071, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "15419:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2074, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2073, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15437:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15419:19:2" - }, - { - "body": { - "id": 2114, - "nodeType": "Block", - "src": "15499:363:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2086, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15601:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2088, - "indexExpression": { - "argumentTypes": null, - "id": 2087, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15615:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15601:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2089, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "15601:34:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2090, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15639:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "15601:39:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2098, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15723:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2100, - "indexExpression": { - "argumentTypes": null, - "id": 2099, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15737:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15723:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2101, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "15723:34:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2102, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15760:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2104, - "indexExpression": { - "argumentTypes": null, - "id": 2103, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15774:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15760:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2105, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "15760:42:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15723:79:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2112, - "nodeType": "IfStatement", - "src": "15719:133:2", - "trueBody": { - "id": 2111, - "nodeType": "Block", - "src": "15804:48:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2107, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15822:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2108, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15835:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15822:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2110, - "nodeType": "ExpressionStatement", - "src": "15822:15:2" - } - ] - } - }, - "id": 2113, - "nodeType": "IfStatement", - "src": "15597:255:2", - "trueBody": { - "id": 2097, - "nodeType": "Block", - "src": "15642:71:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2094, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2092, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15660:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2093, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15673:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15660:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2095, - "nodeType": "ExpressionStatement", - "src": "15660:15:2" - }, - { - "id": 2096, - "nodeType": "Break", - "src": "15693:5:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2079, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15466:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2080, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15471:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15471:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15466:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2115, - "initializationExpression": { - "assignments": [ - 2076 - ], - "declarations": [ - { - "constant": false, - "id": 2076, - "name": "pi", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "15453:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2075, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "15453:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2078, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2077, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15463:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15453:11:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "15493:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2083, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15493:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2085, - "nodeType": "ExpressionStatement", - "src": "15493:4:2" - }, - "nodeType": "ForStatement", - "src": "15448:414:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2116, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15871:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2118, - "indexExpression": { - "argumentTypes": null, - "id": 2117, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15885:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15871:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2119, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "15871:42:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2120, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3438, - "src": "15916:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15916:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15871:57:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2123, - "nodeType": "ExpressionStatement", - "src": "15871:57:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2124, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15938:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2126, - "indexExpression": { - "argumentTypes": null, - "id": 2125, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15952:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15938:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2127, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "seed", - "nodeType": "MemberAccess", - "referencedDeclaration": 947, - "src": "15938:30:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2128, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2051, - "src": "15971:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15938:37:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2130, - "nodeType": "ExpressionStatement", - "src": "15938:37:2" - }, - { - "assignments": [ - 2132 - ], - "declarations": [ - { - "constant": false, - "id": 2132, - "name": "workerIndex", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "16026:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2131, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16026:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2134, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2133, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16045:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "16026:20:2" - }, - { - "body": { - "id": 2202, - "nodeType": "Block", - "src": "16109:463:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2146, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "16127:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2150, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2147, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "16135:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2149, - "indexExpression": { - "argumentTypes": null, - "id": 2148, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16151:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16135:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16127:28:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2151, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "16127:36:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 2152, - "name": "stakingThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 985, - "src": "16166:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16127:55:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2201, - "nodeType": "IfStatement", - "src": "16123:439:2", - "trueBody": { - "id": 2200, - "nodeType": "Block", - "src": "16184:378:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "16202:42:2", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2154, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16202:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2156, - "indexExpression": { - "argumentTypes": null, - "id": 2155, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16216:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16202:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2157, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "16202:33:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2158, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16202:40:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2160, - "nodeType": "ExpressionStatement", - "src": "16202:42:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2161, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16262:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2163, - "indexExpression": { - "argumentTypes": null, - "id": 2162, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16276:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16262:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2164, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "16262:33:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2166, - "indexExpression": { - "argumentTypes": null, - "id": 2165, - "name": "workerIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "16296:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "16262:46:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2167, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "16311:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2169, - "indexExpression": { - "argumentTypes": null, - "id": 2168, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16327:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16311:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "16262:68:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2171, - "nodeType": "ExpressionStatement", - "src": "16262:68:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "16349:43:2", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2172, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16349:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2174, - "indexExpression": { - "argumentTypes": null, - "id": 2173, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16363:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16349:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2175, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "16349:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 2176, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16349:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2178, - "nodeType": "ExpressionStatement", - "src": "16349:43:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2179, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16410:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2181, - "indexExpression": { - "argumentTypes": null, - "id": 2180, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16424:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16410:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2182, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "16410:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 2184, - "indexExpression": { - "argumentTypes": null, - "id": 2183, - "name": "workerIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "16445:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "16410:47:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2185, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "16460:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2189, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2186, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "16468:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2188, - "indexExpression": { - "argumentTypes": null, - "id": 2187, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16484:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16468:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16460:28:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2190, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "16460:36:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16410:86:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2192, - "nodeType": "ExpressionStatement", - "src": "16410:86:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2193, - "name": "workerIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "16515:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 2196, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16545:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 2194, - "name": "workerIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "16529:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "16529:15:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16529:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16515:32:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2199, - "nodeType": "ExpressionStatement", - "src": "16515:32:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2139, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16074:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2140, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "16079:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2141, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16079:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16074:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2203, - "initializationExpression": { - "assignments": [ - 2136 - ], - "declarations": [ - { - "constant": false, - "id": 2136, - "name": "wi", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "16061:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2135, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16061:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2138, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16071:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "16061:11:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2144, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "16103:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2143, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16103:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2145, - "nodeType": "ExpressionStatement", - "src": "16103:4:2" - }, - "nodeType": "ForStatement", - "src": "16056:516:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2205, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2051, - "src": "16607:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2206, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3438, - "src": "16613:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16613:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2208, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16627:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2210, - "indexExpression": { - "argumentTypes": null, - "id": 2209, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16641:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16627:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2211, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "16627:33:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2212, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16662:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2214, - "indexExpression": { - "argumentTypes": null, - "id": 2213, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16676:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16662:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2215, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "16662:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - ], - "id": 2204, - "name": "WorkersParameterized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1013, - "src": "16586:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address[] memory,uint256[] memory)" - } - }, - "id": 2216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16586:111:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2217, - "nodeType": "EmitStatement", - "src": "16581:116:2" - } - ] - }, - "documentation": "Reparameterizing workers with a new seed\nThis should be called for each epoch by the Principal node\n * @param seed The random integer generated by the enclave\n@param sig The random integer signed by the the principal node's enclave", - "id": 2219, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2056, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "14783:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2057, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14783:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 2058, - "modifierName": { - "argumentTypes": null, - "id": 2055, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "14766:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "14766:28:2" - } - ], - "name": "setWorkersParams", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2054, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2051, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "14729:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2050, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "14729:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2053, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "14740:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2052, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "14740:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14728:22:2" - }, - "payable": false, - "returnParameters": { - "id": 2059, - "nodeType": "ParameterList", - "parameters": [], - "src": "14799:0:2" - }, - "scope": 2657, - "src": "14703:2001:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2288, - "nodeType": "Block", - "src": "16803:493:2", - "statements": [ - { - "assignments": [ - 2227 - ], - "declarations": [ - { - "constant": false, - "id": 2227, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 2289, - "src": "16872:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": { - "id": 2226, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "16872:4:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2230, - "initialValue": { - "argumentTypes": null, - "id": 2229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "16885:3:2", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2228, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16887:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_-1_by_1", - "typeString": "int_const -1" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16872:16:2" - }, - { - "body": { - "id": 2274, - "nodeType": "Block", - "src": "16946:227:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 2265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2242, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16964:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2244, - "indexExpression": { - "argumentTypes": null, - "id": 2243, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "16978:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16964:16:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2245, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "16964:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 2246, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2221, - "src": "17001:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16964:48:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 2263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 2251, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2248, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17017:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2250, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "17026:3:2", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2249, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17028:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_-1_by_1", - "typeString": "int_const -1" - } - }, - "src": "17017:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2252, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "17033:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2254, - "indexExpression": { - "argumentTypes": null, - "id": 2253, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "17047:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17033:16:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2255, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "17033:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2256, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "17069:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2260, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2258, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17088:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - ], - "id": 2257, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "17083:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 2259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17083:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17069:26:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2261, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "17069:43:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17033:79:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "17017:95:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 2264, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "17016:97:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "16964:149:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2273, - "nodeType": "IfStatement", - "src": "16960:203:2", - "trueBody": { - "id": 2272, - "nodeType": "Block", - "src": "17115:48:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2266, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17133:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2268, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "17146:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "17141:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int8_$", - "typeString": "type(int8)" - }, - "typeName": "int8" - }, - "id": 2269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:7:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "17133:15:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "id": 2271, - "nodeType": "ExpressionStatement", - "src": "17133:15:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2235, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "16915:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2236, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16919:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16919:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16915:24:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2275, - "initializationExpression": { - "assignments": [ - 2232 - ], - "declarations": [ - { - "constant": false, - "id": 2232, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 2289, - "src": "16903:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2231, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16903:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2234, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2233, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16912:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "16903:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "16941:3:2", - "subExpression": { - "argumentTypes": null, - "id": 2239, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "16941:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2241, - "nodeType": "ExpressionStatement", - "src": "16941:3:2" - }, - "nodeType": "ForStatement", - "src": "16898:275:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 2280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2277, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17190:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 2279, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "17199:3:2", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17201:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_-1_by_1", - "typeString": "int_const -1" - } - }, - "src": "17190:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f20776f726b65727320706172616d657465727320656e74727920666f722073706563696669656420626c6f636b206e756d626572", - "id": 2281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17204:56:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e9fab335fbd58bdc8f1aa0d5f38123bc711e5112f8f3f95c75615d3d06674c6d", - "typeString": "literal_string \"No workers parameters entry for specified block number\"" - }, - "value": "No workers parameters entry for specified block number" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e9fab335fbd58bdc8f1aa0d5f38123bc711e5112f8f3f95c75615d3d06674c6d", - "typeString": "literal_string \"No workers parameters entry for specified block number\"" - } - ], - "id": 2276, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "17182:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17182:79:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2283, - "nodeType": "ExpressionStatement", - "src": "17182:79:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2285, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17283:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - ], - "id": 2284, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "17278:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 2286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17278:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2225, - "id": 2287, - "nodeType": "Return", - "src": "17271:18:2" - } - ] - }, - "documentation": null, - "id": 2289, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getWorkerParamsIndex", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2222, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2221, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 2289, - "src": "16740:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2220, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16740:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16739:18:2" - }, - "payable": false, - "returnParameters": { - "id": 2225, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2224, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2289, - "src": "16793:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2223, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16793:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16792:6:2" - }, - "scope": 2657, - "src": "16710:586:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2326, - "nodeType": "Block", - "src": "17409:211:2", - "statements": [ - { - "assignments": [ - 2305 - ], - "declarations": [ - { - "constant": false, - "id": 2305, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17419:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2304, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17419:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2309, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2307, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2291, - "src": "17453:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2306, - "name": "getWorkerParamsIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2289, - "src": "17432:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 2308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17432:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17419:46:2" - }, - { - "assignments": [ - 2311 - ], - "declarations": [ - { - "constant": false, - "id": 2311, - "name": "params", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17475:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams" - }, - "typeName": { - "contractScope": null, - "id": 2310, - "name": "WorkersParams", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 948, - "src": "17475:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage_ptr", - "typeString": "struct Enigma.WorkersParams" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2315, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2312, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "17505:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2314, - "indexExpression": { - "argumentTypes": null, - "id": 2313, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2305, - "src": "17519:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17505:20:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17475:50:2" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2316, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "17543:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2317, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "17543:23:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2318, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "17568:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2319, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "seed", - "nodeType": "MemberAccess", - "referencedDeclaration": 947, - "src": "17568:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2320, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "17581:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2321, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "17581:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2322, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "17597:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2323, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "17597:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - } - ], - "id": 2324, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "17542:71:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_array$_t_address_$dyn_memory_$_t_array$_t_uint256_$dyn_memory_$", - "typeString": "tuple(uint256,uint256,address[] memory,uint256[] memory)" - } - }, - "functionReturnParameters": 2303, - "id": 2325, - "nodeType": "Return", - "src": "17535:78:2" - } - ] - }, - "documentation": null, - "id": 2327, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getWorkerParams", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2292, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2291, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17327:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2290, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17327:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17326:18:2" - }, - "payable": false, - "returnParameters": { - "id": 2303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2294, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17378:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2293, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17378:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2296, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17384:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2295, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17384:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2299, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17390:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2297, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17390:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2298, - "length": null, - "nodeType": "ArrayTypeName", - "src": "17390:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2302, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17401:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 2300, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17401:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2301, - "length": null, - "nodeType": "ArrayTypeName", - "src": "17401:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17377:31:2" - }, - "scope": 2657, - "src": "17302:318:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2446, - "nodeType": "Block", - "src": "17716:728:2", - "statements": [ - { - "assignments": [ - 2336 - ], - "declarations": [ - { - "constant": false, - "id": 2336, - "name": "params", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17726:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams" - }, - "typeName": { - "contractScope": null, - "id": 2335, - "name": "WorkersParams", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 948, - "src": "17726:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage_ptr", - "typeString": "struct Enigma.WorkersParams" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2340, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2337, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "17756:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2339, - "indexExpression": { - "argumentTypes": null, - "id": 2338, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2329, - "src": "17770:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17756:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17726:55:2" - }, - { - "assignments": [ - 2342 - ], - "declarations": [ - { - "constant": false, - "id": 2342, - "name": "tokenCpt", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17791:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2341, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17791:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2344, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2343, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17807:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "17791:17:2" - }, - { - "body": { - "id": 2375, - "nodeType": "Block", - "src": "17867:130:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2357, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "17885:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2358, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "17885:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2360, - "indexExpression": { - "argumentTypes": null, - "id": 2359, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "17900:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17885:17:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2361, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17906:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "17885:24:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2374, - "nodeType": "IfStatement", - "src": "17881:106:2", - "trueBody": { - "id": 2373, - "nodeType": "Block", - "src": "17911:76:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2363, - "name": "tokenCpt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2342, - "src": "17929:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2366, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "17953:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2367, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "17953:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - }, - "id": 2369, - "indexExpression": { - "argumentTypes": null, - "id": 2368, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "17969:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17953:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2364, - "name": "tokenCpt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2342, - "src": "17940:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "17940:12:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17940:32:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17929:43:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2372, - "nodeType": "ExpressionStatement", - "src": "17929:43:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2349, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "17835:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2350, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "17839:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2351, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "17839:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2352, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17839:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17835:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2376, - "initializationExpression": { - "assignments": [ - 2346 - ], - "declarations": [ - { - "constant": false, - "id": 2346, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17823:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2345, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17823:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2348, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2347, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17832:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "17823:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "17862:3:2", - "subExpression": { - "argumentTypes": null, - "id": 2354, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "17862:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2356, - "nodeType": "ExpressionStatement", - "src": "17862:3:2" - }, - "nodeType": "ForStatement", - "src": "17818:179:2" - }, - { - "assignments": [ - 2380 - ], - "declarations": [ - { - "constant": false, - "id": 2380, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "18006:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2378, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18006:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2379, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18006:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2386, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2384, - "name": "tokenCpt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2342, - "src": "18046:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2383, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "18032:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 2381, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18036:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2382, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18036:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 2385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18032:23:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18006:49:2" - }, - { - "assignments": [ - 2388 - ], - "declarations": [ - { - "constant": false, - "id": 2388, - "name": "tokenIndex", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "18065:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2387, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18065:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2390, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2389, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18083:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18065:19:2" - }, - { - "body": { - "id": 2442, - "nodeType": "Block", - "src": "18146:269:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2403, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "18164:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2404, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "18164:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2406, - "indexExpression": { - "argumentTypes": null, - "id": 2405, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18179:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18164:18:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2407, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18186:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "18164:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2441, - "nodeType": "IfStatement", - "src": "18160:245:2", - "trueBody": { - "id": 2440, - "nodeType": "Block", - "src": "18191:214:2", - "statements": [ - { - "body": { - "id": 2438, - "nodeType": "Block", - "src": "18259:132:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2422, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2380, - "src": "18281:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2424, - "indexExpression": { - "argumentTypes": null, - "id": 2423, - "name": "tokenIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2388, - "src": "18288:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "18281:18:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2425, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "18302:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2426, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "18302:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2428, - "indexExpression": { - "argumentTypes": null, - "id": 2427, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18317:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18302:18:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "18281:39:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2430, - "nodeType": "ExpressionStatement", - "src": "18281:39:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2436, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2431, - "name": "tokenIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2388, - "src": "18342:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 2434, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18370:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 2432, - "name": "tokenIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2388, - "src": "18355:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2433, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "18355:14:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2435, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18355:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18342:30:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2437, - "nodeType": "ExpressionStatement", - "src": "18342:30:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2413, - "name": "ib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2410, - "src": "18227:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2414, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "18232:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2415, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "18232:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - }, - "id": 2417, - "indexExpression": { - "argumentTypes": null, - "id": 2416, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18248:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18232:19:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18227:24:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2439, - "initializationExpression": { - "assignments": [ - 2410 - ], - "declarations": [ - { - "constant": false, - "id": 2410, - "name": "ib", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "18214:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2409, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18214:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2412, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2411, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18224:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18214:11:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18253:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2419, - "name": "ib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2410, - "src": "18253:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2421, - "nodeType": "ExpressionStatement", - "src": "18253:4:2" - }, - "nodeType": "ForStatement", - "src": "18209:182:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2395, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18112:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2396, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "18117:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2397, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "18117:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18117:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18112:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2443, - "initializationExpression": { - "assignments": [ - 2392 - ], - "declarations": [ - { - "constant": false, - "id": 2392, - "name": "ia", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "18099:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2391, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18099:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2394, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2393, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18109:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18099:11:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18140:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2400, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18140:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2402, - "nodeType": "ExpressionStatement", - "src": "18140:4:2" - }, - "nodeType": "ForStatement", - "src": "18094:321:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2444, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2380, - "src": "18431:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 2334, - "id": 2445, - "nodeType": "Return", - "src": "18424:13:2" - } - ] - }, - "documentation": null, - "id": 2447, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "compileTokens", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2330, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2329, - "name": "paramIndex", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17649:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2328, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17649:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17648:17:2" - }, - "payable": false, - "returnParameters": { - "id": 2334, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2333, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17701:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2331, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17701:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2332, - "length": null, - "nodeType": "ArrayTypeName", - "src": "17701:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17700:11:2" - }, - "scope": 2657, - "src": "17626:818:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2582, - "nodeType": "Block", - "src": "18532:1194:2", - "statements": [ - { - "assignments": [ - 2455 - ], - "declarations": [ - { - "constant": false, - "id": 2455, - "name": "paramIndex", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18641:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2454, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18641:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2459, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2457, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2449, - "src": "18680:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2456, - "name": "getWorkerParamsIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2289, - "src": "18659:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 2458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18659:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18641:51:2" - }, - { - "assignments": [ - 2463 - ], - "declarations": [ - { - "constant": false, - "id": 2463, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18702:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2461, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18702:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2462, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18702:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2467, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2465, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2455, - "src": "18742:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2464, - "name": "compileTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2447, - "src": "18728:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) view returns (address[] memory)" - } - }, - "id": 2466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18728:25:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18702:51:2" - }, - { - "assignments": [ - 2469 - ], - "declarations": [ - { - "constant": false, - "id": 2469, - "name": "params", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18763:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams" - }, - "typeName": { - "contractScope": null, - "id": 2468, - "name": "WorkersParams", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 948, - "src": "18763:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage_ptr", - "typeString": "struct Enigma.WorkersParams" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2473, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2470, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "18793:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2472, - "indexExpression": { - "argumentTypes": null, - "id": 2471, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2455, - "src": "18807:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18793:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18763:55:2" - }, - { - "assignments": [ - 2477 - ], - "declarations": [ - { - "constant": false, - "id": 2477, - "name": "selectedWorkers", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18829:32:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2475, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18829:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2476, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18829:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2483, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2481, - "name": "workerGroupSize", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 987, - "src": "18878:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "18864:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 2478, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18868:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2479, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18868:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 2482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18864:30:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18829:65:2" - }, - { - "body": { - "id": 2580, - "nodeType": "Block", - "src": "18953:767:2", - "statements": [ - { - "body": { - "id": 2573, - "nodeType": "Block", - "src": "18970:692:2", - "statements": [ - { - "assignments": [ - 2495 - ], - "declarations": [ - { - "constant": false, - "id": 2495, - "name": "nonce", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18988:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2494, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18988:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2497, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2496, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19001:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18988:14:2" - }, - { - "assignments": [ - 2499 - ], - "declarations": [ - { - "constant": false, - "id": 2499, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19020:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2498, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "19020:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2510, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2503, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2495, - "src": "19062:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2504, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2469, - "src": "19069:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2505, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "seed", - "nodeType": "MemberAccess", - "referencedDeclaration": 947, - "src": "19069:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2506, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2449, - "src": "19082:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2507, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2451, - "src": "19095:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2501, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3435, - "src": "19045:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2502, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19045:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2508, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19045:57:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2500, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3442, - "src": "19035:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19035:68:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19020:83:2" - }, - { - "assignments": [ - 2512 - ], - "declarations": [ - { - "constant": false, - "id": 2512, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19121:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2511, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19121:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2519, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2514, - "name": "hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2499, - "src": "19142:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 2513, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19134:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 2515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19134:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2516, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2463, - "src": "19150:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19150:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19134:29:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19121:42:2" - }, - { - "assignments": [ - 2521 - ], - "declarations": [ - { - "constant": false, - "id": 2521, - "name": "worker", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19181:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2520, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19181:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2525, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2522, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2463, - "src": "19198:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2524, - "indexExpression": { - "argumentTypes": null, - "id": 2523, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2512, - "src": "19205:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19198:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19181:30:2" - }, - { - "assignments": [ - 2527 - ], - "declarations": [ - { - "constant": false, - "id": 2527, - "name": "dup", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19229:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2526, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "19229:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2529, - "initialValue": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 2528, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19240:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "nodeType": "VariableDeclarationStatement", - "src": "19229:16:2" - }, - { - "body": { - "id": 2552, - "nodeType": "Block", - "src": "19312:165:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2544, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2540, - "name": "worker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2521, - "src": "19338:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2541, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "19348:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2543, - "indexExpression": { - "argumentTypes": null, - "id": 2542, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2531, - "src": "19364:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19348:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "19338:29:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2551, - "nodeType": "IfStatement", - "src": "19334:125:2", - "trueBody": { - "id": 2550, - "nodeType": "Block", - "src": "19369:90:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2545, - "name": "dup", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2527, - "src": "19395:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2546, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19401:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "19395:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2548, - "nodeType": "ExpressionStatement", - "src": "19395:10:2" - }, - { - "id": 2549, - "nodeType": "Break", - "src": "19431:5:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2533, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2531, - "src": "19277:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2534, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "19282:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19282:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19277:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2553, - "initializationExpression": { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2531, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19268:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2530, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19268:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2532, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "19268:7:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2538, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "19306:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2537, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2531, - "src": "19306:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2539, - "nodeType": "ExpressionStatement", - "src": "19306:4:2" - }, - "nodeType": "ForStatement", - "src": "19263:214:2" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 2556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2554, - "name": "dup", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2527, - "src": "19498:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 2555, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19505:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "19498:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2571, - "nodeType": "Block", - "src": "19587:61:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2564, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2495, - "src": "19609:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 2567, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19627:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 2565, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2495, - "src": "19617:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "19617:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19617:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19609:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2570, - "nodeType": "ExpressionStatement", - "src": "19609:20:2" - } - ] - }, - "id": 2572, - "nodeType": "IfStatement", - "src": "19494:154:2", - "trueBody": { - "id": 2563, - "nodeType": "Block", - "src": "19512:69:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2557, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "19534:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2559, - "indexExpression": { - "argumentTypes": null, - "id": 2558, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "19550:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "19534:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2560, - "name": "worker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2521, - "src": "19556:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "19534:28:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2562, - "nodeType": "ExpressionStatement", - "src": "19534:28:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2574, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "19682:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2576, - "indexExpression": { - "argumentTypes": null, - "id": 2575, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "19698:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19682:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2577, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19705:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "19682:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2579, - "nodeType": "DoWhileStatement", - "src": "18967:743:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2487, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "18918:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2488, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "18923:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18923:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18918:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2581, - "initializationExpression": { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2485, - "name": "it", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18909:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2484, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18909:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2486, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "18909:7:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18947:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2491, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "18947:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2493, - "nodeType": "ExpressionStatement", - "src": "18947:4:2" - }, - "nodeType": "ForStatement", - "src": "18904:816:2" - } - ] - }, - "documentation": null, - "id": 2583, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getWorkerGroup", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2452, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2449, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18474:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2448, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18474:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2451, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18492:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2450, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18492:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18473:34:2" - }, - "payable": false, - "returnParameters": { - "id": 2453, - "nodeType": "ParameterList", - "parameters": [], - "src": "18532:0:2" - }, - "scope": 2657, - "src": "18450:1276:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2622, - "nodeType": "Block", - "src": "19992:261:2", - "statements": [ - { - "assignments": [ - 2599 - ], - "declarations": [ - { - "constant": false, - "id": 2599, - "name": "firstBlockNumber", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "20043:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2598, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "20043:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2601, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2600, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20067:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "20043:25:2" - }, - { - "assignments": [ - 2603 - ], - "declarations": [ - { - "constant": false, - "id": 2603, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "20078:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2602, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "20078:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2605, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2604, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20090:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "20078:13:2" - }, - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2609, - "name": "activeWorkers", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "20101:30:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2607, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20101:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2608, - "length": null, - "nodeType": "ArrayTypeName", - "src": "20101:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2610, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "20101:30:2" - }, - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2614, - "name": "activeContracts", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "20141:32:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2612, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20141:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2613, - "length": null, - "nodeType": "ArrayTypeName", - "src": "20141:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2615, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "20141:32:2" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 2616, - "name": "firstBlockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2599, - "src": "20191:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2617, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2603, - "src": "20209:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2618, - "name": "activeWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2609, - "src": "20215:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 2619, - "name": "activeContracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2614, - "src": "20230:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - } - ], - "id": 2620, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20190:56:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "tuple(uint256,uint256,address[] memory,address[] memory)" - } - }, - "functionReturnParameters": 2597, - "id": 2621, - "nodeType": "Return", - "src": "20183:63:2" - } - ] - }, - "documentation": "The worker parameters corresponding to the specified block number\n * @param blockNumber The reference block number", - "id": 2623, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getWorkersParams", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2586, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2585, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19903:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2584, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19903:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19902:18:2" - }, - "payable": false, - "returnParameters": { - "id": 2597, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2588, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19954:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2587, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19954:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2590, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19960:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2589, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19960:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2593, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19966:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2591, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19966:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2592, - "length": null, - "nodeType": "ArrayTypeName", - "src": "19966:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2596, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19977:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2594, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19977:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2595, - "length": null, - "nodeType": "ArrayTypeName", - "src": "19977:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19953:34:2" - }, - "scope": 2657, - "src": "19877:376:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2655, - "nodeType": "Block", - "src": "20513:234:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2641, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2636, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "20611:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2638, - "indexExpression": { - "argumentTypes": null, - "id": 2637, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20619:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20611:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2639, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "20611:25:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2640, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20640:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "20611:32:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "576f726b6572206e6f742072656769737465726564", - "id": 2642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20645:23:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ad68aef7a0c9f95c0e940996fbd009b216d0a6ca729c2f480732643f59319eb1", - "typeString": "literal_string \"Worker not registered\"" - }, - "value": "Worker not registered" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ad68aef7a0c9f95c0e940996fbd009b216d0a6ca729c2f480732643f59319eb1", - "typeString": "literal_string \"Worker not registered\"" - } - ], - "id": 2635, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "20603:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20603:66:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2644, - "nodeType": "ExpressionStatement", - "src": "20603:66:2" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2645, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "20687:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2647, - "indexExpression": { - "argumentTypes": null, - "id": 2646, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20695:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20687:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2648, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "20687:25:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2649, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "20714:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2651, - "indexExpression": { - "argumentTypes": null, - "id": 2650, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20722:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20714:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2652, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "report", - "nodeType": "MemberAccess", - "referencedDeclaration": 934, - "src": "20714:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - } - ], - "id": 2653, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20686:54:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_bytes_storage_$", - "typeString": "tuple(address,bytes storage ref)" - } - }, - "functionReturnParameters": 2634, - "id": 2654, - "nodeType": "Return", - "src": "20679:61:2" - } - ] - }, - "documentation": "The RLP encoded report returned by the IAS server\n * @param custodian The worker's custodian address", - "id": 2656, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 2628, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20469:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 2629, - "modifierName": { - "argumentTypes": null, - "id": 2627, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "20452:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "20452:27:2" - } - ], - "name": "getReport", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2626, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2625, - "name": "custodian", - "nodeType": "VariableDeclaration", - "scope": 2656, - "src": "20409:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2624, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20409:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20408:19:2" - }, - "payable": false, - "returnParameters": { - "id": 2634, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2631, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2656, - "src": "20493:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2630, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20493:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2633, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2656, - "src": "20502:5:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2632, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20502:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20492:16:2" - }, - "scope": 2657, - "src": "20390:357:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 2658, - "src": "808:19941:2" - } - ], - "src": "0:20750:2" - }, - "legacyAST": { - "absolutePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/Enigma.sol", - "exportedSymbols": { - "ERC20": [ - 902 - ], - "Enigma": [ - 2657 - ] - }, - "id": 2658, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 832, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:2" - }, - { - "id": 833, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "25:33:2" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "id": 834, - "nodeType": "ImportDirective", - "scope": 2658, - "sourceUnit": 3016, - "src": "60:59:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/ECRecovery.sol", - "file": "openzeppelin-solidity/contracts/ECRecovery.sol", - "id": 835, - "nodeType": "ImportDirective", - "scope": 2658, - "sourceUnit": 2922, - "src": "120:56:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 902, - "linearizedBaseContracts": [ - 902 - ], - "name": "ERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 844, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 840, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 837, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 844, - "src": "218:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 836, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "218:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 839, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 844, - "src": "233:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 838, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "233:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "217:32:2" - }, - "payable": false, - "returnParameters": { - "id": 843, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 842, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 844, - "src": "271:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 841, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "271:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "270:9:2" - }, - "scope": 902, - "src": "199:81:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 855, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 851, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 846, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 855, - "src": "307:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 845, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "307:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 848, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 855, - "src": "321:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 847, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "321:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 850, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 855, - "src": "333:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 849, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "333:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "306:41:2" - }, - "payable": false, - "returnParameters": { - "id": 854, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 853, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 855, - "src": "364:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 852, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "364:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "363:6:2" - }, - "scope": 902, - "src": "285:85:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 864, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 860, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 857, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 864, - "src": "392:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 856, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "392:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 859, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 864, - "src": "409:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 858, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "409:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "391:32:2" - }, - "payable": false, - "returnParameters": { - "id": 863, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 862, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 864, - "src": "440:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 861, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "440:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "439:6:2" - }, - "scope": 902, - "src": "375:71:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 869, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 865, - "nodeType": "ParameterList", - "parameters": [], - "src": "471:2:2" - }, - "payable": false, - "returnParameters": { - "id": 868, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 867, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 869, - "src": "495:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 866, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "495:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "494:9:2" - }, - "scope": 902, - "src": "451:53:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 876, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 872, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 871, - "name": "who", - "nodeType": "VariableDeclaration", - "scope": 876, - "src": "528:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 870, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "528:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "527:13:2" - }, - "payable": false, - "returnParameters": { - "id": 875, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 874, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 876, - "src": "562:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 873, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "562:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "561:9:2" - }, - "scope": 902, - "src": "509:62:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 885, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 881, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 878, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 885, - "src": "594:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 877, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "594:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 880, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 885, - "src": "606:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 879, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "606:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "593:27:2" - }, - "payable": false, - "returnParameters": { - "id": 884, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 883, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 885, - "src": "637:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 882, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "637:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "636:6:2" - }, - "scope": 902, - "src": "576:67:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 893, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 892, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 887, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 893, - "src": "664:20:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 886, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 889, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 893, - "src": "686:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 888, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "686:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 891, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 893, - "src": "706:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 890, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "706:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "663:57:2" - }, - "src": "649:72:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 901, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 900, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 895, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 901, - "src": "741:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 894, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "741:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 897, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 901, - "src": "764:23:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 896, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "764:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 899, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 901, - "src": "789:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 898, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "789:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "740:63:2" - }, - "src": "726:78:2" - } - ], - "scope": 2658, - "src": "178:628:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 2657, - "linearizedBaseContracts": [ - 2657 - ], - "name": "Enigma", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 905, - "libraryName": { - "contractScope": null, - "id": 903, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3015, - "src": "836:8:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$3015", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "830:27:2", - "typeName": { - "id": 904, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "849:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 908, - "libraryName": { - "contractScope": null, - "id": 906, - "name": "ECRecovery", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2921, - "src": "868:10:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ECRecovery_$2921", - "typeString": "library ECRecovery" - } - }, - "nodeType": "UsingForDirective", - "src": "862:29:2", - "typeName": { - "id": 907, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "883:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - }, - { - "constant": false, - "id": 910, - "name": "engToken", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "959:21:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - }, - "typeName": { - "contractScope": null, - "id": 909, - "name": "ERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 902, - "src": "959:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - } - }, - "value": null, - "visibility": "public" - }, - { - "canonicalName": "Enigma.Task", - "id": 923, - "members": [ - { - "constant": false, - "id": 912, - "name": "fee", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1009:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 911, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1009:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 914, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1027:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 913, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1027:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 916, - "name": "tokenValue", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1050:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 915, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1050:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 918, - "name": "proof", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1075:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 917, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1075:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 920, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1167:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 919, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1167:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 922, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1191:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - }, - "typeName": { - "contractScope": null, - "id": 921, - "name": "TaskStatus", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 926, - "src": "1191:10:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Task", - "nodeType": "StructDefinition", - "scope": 2657, - "src": "987:228:2", - "visibility": "public" - }, - { - "canonicalName": "Enigma.TaskStatus", - "id": 926, - "members": [ - { - "id": 924, - "name": "RecordCreated", - "nodeType": "EnumValue", - "src": "1237:13:2" - }, - { - "id": 925, - "name": "ReceiptVerified", - "nodeType": "EnumValue", - "src": "1252:15:2" - } - ], - "name": "TaskStatus", - "nodeType": "EnumDefinition", - "src": "1220:48:2" - }, - { - "constant": false, - "id": 928, - "name": "principal", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "1576:17:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 927, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1576:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "canonicalName": "Enigma.Worker", - "id": 937, - "members": [ - { - "constant": false, - "id": 930, - "name": "signer", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "1677:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 929, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1677:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 932, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "1701:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 931, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1701:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 934, - "name": "report", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "1767:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 933, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1767:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 936, - "name": "balance", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "1886:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 935, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1886:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Worker", - "nodeType": "StructDefinition", - "scope": 2657, - "src": "1653:255:2", - "visibility": "public" - }, - { - "canonicalName": "Enigma.WorkersParams", - "id": 948, - "members": [ - { - "constant": false, - "id": 939, - "name": "firstBlockNumber", - "nodeType": "VariableDeclaration", - "scope": 948, - "src": "2070:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 938, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2070:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 942, - "name": "workers", - "nodeType": "VariableDeclaration", - "scope": 948, - "src": "2101:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 940, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2101:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 941, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2101:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 945, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 948, - "src": "2128:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 943, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2128:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 944, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2128:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 947, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 948, - "src": "2153:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 946, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2153:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "WorkersParams", - "nodeType": "StructDefinition", - "scope": 2657, - "src": "2039:130:2", - "visibility": "public" - }, - { - "canonicalName": "Enigma.SecretContract", - "id": 958, - "members": [ - { - "constant": false, - "id": 950, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 958, - "src": "2207:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 949, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2207:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 952, - "name": "codeHash", - "nodeType": "VariableDeclaration", - "scope": 958, - "src": "2230:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 951, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2230:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 955, - "name": "stateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 958, - "src": "2256:26:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 953, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2256:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 954, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2256:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 957, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 958, - "src": "2292:27:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - }, - "typeName": { - "contractScope": null, - "id": 956, - "name": "SecretContractStatus", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 961, - "src": "2292:20:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "SecretContract", - "nodeType": "StructDefinition", - "scope": 2657, - "src": "2175:205:2", - "visibility": "public" - }, - { - "canonicalName": "Enigma.SecretContractStatus", - "id": 961, - "members": [ - { - "id": 959, - "name": "Undefined", - "nodeType": "EnumValue", - "src": "2466:9:2" - }, - { - "id": 960, - "name": "Deployed", - "nodeType": "EnumValue", - "src": "2477:8:2" - } - ], - "name": "SecretContractStatus", - "nodeType": "EnumDefinition", - "src": "2439:47:2" - }, - { - "constant": false, - "id": 965, - "name": "workersParams", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3091:30:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams[5]" - }, - "typeName": { - "baseType": { - "contractScope": null, - "id": 962, - "name": "WorkersParams", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 948, - "src": "3091:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage_ptr", - "typeString": "struct Enigma.WorkersParams" - } - }, - "id": 964, - "length": { - "argumentTypes": null, - "hexValue": "35", - "id": 963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3105:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "5" - }, - "nodeType": "ArrayTypeName", - "src": "3091:16:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage_ptr", - "typeString": "struct Enigma.WorkersParams[5]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 968, - "name": "workerAddresses", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3183:32:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 966, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3183:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 967, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3183:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 971, - "name": "scAddresses", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3275:28:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 969, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3275:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 970, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3275:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 975, - "name": "workers", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3376:41:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker)" - }, - "typeName": { - "id": 974, - "keyType": { - "id": 972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3384:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3376:26:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker)" - }, - "valueType": { - "contractScope": null, - "id": 973, - "name": "Worker", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 937, - "src": "3395:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage_ptr", - "typeString": "struct Enigma.Worker" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 979, - "name": "tasks", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3423:37:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task)" - }, - "typeName": { - "id": 978, - "keyType": { - "id": 976, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3431:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "3423:24:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task)" - }, - "valueType": { - "contractScope": null, - "id": 977, - "name": "Task", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 923, - "src": "3442:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage_ptr", - "typeString": "struct Enigma.Task" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 983, - "name": "contracts", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3466:51:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract)" - }, - "typeName": { - "id": 982, - "keyType": { - "id": 980, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3474:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3466:34:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract)" - }, - "valueType": { - "contractScope": null, - "id": 981, - "name": "SecretContract", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 958, - "src": "3485:14:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage_ptr", - "typeString": "struct Enigma.SecretContract" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 985, - "name": "stakingThreshold", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3595:21:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 984, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3595:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 987, - "name": "workerGroupSize", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3622:20:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 986, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3622:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "anonymous": false, - "documentation": null, - "id": 993, - "name": "Registered", - "nodeType": "EventDefinition", - "parameters": { - "id": 992, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 989, - "indexed": false, - "name": "custodian", - "nodeType": "VariableDeclaration", - "scope": 993, - "src": "3708:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 988, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3708:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 991, - "indexed": false, - "name": "signer", - "nodeType": "VariableDeclaration", - "scope": 993, - "src": "3727:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 990, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3727:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3707:35:2" - }, - "src": "3691:52:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1001, - "name": "ValidatedSig", - "nodeType": "EventDefinition", - "parameters": { - "id": 1000, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 995, - "indexed": false, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1001, - "src": "3767:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 994, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3767:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 997, - "indexed": false, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 1001, - "src": "3778:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 996, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3778:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 999, - "indexed": false, - "name": "workerAddr", - "nodeType": "VariableDeclaration", - "scope": 1001, - "src": "3792:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 998, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3792:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3766:45:2" - }, - "src": "3748:64:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1013, - "name": "WorkersParameterized", - "nodeType": "EventDefinition", - "parameters": { - "id": 1012, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1003, - "indexed": false, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 1013, - "src": "3844:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1002, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3844:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1005, - "indexed": false, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 1013, - "src": "3855:19:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1004, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3855:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1008, - "indexed": false, - "name": "workers", - "nodeType": "VariableDeclaration", - "scope": 1013, - "src": "3876:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1006, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3876:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1007, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3876:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1011, - "indexed": false, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 1013, - "src": "3895:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1009, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3895:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1010, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3895:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3843:68:2" - }, - "src": "3817:95:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1025, - "name": "TaskRecordCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 1024, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1015, - "indexed": false, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3941:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1014, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3941:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1017, - "indexed": false, - "name": "fee", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3957:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1016, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3957:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1019, - "indexed": false, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3967:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1018, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3967:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1021, - "indexed": false, - "name": "tokenValue", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3982:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1020, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3982:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1023, - "indexed": false, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3999:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1022, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3999:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3940:74:2" - }, - "src": "3917:98:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1041, - "name": "TaskRecordsCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 1040, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1028, - "indexed": false, - "name": "taskIds", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4045:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1026, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4045:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1027, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4045:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1031, - "indexed": false, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4064:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1029, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4064:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1030, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4064:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1034, - "indexed": false, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4077:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1032, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4077:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1033, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4077:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1037, - "indexed": false, - "name": "tokenValues", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4095:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1035, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4095:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1036, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4095:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1039, - "indexed": false, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4115:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1038, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4115:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4044:86:2" - }, - "src": "4020:111:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1053, - "name": "ReceiptVerified", - "nodeType": "EventDefinition", - "parameters": { - "id": 1052, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1043, - "indexed": false, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4158:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1042, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4158:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1045, - "indexed": false, - "name": "inStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4174:24:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1044, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4174:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1047, - "indexed": false, - "name": "outStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4200:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1046, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4200:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1049, - "indexed": false, - "name": "ethCall", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4227:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1048, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4227:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1051, - "indexed": false, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4242:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1050, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4242:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4157:95:2" - }, - "src": "4136:117:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1070, - "name": "ReceiptsVerified", - "nodeType": "EventDefinition", - "parameters": { - "id": 1069, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1056, - "indexed": false, - "name": "taskIds", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4281:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1054, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4281:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1055, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4281:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1059, - "indexed": false, - "name": "inStateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4300:28:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1057, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4300:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1058, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4300:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1062, - "indexed": false, - "name": "outStateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4330:29:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1060, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4330:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1061, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4330:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1065, - "indexed": false, - "name": "ethCalls", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4361:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 1063, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4361:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 1064, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4361:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1068, - "indexed": false, - "name": "sigs", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4379:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 1066, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4379:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 1067, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4379:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4280:112:2" - }, - "src": "4258:135:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1076, - "name": "DepositSuccessful", - "nodeType": "EventDefinition", - "parameters": { - "id": 1075, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1072, - "indexed": false, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 1076, - "src": "4422:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1071, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4422:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1074, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1076, - "src": "4436:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1073, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4436:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4421:26:2" - }, - "src": "4398:50:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1082, - "name": "SecretContractDeployed", - "nodeType": "EventDefinition", - "parameters": { - "id": 1081, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1078, - "indexed": false, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1082, - "src": "4482:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1077, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4482:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1080, - "indexed": false, - "name": "codeHash", - "nodeType": "VariableDeclaration", - "scope": 1082, - "src": "4498:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1079, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4498:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4481:34:2" - }, - "src": "4453:63:2" - }, - { - "body": { - "id": 1107, - "nodeType": "Block", - "src": "4584:140:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1089, - "name": "engToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 910, - "src": "4594:8:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1091, - "name": "_tokenAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1084, - "src": "4611:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1090, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 902, - "src": "4605:5:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$902_$", - "typeString": "type(contract ERC20)" - } - }, - "id": 1092, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4605:20:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - } - }, - "src": "4594:31:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - } - }, - "id": 1094, - "nodeType": "ExpressionStatement", - "src": "4594:31:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1095, - "name": "principal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 928, - "src": "4635:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1096, - "name": "_principal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1086, - "src": "4647:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4635:22:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1098, - "nodeType": "ExpressionStatement", - "src": "4635:22:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1099, - "name": "stakingThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 985, - "src": "4667:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 1100, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4686:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4667:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1102, - "nodeType": "ExpressionStatement", - "src": "4667:20:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1103, - "name": "workerGroupSize", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 987, - "src": "4697:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1104, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4715:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "4697:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1106, - "nodeType": "ExpressionStatement", - "src": "4697:20:2" - } - ] - }, - "documentation": null, - "id": 1108, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1087, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1084, - "name": "_tokenAddress", - "nodeType": "VariableDeclaration", - "scope": 1108, - "src": "4534:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1083, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4534:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1086, - "name": "_principal", - "nodeType": "VariableDeclaration", - "scope": 1108, - "src": "4557:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1085, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4557:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4533:43:2" - }, - "payable": false, - "returnParameters": { - "id": 1088, - "nodeType": "ParameterList", - "parameters": [], - "src": "4584:0:2" - }, - "scope": 2657, - "src": "4522:202:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1127, - "nodeType": "Block", - "src": "4978:124:2", - "statements": [ - { - "assignments": [ - 1113 - ], - "declarations": [ - { - "constant": false, - "id": 1113, - "name": "worker", - "nodeType": "VariableDeclaration", - "scope": 1128, - "src": "4988:20:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_memory_ptr", - "typeString": "struct Enigma.Worker" - }, - "typeName": { - "contractScope": null, - "id": 1112, - "name": "Worker", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 937, - "src": "4988:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage_ptr", - "typeString": "struct Enigma.Worker" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1117, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1114, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "5011:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1116, - "indexExpression": { - "argumentTypes": null, - "id": 1115, - "name": "user", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1110, - "src": "5019:4:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5011:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4988:36:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1119, - "name": "worker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1113, - "src": "5042:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_memory_ptr", - "typeString": "struct Enigma.Worker memory" - } - }, - "id": 1120, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 932, - "src": "5042:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1121, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5058:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5042:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e7265676973746572656420776f726b65722e", - "id": 1123, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5061:22:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_015d526a09bff2dba6bddc24f9efb2c59ba42ae95d5f989298007e714aa8b419", - "typeString": "literal_string \"Unregistered worker.\"" - }, - "value": "Unregistered worker." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_015d526a09bff2dba6bddc24f9efb2c59ba42ae95d5f989298007e714aa8b419", - "typeString": "literal_string \"Unregistered worker.\"" - } - ], - "id": 1118, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "5034:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5034:50:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1125, - "nodeType": "ExpressionStatement", - "src": "5034:50:2" - }, - { - "id": 1126, - "nodeType": "PlaceholderStatement", - "src": "5094:1:2" - } - ] - }, - "documentation": "Checks if the custodian wallet is registered as a worker\n * @param user The custodian address of the worker", - "id": 1128, - "name": "workerRegistered", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 1111, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1110, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 1128, - "src": "4964:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1109, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4964:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4963:14:2" - }, - "src": "4938:164:2", - "visibility": "internal" - }, - { - "body": { - "id": 1144, - "nodeType": "Block", - "src": "5150:127:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - }, - "id": 1139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1133, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "5168:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1135, - "indexExpression": { - "argumentTypes": null, - "id": 1134, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1130, - "src": "5178:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5168:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1136, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 957, - "src": "5168:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1137, - "name": "SecretContractStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "5196:20:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_SecretContractStatus_$961_$", - "typeString": "type(enum Enigma.SecretContractStatus)" - } - }, - "id": 1138, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Deployed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5196:29:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "src": "5168:57:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "53656372657420636f6e7472616374206e6f74206465706c6f7965642e", - "id": 1140, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5227:31:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d75dc00527700c4b910eb9a01254b9dfa870fc7fe0e54f61053a0ea9455cc0d2", - "typeString": "literal_string \"Secret contract not deployed.\"" - }, - "value": "Secret contract not deployed." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d75dc00527700c4b910eb9a01254b9dfa870fc7fe0e54f61053a0ea9455cc0d2", - "typeString": "literal_string \"Secret contract not deployed.\"" - } - ], - "id": 1132, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "5160:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5160:99:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1142, - "nodeType": "ExpressionStatement", - "src": "5160:99:2" - }, - { - "id": 1143, - "nodeType": "PlaceholderStatement", - "src": "5269:1:2" - } - ] - }, - "documentation": null, - "id": 1145, - "name": "contractDeployed", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 1131, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1130, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1145, - "src": "5134:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1129, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5134:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5133:16:2" - }, - "src": "5108:169:2", - "visibility": "internal" - }, - { - "body": { - "id": 1216, - "nodeType": "Block", - "src": "5692:670:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1152, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "5853:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1155, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1153, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "5861:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5861:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5853:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1156, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "5853:26:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1157, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5883:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "5853:33:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1177, - "nodeType": "IfStatement", - "src": "5849:249:2", - "trueBody": { - "id": 1176, - "nodeType": "Block", - "src": "5888:210:2", - "statements": [ - { - "assignments": [ - 1160 - ], - "declarations": [ - { - "constant": false, - "id": 1160, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 1217, - "src": "5965:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1159, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5965:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1163, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1161, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "5978:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1162, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5978:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5965:35:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "6014:24:2", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1164, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "6014:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1166, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6014:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1168, - "nodeType": "ExpressionStatement", - "src": "6014:24:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1169, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "6052:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1171, - "indexExpression": { - "argumentTypes": null, - "id": 1170, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1160, - "src": "6068:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6052:22:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1172, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6077:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6077:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6052:35:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1175, - "nodeType": "ExpressionStatement", - "src": "6052:35:2" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 1184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1178, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6148:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1181, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1179, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6156:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6156:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6148:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1182, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "6148:26:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1183, - "name": "signer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1147, - "src": "6177:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6148:35:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1185, - "nodeType": "ExpressionStatement", - "src": "6148:35:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1186, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6193:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1189, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1187, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6201:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6201:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6193:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1190, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "6193:27:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 1191, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6223:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6193:31:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1193, - "nodeType": "ExpressionStatement", - "src": "6193:31:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1200, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1194, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6234:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1197, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1195, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6242:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1196, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6242:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6234:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1198, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "report", - "nodeType": "MemberAccess", - "referencedDeclaration": 934, - "src": "6234:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1199, - "name": "report", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1149, - "src": "6263:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "6234:35:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 1201, - "nodeType": "ExpressionStatement", - "src": "6234:35:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1202, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6279:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1205, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1203, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6287:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6287:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6279:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1206, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 932, - "src": "6279:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 1207, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6308:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "6279:30:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 1209, - "nodeType": "ExpressionStatement", - "src": "6279:30:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1211, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6336:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1212, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6336:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1213, - "name": "signer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1147, - "src": "6348:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1210, - "name": "Registered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 993, - "src": "6325:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 1214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6325:30:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1215, - "nodeType": "EmitStatement", - "src": "6320:35:2" - } - ] - }, - "documentation": "Registers a new worker of change the signer parameters of an existing\nworker. This should be called by every worker (and the principal)\nnode in order to receive tasks.\n * @param signer The signer address, derived from the enclave public key\n@param report The RLP encoded report returned by the IAS", - "id": 1217, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "register", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1150, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1147, - "name": "signer", - "nodeType": "VariableDeclaration", - "scope": 1217, - "src": "5647:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1146, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5647:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1149, - "name": "report", - "nodeType": "VariableDeclaration", - "scope": 1217, - "src": "5663:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1148, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5663:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5646:30:2" - }, - "payable": false, - "returnParameters": { - "id": 1151, - "nodeType": "ParameterList", - "parameters": [], - "src": "5692:0:2" - }, - "scope": 2657, - "src": "5629:733:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1245, - "nodeType": "Block", - "src": "6464:301:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1227, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6639:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1229, - "indexExpression": { - "argumentTypes": null, - "id": 1228, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1219, - "src": "6647:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6639:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1230, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "6639:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1236, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1221, - "src": "6699:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1231, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6668:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1233, - "indexExpression": { - "argumentTypes": null, - "id": 1232, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1219, - "src": "6676:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6668:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1234, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "6668:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "6668:30:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6668:38:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6639:67:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1239, - "nodeType": "ExpressionStatement", - "src": "6639:67:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1241, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1219, - "src": "6740:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1242, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1221, - "src": "6751:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1240, - "name": "DepositSuccessful", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1076, - "src": "6722:17:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 1243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6722:36:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1244, - "nodeType": "EmitStatement", - "src": "6717:41:2" - } - ] - }, - "documentation": null, - "id": 1246, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1224, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1219, - "src": "6449:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1225, - "modifierName": { - "argumentTypes": null, - "id": 1223, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "6432:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "6432:27:2" - } - ], - "name": "deposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1222, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1219, - "name": "custodian", - "nodeType": "VariableDeclaration", - "scope": 1246, - "src": "6385:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1218, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6385:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1221, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1246, - "src": "6404:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1220, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6404:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6384:32:2" - }, - "payable": false, - "returnParameters": { - "id": 1226, - "nodeType": "ParameterList", - "parameters": [], - "src": "6464:0:2" - }, - "scope": 2657, - "src": "6368:397:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1305, - "nodeType": "Block", - "src": "7078:428:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - }, - "id": 1268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1262, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7096:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1264, - "indexExpression": { - "argumentTypes": null, - "id": 1263, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7106:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7096:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1265, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 957, - "src": "7096:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1266, - "name": "SecretContractStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "7124:20:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_SecretContractStatus_$961_$", - "typeString": "type(enum Enigma.SecretContractStatus)" - } - }, - "id": 1267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Undefined", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7124:30:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "src": "7096:58:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "53656372657420636f6e747261637420616c7265616479206465706c6f7965642e", - "id": 1269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7156:35:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2e032a85504939142c24900a8270f54bd3f5061914a7a38008c3f763afaca760", - "typeString": "literal_string \"Secret contract already deployed.\"" - }, - "value": "Secret contract already deployed." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2e032a85504939142c24900a8270f54bd3f5061914a7a38008c3f763afaca760", - "typeString": "literal_string \"Secret contract already deployed.\"" - } - ], - "id": 1261, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "7088:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7088:104:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1271, - "nodeType": "ExpressionStatement", - "src": "7088:104:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1272, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7265:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1274, - "indexExpression": { - "argumentTypes": null, - "id": 1273, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7275:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7265:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1275, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "owner", - "nodeType": "MemberAccess", - "referencedDeclaration": 950, - "src": "7265:23:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1276, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1252, - "src": "7291:5:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7265:31:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1278, - "nodeType": "ExpressionStatement", - "src": "7265:31:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1279, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7306:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1281, - "indexExpression": { - "argumentTypes": null, - "id": 1280, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7316:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7306:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1282, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "codeHash", - "nodeType": "MemberAccess", - "referencedDeclaration": 952, - "src": "7306:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1283, - "name": "codeHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1250, - "src": "7335:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "7306:37:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1285, - "nodeType": "ExpressionStatement", - "src": "7306:37:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1292, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1286, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7353:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1288, - "indexExpression": { - "argumentTypes": null, - "id": 1287, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7363:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7353:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1289, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 957, - "src": "7353:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1290, - "name": "SecretContractStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "7380:20:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_SecretContractStatus_$961_$", - "typeString": "type(enum Enigma.SecretContractStatus)" - } - }, - "id": 1291, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Deployed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7380:29:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "src": "7353:56:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "id": 1293, - "nodeType": "ExpressionStatement", - "src": "7353:56:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1297, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7436:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1294, - "name": "scAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "7419:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7419:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) returns (uint256)" - } - }, - "id": 1298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7419:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1299, - "nodeType": "ExpressionStatement", - "src": "7419:24:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1301, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7482:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1302, - "name": "codeHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1250, - "src": "7490:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1300, - "name": "SecretContractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1082, - "src": "7459:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$returns$__$", - "typeString": "function (address,bytes32)" - } - }, - "id": 1303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7459:40:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1304, - "nodeType": "EmitStatement", - "src": "7454:45:2" - } - ] - }, - "documentation": null, - "id": 1306, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1257, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "7062:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7062:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1259, - "modifierName": { - "argumentTypes": null, - "id": 1256, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "7045:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "7045:28:2" - } - ], - "name": "deploySecretContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1255, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1248, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "6970:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1247, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6970:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1250, - "name": "codeHash", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "6986:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1249, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6986:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1252, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "7004:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1251, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7004:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1254, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "7019:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1253, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "7019:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6969:60:2" - }, - "payable": false, - "returnParameters": { - "id": 1260, - "nodeType": "ParameterList", - "parameters": [], - "src": "7078:0:2" - }, - "scope": 2657, - "src": "6940:566:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1327, - "nodeType": "Block", - "src": "7591:153:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - }, - "id": 1319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1313, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7604:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1315, - "indexExpression": { - "argumentTypes": null, - "id": 1314, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "7614:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7604:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1316, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 957, - "src": "7604:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1317, - "name": "SecretContractStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "7632:20:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_SecretContractStatus_$961_$", - "typeString": "type(enum Enigma.SecretContractStatus)" - } - }, - "id": 1318, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Deployed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7632:29:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "src": "7604:57:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1325, - "nodeType": "Block", - "src": "7703:35:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 1323, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7723:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 1312, - "id": 1324, - "nodeType": "Return", - "src": "7716:12:2" - } - ] - }, - "id": 1326, - "nodeType": "IfStatement", - "src": "7600:138:2", - "trueBody": { - "id": 1322, - "nodeType": "Block", - "src": "7663:34:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1320, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7683:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1312, - "id": 1321, - "nodeType": "Return", - "src": "7676:11:2" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1328, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isDeployed", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1308, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1328, - "src": "7532:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1307, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7532:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7531:16:2" - }, - "payable": false, - "returnParameters": { - "id": 1312, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1311, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1328, - "src": "7581:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1310, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7581:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7580:6:2" - }, - "scope": 2657, - "src": "7512:232:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1343, - "nodeType": "Block", - "src": "7862:49:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1338, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7878:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1340, - "indexExpression": { - "argumentTypes": null, - "id": 1339, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1330, - "src": "7888:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7878:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1341, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "codeHash", - "nodeType": "MemberAccess", - "referencedDeclaration": 952, - "src": "7878:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 1337, - "id": 1342, - "nodeType": "Return", - "src": "7871:33:2" - } - ] - }, - "documentation": null, - "id": 1344, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1333, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1330, - "src": "7828:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1334, - "modifierName": { - "argumentTypes": null, - "id": 1332, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "7811:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "7811:24:2" - } - ], - "name": "getCodeHash", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1331, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1330, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1344, - "src": "7771:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1329, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7771:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7770:16:2" - }, - "payable": false, - "returnParameters": { - "id": 1337, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1336, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1344, - "src": "7849:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1335, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7849:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7848:9:2" - }, - "scope": 2657, - "src": "7750:161:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1352, - "nodeType": "Block", - "src": "7992:42:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1349, - "name": "scAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "8009:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1350, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8009:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1348, - "id": 1351, - "nodeType": "Return", - "src": "8002:25:2" - } - ] - }, - "documentation": null, - "id": 1353, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "countSecretContracts", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1345, - "nodeType": "ParameterList", - "parameters": [], - "src": "7946:2:2" - }, - "payable": false, - "returnParameters": { - "id": 1348, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1347, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1353, - "src": "7982:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1346, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7982:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7981:6:2" - }, - "scope": 2657, - "src": "7917:117:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1412, - "nodeType": "Block", - "src": "8238:298:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1363, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1357, - "src": "8252:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1364, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8260:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8252:9:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1372, - "nodeType": "IfStatement", - "src": "8248:65:2", - "trueBody": { - "id": 1371, - "nodeType": "Block", - "src": "8263:50:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1366, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1357, - "src": "8277:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1367, - "name": "scAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "8284:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1368, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8284:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8277:25:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1370, - "nodeType": "ExpressionStatement", - "src": "8277:25:2" - } - ] - } - }, - { - "assignments": [ - 1376 - ], - "declarations": [ - { - "constant": false, - "id": 1376, - "name": "addresses", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8322:26:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1374, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8322:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1375, - "length": null, - "nodeType": "ArrayTypeName", - "src": "8322:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1385, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1382, - "name": "start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1355, - "src": "8374:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1380, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1357, - "src": "8365:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "8365:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8365:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1379, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "8351:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 1377, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8355:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1378, - "length": null, - "nodeType": "ArrayTypeName", - "src": "8355:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 1384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8351:30:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8322:59:2" - }, - { - "assignments": [ - 1387 - ], - "declarations": [ - { - "constant": false, - "id": 1387, - "name": "pos", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8391:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1386, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8391:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1389, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8402:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "8391:12:2" - }, - { - "body": { - "id": 1408, - "nodeType": "Block", - "src": "8449:55:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1406, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1400, - "name": "addresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1376, - "src": "8462:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 1402, - "indexExpression": { - "argumentTypes": null, - "id": 1401, - "name": "pos", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1387, - "src": "8472:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8462:14:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1403, - "name": "scAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "8479:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1405, - "indexExpression": { - "argumentTypes": null, - "id": 1404, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1391, - "src": "8491:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8479:14:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8462:31:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1407, - "nodeType": "ExpressionStatement", - "src": "8462:31:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1394, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1391, - "src": "8434:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1395, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1357, - "src": "8438:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8434:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1409, - "initializationExpression": { - "assignments": [ - 1391 - ], - "declarations": [ - { - "constant": false, - "id": 1391, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8418:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1390, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8418:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1393, - "initialValue": { - "argumentTypes": null, - "id": 1392, - "name": "start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1355, - "src": "8427:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8418:14:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "8444:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1397, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1391, - "src": "8444:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1399, - "nodeType": "ExpressionStatement", - "src": "8444:3:2" - }, - "nodeType": "ForStatement", - "src": "8413:91:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1410, - "name": "addresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1376, - "src": "8520:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 1362, - "id": 1411, - "nodeType": "Return", - "src": "8513:16:2" - } - ] - }, - "documentation": "Selects address from start up to, but not including, the stop number*", - "id": 1413, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getSecretContractAddresses", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1358, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1355, - "name": "start", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8167:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1354, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8167:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1357, - "name": "stop", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8179:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1356, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8179:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8166:23:2" - }, - "payable": false, - "returnParameters": { - "id": 1362, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1361, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8223:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1359, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8223:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1360, - "length": null, - "nodeType": "ArrayTypeName", - "src": "8223:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8222:11:2" - }, - "scope": 2657, - "src": "8131:405:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1429, - "nodeType": "Block", - "src": "8656:65:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1423, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "8673:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1425, - "indexExpression": { - "argumentTypes": null, - "id": 1424, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1415, - "src": "8683:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8673:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1426, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "8673:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1427, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8673:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1422, - "id": 1428, - "nodeType": "Return", - "src": "8666:48:2" - } - ] - }, - "documentation": null, - "id": 1430, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1418, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1415, - "src": "8625:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1419, - "modifierName": { - "argumentTypes": null, - "id": 1417, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "8608:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "8608:24:2" - } - ], - "name": "countStateDeltas", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1416, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1415, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1430, - "src": "8568:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1414, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8568:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8567:16:2" - }, - "payable": false, - "returnParameters": { - "id": 1422, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1421, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1430, - "src": "8646:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1420, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8646:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8645:6:2" - }, - "scope": 2657, - "src": "8542:179:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1449, - "nodeType": "Block", - "src": "8857:65:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1442, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "8874:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1444, - "indexExpression": { - "argumentTypes": null, - "id": 1443, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1432, - "src": "8884:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8874:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1445, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "8874:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1447, - "indexExpression": { - "argumentTypes": null, - "id": 1446, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1434, - "src": "8909:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8874:41:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 1441, - "id": 1448, - "nodeType": "Return", - "src": "8867:48:2" - } - ] - }, - "documentation": null, - "id": 1450, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1437, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1432, - "src": "8823:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1438, - "modifierName": { - "argumentTypes": null, - "id": 1436, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "8806:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "8806:24:2" - } - ], - "name": "getStateDeltaHash", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1432, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1450, - "src": "8754:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1431, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8754:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1434, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 1450, - "src": "8770:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1433, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8770:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8753:28:2" - }, - "payable": false, - "returnParameters": { - "id": 1441, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1440, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1450, - "src": "8844:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1439, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8844:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8843:9:2" - }, - "scope": 2657, - "src": "8727:195:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1520, - "nodeType": "Block", - "src": "9169:336:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1465, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "9183:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1466, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9191:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "9183:9:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1477, - "nodeType": "IfStatement", - "src": "9179:88:2", - "trueBody": { - "id": 1476, - "nodeType": "Block", - "src": "9194:73:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1468, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "9208:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1469, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "9215:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1471, - "indexExpression": { - "argumentTypes": null, - "id": 1470, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1452, - "src": "9225:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9215:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1472, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "9215:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1473, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9215:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9208:48:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1475, - "nodeType": "ExpressionStatement", - "src": "9208:48:2" - } - ] - } - }, - { - "assignments": [ - 1481 - ], - "declarations": [ - { - "constant": false, - "id": 1481, - "name": "deltas", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9276:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1479, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9276:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1480, - "length": null, - "nodeType": "ArrayTypeName", - "src": "9276:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1490, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1487, - "name": "start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1454, - "src": "9325:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1485, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "9316:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "9316:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9316:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "9302:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bytes32_$dyn_memory_$", - "typeString": "function (uint256) pure returns (bytes32[] memory)" - }, - "typeName": { - "baseType": { - "id": 1482, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9306:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1483, - "length": null, - "nodeType": "ArrayTypeName", - "src": "9306:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - } - }, - "id": 1489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9302:30:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory", - "typeString": "bytes32[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9276:56:2" - }, - { - "assignments": [ - 1492 - ], - "declarations": [ - { - "constant": false, - "id": 1492, - "name": "pos", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9342:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1491, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9342:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1494, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1493, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9353:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "9342:12:2" - }, - { - "body": { - "id": 1516, - "nodeType": "Block", - "src": "9400:76:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1514, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1505, - "name": "deltas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1481, - "src": "9414:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1507, - "indexExpression": { - "argumentTypes": null, - "id": 1506, - "name": "pos", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1492, - "src": "9421:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9414:11:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1508, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "9428:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1510, - "indexExpression": { - "argumentTypes": null, - "id": 1509, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1452, - "src": "9438:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9428:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1511, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "9428:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1513, - "indexExpression": { - "argumentTypes": null, - "id": 1512, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1496, - "src": "9463:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9428:37:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "9414:51:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1515, - "nodeType": "ExpressionStatement", - "src": "9414:51:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1499, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1496, - "src": "9385:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1500, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "9389:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9385:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1517, - "initializationExpression": { - "assignments": [ - 1496 - ], - "declarations": [ - { - "constant": false, - "id": 1496, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9369:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1495, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9369:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1498, - "initialValue": { - "argumentTypes": null, - "id": 1497, - "name": "start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1454, - "src": "9378:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9369:14:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "9395:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1502, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1496, - "src": "9395:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1504, - "nodeType": "ExpressionStatement", - "src": "9395:3:2" - }, - "nodeType": "ForStatement", - "src": "9364:112:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1518, - "name": "deltas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1481, - "src": "9492:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "functionReturnParameters": 1464, - "id": 1519, - "nodeType": "Return", - "src": "9485:13:2" - } - ] - }, - "documentation": "Selects state deltas from start up to, but not including, the stop number*", - "id": 1521, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1459, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1452, - "src": "9133:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1460, - "modifierName": { - "argumentTypes": null, - "id": 1458, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "9116:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "9116:24:2" - } - ], - "name": "getStateDeltaHashes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1457, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1452, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9053:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1451, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9053:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1454, - "name": "start", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9069:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1453, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9069:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1456, - "name": "stop", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9081:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1455, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9081:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9052:39:2" - }, - "payable": false, - "returnParameters": { - "id": 1464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1463, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9154:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1461, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9154:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1462, - "length": null, - "nodeType": "ArrayTypeName", - "src": "9154:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9153:11:2" - }, - "scope": 2657, - "src": "9024:481:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1570, - "nodeType": "Block", - "src": "9649:284:2", - "statements": [ - { - "assignments": [ - 1534 - ], - "declarations": [ - { - "constant": false, - "id": 1534, - "name": "valid", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9659:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1533, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9659:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1536, - "initialValue": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 1535, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9672:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "nodeType": "VariableDeclarationStatement", - "src": "9659:18:2" - }, - { - "body": { - "id": 1566, - "nodeType": "Block", - "src": "9756:149:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1551, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "9773:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1553, - "indexExpression": { - "argumentTypes": null, - "id": 1552, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1523, - "src": "9783:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9773:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1554, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "9773:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1556, - "indexExpression": { - "argumentTypes": null, - "id": 1555, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1538, - "src": "9808:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9773:37:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1557, - "name": "stateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1525, - "src": "9814:14:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "9773:55:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1565, - "nodeType": "IfStatement", - "src": "9769:126:2", - "trueBody": { - "id": 1564, - "nodeType": "Block", - "src": "9830:65:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1559, - "name": "valid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1534, - "src": "9847:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1560, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9855:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "9847:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1562, - "nodeType": "ExpressionStatement", - "src": "9847:12:2" - }, - { - "id": 1563, - "nodeType": "Break", - "src": "9876:5:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1541, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1538, - "src": "9704:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1542, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "9708:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1544, - "indexExpression": { - "argumentTypes": null, - "id": 1543, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1523, - "src": "9718:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9708:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1545, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "9708:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1546, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9708:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9704:45:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1567, - "initializationExpression": { - "assignments": [ - 1538 - ], - "declarations": [ - { - "constant": false, - "id": 1538, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9692:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1537, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9692:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1540, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1539, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9701:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "9692:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "9751:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1548, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1538, - "src": "9751:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1550, - "nodeType": "ExpressionStatement", - "src": "9751:3:2" - }, - "nodeType": "ForStatement", - "src": "9687:218:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1568, - "name": "valid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1534, - "src": "9921:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1532, - "id": 1569, - "nodeType": "Return", - "src": "9914:12:2" - } - ] - }, - "documentation": null, - "id": 1571, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1528, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1523, - "src": "9618:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1529, - "modifierName": { - "argumentTypes": null, - "id": 1527, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "9601:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "9601:24:2" - } - ], - "name": "isValidDeltaHash", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1526, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1523, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9537:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1522, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9537:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1525, - "name": "stateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9553:22:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1524, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9553:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9536:40:2" - }, - "payable": false, - "returnParameters": { - "id": 1532, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1531, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9639:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1530, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9639:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9638:6:2" - }, - "scope": 2657, - "src": "9511:422:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1638, - "nodeType": "Block", - "src": "10121:371:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1583, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10139:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1585, - "indexExpression": { - "argumentTypes": null, - "id": 1584, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10145:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10139:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1586, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 920, - "src": "10139:20:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1587, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10163:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "10139:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5461736b20616c72656164792065786973742e", - "id": 1589, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10168:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bc6ba0dbf698c73239ebe06639f1000e8b0940a7d6a986a655fda518ab50ea8f", - "typeString": "literal_string \"Task already exist.\"" - }, - "value": "Task already exist." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bc6ba0dbf698c73239ebe06639f1000e8b0940a7d6a986a655fda518ab50ea8f", - "typeString": "literal_string \"Task already exist.\"" - } - ], - "id": 1582, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "10131:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10131:59:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1591, - "nodeType": "ExpressionStatement", - "src": "10131:59:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1592, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10201:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1594, - "indexExpression": { - "argumentTypes": null, - "id": 1593, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10207:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10201:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1595, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "fee", - "nodeType": "MemberAccess", - "referencedDeclaration": 912, - "src": "10201:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1596, - "name": "fee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1575, - "src": "10221:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10201:23:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1598, - "nodeType": "ExpressionStatement", - "src": "10201:23:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1599, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10234:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1601, - "indexExpression": { - "argumentTypes": null, - "id": 1600, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10240:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10234:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1602, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "token", - "nodeType": "MemberAccess", - "referencedDeclaration": 914, - "src": "10234:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1603, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1577, - "src": "10256:5:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10234:27:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1605, - "nodeType": "ExpressionStatement", - "src": "10234:27:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1606, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10271:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1608, - "indexExpression": { - "argumentTypes": null, - "id": 1607, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10277:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10271:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1609, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "tokenValue", - "nodeType": "MemberAccess", - "referencedDeclaration": 916, - "src": "10271:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1610, - "name": "tokenValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1579, - "src": "10298:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10271:37:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1612, - "nodeType": "ExpressionStatement", - "src": "10271:37:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1613, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10318:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1615, - "indexExpression": { - "argumentTypes": null, - "id": 1614, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10324:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10318:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1616, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 920, - "src": "10318:20:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1617, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "10341:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10341:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10318:33:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1620, - "nodeType": "ExpressionStatement", - "src": "10318:33:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1621, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10361:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1623, - "indexExpression": { - "argumentTypes": null, - "id": 1622, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10367:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10361:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1624, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "10361:20:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1625, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "10384:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1626, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "RecordCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10384:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "10361:47:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "id": 1628, - "nodeType": "ExpressionStatement", - "src": "10361:47:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1630, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10442:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1631, - "name": "fee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1575, - "src": "10450:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1632, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1577, - "src": "10455:5:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1633, - "name": "tokenValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1579, - "src": "10462:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1634, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "10474:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1635, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10474:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1629, - "name": "TaskRecordCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "10424:17:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$_t_address_$returns$__$", - "typeString": "function (bytes32,uint256,address,uint256,address)" - } - }, - "id": 1636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10424:61:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1637, - "nodeType": "EmitStatement", - "src": "10419:66:2" - } - ] - }, - "documentation": "Store task record\n ", - "id": 1639, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "createTaskRecord", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1580, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1573, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1639, - "src": "10019:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1572, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10019:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1575, - "name": "fee", - "nodeType": "VariableDeclaration", - "scope": 1639, - "src": "10043:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1574, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10043:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1577, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 1639, - "src": "10061:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1576, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10061:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1579, - "name": "tokenValue", - "nodeType": "VariableDeclaration", - "scope": 1639, - "src": "10084:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1578, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10084:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10009:96:2" - }, - "payable": false, - "returnParameters": { - "id": 1581, - "nodeType": "ParameterList", - "parameters": [], - "src": "10121:0:2" - }, - "scope": 2657, - "src": "9984:508:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1741, - "nodeType": "Block", - "src": "10648:497:2", - "statements": [ - { - "body": { - "id": 1730, - "nodeType": "Block", - "src": "10700:358:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1666, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10722:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1670, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1667, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10728:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1669, - "indexExpression": { - "argumentTypes": null, - "id": 1668, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10736:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10728:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10722:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1671, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 920, - "src": "10722:24:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1672, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10750:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "10722:31:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5461736b20616c72656164792065786973742e", - "id": 1674, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10755:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bc6ba0dbf698c73239ebe06639f1000e8b0940a7d6a986a655fda518ab50ea8f", - "typeString": "literal_string \"Task already exist.\"" - }, - "value": "Task already exist." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bc6ba0dbf698c73239ebe06639f1000e8b0940a7d6a986a655fda518ab50ea8f", - "typeString": "literal_string \"Task already exist.\"" - } - ], - "id": 1665, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "10714:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10714:63:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1676, - "nodeType": "ExpressionStatement", - "src": "10714:63:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1677, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10792:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1681, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1678, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10798:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1680, - "indexExpression": { - "argumentTypes": null, - "id": 1679, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10806:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10798:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10792:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1682, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "fee", - "nodeType": "MemberAccess", - "referencedDeclaration": 912, - "src": "10792:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1683, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1645, - "src": "10816:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1685, - "indexExpression": { - "argumentTypes": null, - "id": 1684, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10821:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10816:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10792:31:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1687, - "nodeType": "ExpressionStatement", - "src": "10792:31:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1688, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10837:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1692, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1689, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10843:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1691, - "indexExpression": { - "argumentTypes": null, - "id": 1690, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10851:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10843:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10837:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1693, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "token", - "nodeType": "MemberAccess", - "referencedDeclaration": 914, - "src": "10837:23:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1694, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1648, - "src": "10863:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 1696, - "indexExpression": { - "argumentTypes": null, - "id": 1695, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10870:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10863:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10837:35:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1698, - "nodeType": "ExpressionStatement", - "src": "10837:35:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1699, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10886:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1703, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1700, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10892:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1702, - "indexExpression": { - "argumentTypes": null, - "id": 1701, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10900:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10892:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10886:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1704, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "tokenValue", - "nodeType": "MemberAccess", - "referencedDeclaration": 916, - "src": "10886:28:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1705, - "name": "tokenValues", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1651, - "src": "10917:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1707, - "indexExpression": { - "argumentTypes": null, - "id": 1706, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10929:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10917:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10886:45:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1709, - "nodeType": "ExpressionStatement", - "src": "10886:45:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1710, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10945:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1714, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1711, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10951:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1713, - "indexExpression": { - "argumentTypes": null, - "id": 1712, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10959:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10951:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10945:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1715, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 920, - "src": "10945:24:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1716, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "10972:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10972:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10945:37:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1719, - "nodeType": "ExpressionStatement", - "src": "10945:37:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1728, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1720, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10996:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1724, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1721, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "11002:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1723, - "indexExpression": { - "argumentTypes": null, - "id": 1722, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "11010:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11002:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10996:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1725, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "10996:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1726, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "11023:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1727, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "RecordCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11023:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "10996:51:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "id": 1729, - "nodeType": "ExpressionStatement", - "src": "10996:51:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1658, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10675:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1659, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10679:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10679:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10675:18:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1731, - "initializationExpression": { - "assignments": [ - 1655 - ], - "declarations": [ - { - "constant": false, - "id": 1655, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10663:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1654, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10663:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1657, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1656, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10672:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10663:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10695:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1662, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10695:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1664, - "nodeType": "ExpressionStatement", - "src": "10695:3:2" - }, - "nodeType": "ForStatement", - "src": "10658:400:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1733, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "11091:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - { - "argumentTypes": null, - "id": 1734, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1645, - "src": "11100:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1735, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1648, - "src": "11106:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 1736, - "name": "tokenValues", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1651, - "src": "11114:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1737, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "11127:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11127:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1732, - "name": "TaskRecordsCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1041, - "src": "11072:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (bytes32[] memory,uint256[] memory,address[] memory,uint256[] memory,address)" - } - }, - "id": 1739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11072:66:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1740, - "nodeType": "EmitStatement", - "src": "11067:71:2" - } - ] - }, - "documentation": null, - "id": 1742, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "createTaskRecords", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1652, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1642, - "name": "taskIds", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10534:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1640, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10534:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1641, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10534:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1645, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10561:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1643, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10561:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1644, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10561:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1648, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10582:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1646, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10582:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1647, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10582:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1651, - "name": "tokenValues", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10608:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1649, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10608:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1650, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10608:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10524:108:2" - }, - "payable": false, - "returnParameters": { - "id": 1653, - "nodeType": "ParameterList", - "parameters": [], - "src": "10648:0:2" - }, - "scope": 2657, - "src": "10498:647:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1754, - "nodeType": "Block", - "src": "11317:116:2", - "statements": [ - { - "externalReferences": [ - { - "data": { - "declaration": 1748, - "isOffset": false, - "isSlot": false, - "src": "11405:4:2", - "valueSize": 1 - } - }, - { - "data": { - "declaration": 1748, - "isOffset": false, - "isSlot": false, - "src": "11386:4:2", - "valueSize": 1 - } - }, - { - "success": { - "declaration": 1751, - "isOffset": false, - "isSlot": false, - "src": "11350:7:2", - "valueSize": 1 - } - }, - { - "to": { - "declaration": 1744, - "isOffset": false, - "isSlot": false, - "src": "11371:2:2", - "valueSize": 1 - } - }, - { - "value": { - "declaration": 1746, - "isOffset": false, - "isSlot": false, - "src": "11375:5:2", - "valueSize": 1 - } - } - ], - "id": 1753, - "nodeType": "InlineAssembly", - "operations": "{\n success := call(gas(), to, value, add(data, 0x20), mload(data), 0, 0)\n}", - "src": "11327:106:2" - } - ] - }, - "documentation": null, - "id": 1755, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "executeCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1749, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1744, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1755, - "src": "11234:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1743, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11234:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1746, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1755, - "src": "11246:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1745, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11246:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1748, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 1755, - "src": "11261:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1747, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11261:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11233:39:2" - }, - "payable": false, - "returnParameters": { - "id": 1752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1751, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1755, - "src": "11299:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1750, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11299:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11298:14:2" - }, - "scope": 2657, - "src": "11213:220:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1852, - "nodeType": "Block", - "src": "11644:932:2", - "statements": [ - { - "assignments": [ - 1771 - ], - "declarations": [ - { - "constant": false, - "id": 1771, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11654:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1770, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11654:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1777, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1772, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "11667:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1774, - "indexExpression": { - "argumentTypes": null, - "id": 1773, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1757, - "src": "11677:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11667:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1775, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "11667:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1776, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11667:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11654:54:2" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1780, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1778, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1771, - "src": "11722:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1779, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11731:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11722:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1804, - "nodeType": "Block", - "src": "11847:136:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1800, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1790, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1761, - "src": "11869:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1791, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "11889:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1793, - "indexExpression": { - "argumentTypes": null, - "id": 1792, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1757, - "src": "11899:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11889:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1794, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "11889:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1799, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 1797, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11934:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 1795, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1771, - "src": "11924:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1796, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "11924:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1798, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11924:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11889:48:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "11869:68:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c696420696e7075742073746174652064656c74612068617368", - "id": 1801, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11939:32:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3793359aced2caaea2b4a5e03abde718cd02badbe9ea3aab94582eebe44d2119", - "typeString": "literal_string \"Invalid input state delta hash\"" - }, - "value": "Invalid input state delta hash" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3793359aced2caaea2b4a5e03abde718cd02badbe9ea3aab94582eebe44d2119", - "typeString": "literal_string \"Invalid input state delta hash\"" - } - ], - "id": 1789, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "11861:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11861:111:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1803, - "nodeType": "ExpressionStatement", - "src": "11861:111:2" - } - ] - }, - "id": 1805, - "nodeType": "IfStatement", - "src": "11718:265:2", - "trueBody": { - "id": 1788, - "nodeType": "Block", - "src": "11734:107:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1784, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1782, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1761, - "src": "11756:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1783, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11776:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "11756:23:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c696420696e7075742073746174652064656c7461206861736820666f7220656d707479207374617465", - "id": 1785, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11781:48:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_836559a8e1e2ae055c4a308ad98bbb75d85f29059de7757b18c71085d2cd2872", - "typeString": "literal_string \"Invalid input state delta hash for empty state\"" - }, - "value": "Invalid input state delta hash for empty state" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_836559a8e1e2ae055c4a308ad98bbb75d85f29059de7757b18c71085d2cd2872", - "typeString": "literal_string \"Invalid input state delta hash for empty state\"" - } - ], - "id": 1781, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "11748:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1786, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11748:82:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1787, - "nodeType": "ExpressionStatement", - "src": "11748:82:2" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 1811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "11992:43:2", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1806, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "11992:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1808, - "indexExpression": { - "argumentTypes": null, - "id": 1807, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1757, - "src": "12002:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11992:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1809, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "11992:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1810, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11992:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1812, - "nodeType": "ExpressionStatement", - "src": "11992:43:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1813, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "12045:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1815, - "indexExpression": { - "argumentTypes": null, - "id": 1814, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1757, - "src": "12055:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12045:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1816, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "12045:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1818, - "indexExpression": { - "argumentTypes": null, - "id": 1817, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1771, - "src": "12080:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "12045:41:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1819, - "name": "outStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1763, - "src": "12089:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "12045:61:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1821, - "nodeType": "ExpressionStatement", - "src": "12045:61:2" - }, - { - "assignments": [ - 1823 - ], - "declarations": [ - { - "constant": false, - "id": 1823, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "12225:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1822, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12225:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1833, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1827, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1759, - "src": "12267:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1828, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1761, - "src": "12275:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1829, - "name": "outStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1763, - "src": "12293:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1830, - "name": "ethCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1765, - "src": "12312:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 1825, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3435, - "src": "12250:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1826, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12250:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12250:70:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1824, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3442, - "src": "12240:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12240:81:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12225:96:2" - }, - { - "assignments": [ - 1835 - ], - "declarations": [ - { - "constant": false, - "id": 1835, - "name": "workerAddr", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "12450:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1834, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12450:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1840, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1838, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1767, - "src": "12484:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 1836, - "name": "hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1823, - "src": "12471:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "recover", - "nodeType": "MemberAccess", - "referencedDeclaration": 2904, - "src": "12471:12:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_address_$bound_to$_t_bytes32_$", - "typeString": "function (bytes32,bytes memory) pure returns (address)" - } - }, - "id": 1839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12471:17:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12450:38:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1842, - "name": "workerAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1835, - "src": "12506:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1843, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "12520:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1846, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1844, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "12528:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12528:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12520:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1847, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "12520:26:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "12506:40:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c6964207369676e61747572652e", - "id": 1849, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12548:20:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_de618ca49ed109c14f243a6f72f71bc4082410d500e2fcf7ed6cc449e8b19481", - "typeString": "literal_string \"Invalid signature.\"" - }, - "value": "Invalid signature." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_de618ca49ed109c14f243a6f72f71bc4082410d500e2fcf7ed6cc449e8b19481", - "typeString": "literal_string \"Invalid signature.\"" - } - ], - "id": 1841, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "12498:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12498:71:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1851, - "nodeType": "ExpressionStatement", - "src": "12498:71:2" - } - ] - }, - "documentation": null, - "id": 1853, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "verifyReceipt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1757, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11471:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1756, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11471:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1759, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11495:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1758, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11495:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1761, - "name": "inStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11519:24:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1760, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11519:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1763, - "name": "outStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11553:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1762, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11553:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1765, - "name": "ethCall", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11588:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1764, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11588:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1767, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11611:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1766, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11611:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11461:165:2" - }, - "payable": false, - "returnParameters": { - "id": 1769, - "nodeType": "ParameterList", - "parameters": [], - "src": "11644:0:2" - }, - "scope": 2657, - "src": "11439:1137:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1918, - "nodeType": "Block", - "src": "12913:371:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - }, - "id": 1882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1876, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "12931:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1878, - "indexExpression": { - "argumentTypes": null, - "id": 1877, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "12937:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12931:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1879, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "12931:20:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1880, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "12955:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "RecordCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12955:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "12931:48:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c6964207461736b20737461747573", - "id": 1883, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12981:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_35c761622bcc8ab75f9adfaf21a4872a39cd06f2745d5488272d29f1f753f270", - "typeString": "literal_string \"Invalid task status\"" - }, - "value": "Invalid task status" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_35c761622bcc8ab75f9adfaf21a4872a39cd06f2745d5488272d29f1f753f270", - "typeString": "literal_string \"Invalid task status\"" - } - ], - "id": 1875, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "12923:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12923:80:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1885, - "nodeType": "ExpressionStatement", - "src": "12923:80:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1887, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1855, - "src": "13027:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1888, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "13035:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1889, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1859, - "src": "13043:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1890, - "name": "outStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1861, - "src": "13061:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1891, - "name": "ethCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1863, - "src": "13080:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 1892, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1865, - "src": "13089:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1886, - "name": "verifyReceipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1853, - "src": "13013:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,bytes32,bytes32,bytes32,bytes memory,bytes memory)" - } - }, - "id": 1893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13013:80:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1894, - "nodeType": "ExpressionStatement", - "src": "13013:80:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1895, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13104:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1897, - "indexExpression": { - "argumentTypes": null, - "id": 1896, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "13110:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13104:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1898, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "proof", - "nodeType": "MemberAccess", - "referencedDeclaration": 918, - "src": "13104:19:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1899, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1865, - "src": "13126:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "13104:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 1901, - "nodeType": "ExpressionStatement", - "src": "13104:25:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1908, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1902, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13139:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1904, - "indexExpression": { - "argumentTypes": null, - "id": 1903, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "13145:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13139:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1905, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "13139:20:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1906, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "13162:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1907, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "ReceiptVerified", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13162:26:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "13139:49:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "id": 1909, - "nodeType": "ExpressionStatement", - "src": "13139:49:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1911, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "13219:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1912, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1859, - "src": "13227:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1913, - "name": "outStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1861, - "src": "13245:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1914, - "name": "ethCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1863, - "src": "13264:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 1915, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1865, - "src": "13273:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1910, - "name": "ReceiptVerified", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1053, - "src": "13203:15:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (bytes32,bytes32,bytes32,bytes memory,bytes memory)" - } - }, - "id": 1916, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13203:74:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1917, - "nodeType": "EmitStatement", - "src": "13198:79:2" - } - ] - }, - "documentation": "Commit the computation task results on chain", - "id": 1919, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1868, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "12868:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12868:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1870, - "modifierName": { - "argumentTypes": null, - "id": 1867, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "12851:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "12851:28:2" - }, - { - "arguments": [ - { - "argumentTypes": null, - "id": 1872, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1855, - "src": "12901:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1873, - "modifierName": { - "argumentTypes": null, - "id": 1871, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "12884:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "12884:24:2" - } - ], - "name": "commitReceipt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1866, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1855, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12680:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1854, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12680:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1857, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12704:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1856, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12704:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1859, - "name": "inStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12728:24:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1858, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12728:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1861, - "name": "outStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12762:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1860, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12762:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1863, - "name": "ethCall", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12797:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1862, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12797:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1865, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12820:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1864, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12820:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12670:165:2" - }, - "payable": false, - "returnParameters": { - "id": 1874, - "nodeType": "ParameterList", - "parameters": [], - "src": "12913:0:2" - }, - "scope": 2657, - "src": "12648:636:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2020, - "nodeType": "Block", - "src": "13573:545:2", - "statements": [ - { - "body": { - "id": 2010, - "nodeType": "Block", - "src": "13625:390:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - }, - "id": 1966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1958, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13697:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1962, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1959, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13703:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1961, - "indexExpression": { - "argumentTypes": null, - "id": 1960, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13711:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13703:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13697:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1963, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "13697:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1964, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "13725:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "RecordCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13725:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "13697:52:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c6964207461736b20737461747573", - "id": 1967, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13751:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_35c761622bcc8ab75f9adfaf21a4872a39cd06f2745d5488272d29f1f753f270", - "typeString": "literal_string \"Invalid task status\"" - }, - "value": "Invalid task status" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_35c761622bcc8ab75f9adfaf21a4872a39cd06f2745d5488272d29f1f753f270", - "typeString": "literal_string \"Invalid task status\"" - } - ], - "id": 1957, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "13689:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13689:84:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1969, - "nodeType": "ExpressionStatement", - "src": "13689:84:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1971, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1921, - "src": "13801:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1972, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13809:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1974, - "indexExpression": { - "argumentTypes": null, - "id": 1973, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13817:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13809:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1975, - "name": "inStateDeltaHashes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1927, - "src": "13821:18:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1977, - "indexExpression": { - "argumentTypes": null, - "id": 1976, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13840:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13821:21:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1978, - "name": "outStateDeltaHashes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1930, - "src": "13844:19:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1980, - "indexExpression": { - "argumentTypes": null, - "id": 1979, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13864:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13844:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1981, - "name": "ethCalls", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1933, - "src": "13868:8:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 1983, - "indexExpression": { - "argumentTypes": null, - "id": 1982, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13877:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13868:11:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1984, - "name": "sigs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1936, - "src": "13881:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 1986, - "indexExpression": { - "argumentTypes": null, - "id": 1985, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13886:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13881:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - ], - "id": 1970, - "name": "verifyReceipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1853, - "src": "13787:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,bytes32,bytes32,bytes32,bytes memory,bytes memory)" - } - }, - "id": 1987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13787:102:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1988, - "nodeType": "ExpressionStatement", - "src": "13787:102:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1989, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13904:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1993, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1990, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13910:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1992, - "indexExpression": { - "argumentTypes": null, - "id": 1991, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13918:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13910:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13904:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1994, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "proof", - "nodeType": "MemberAccess", - "referencedDeclaration": 918, - "src": "13904:23:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1995, - "name": "sigs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1936, - "src": "13930:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 1997, - "indexExpression": { - "argumentTypes": null, - "id": 1996, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13935:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13930:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - }, - "src": "13904:33:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 1999, - "nodeType": "ExpressionStatement", - "src": "13904:33:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2008, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2000, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13951:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 2004, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2001, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13957:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 2003, - "indexExpression": { - "argumentTypes": null, - "id": 2002, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13965:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13957:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13951:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 2005, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "13951:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2006, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "13978:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 2007, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "ReceiptVerified", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13978:26:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "13951:53:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "id": 2009, - "nodeType": "ExpressionStatement", - "src": "13951:53:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1950, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13600:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1951, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13604:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13604:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13600:18:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2011, - "initializationExpression": { - "assignments": [ - 1947 - ], - "declarations": [ - { - "constant": false, - "id": 1947, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13588:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1946, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "13588:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1949, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1948, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13597:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "13588:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "13620:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1954, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13620:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1956, - "nodeType": "ExpressionStatement", - "src": "13620:3:2" - }, - "nodeType": "ForStatement", - "src": "13583:432:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2013, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "14046:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - { - "argumentTypes": null, - "id": 2014, - "name": "inStateDeltaHashes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1927, - "src": "14055:18:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - { - "argumentTypes": null, - "id": 2015, - "name": "outStateDeltaHashes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1930, - "src": "14075:19:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - { - "argumentTypes": null, - "id": 2016, - "name": "ethCalls", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1933, - "src": "14096:8:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 2017, - "name": "sigs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1936, - "src": "14106:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - ], - "id": 2012, - "name": "ReceiptsVerified", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1070, - "src": "14029:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_bytes_memory_$dyn_memory_ptr_$_t_array$_t_bytes_memory_$dyn_memory_ptr_$returns$__$", - "typeString": "function (bytes32[] memory,bytes32[] memory,bytes32[] memory,bytes memory[] memory,bytes memory[] memory)" - } - }, - "id": 2018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14029:82:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2019, - "nodeType": "EmitStatement", - "src": "14024:87:2" - } - ] - }, - "documentation": null, - "id": 2021, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1939, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "13528:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13528:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1941, - "modifierName": { - "argumentTypes": null, - "id": 1938, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "13511:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "13511:28:2" - }, - { - "arguments": [ - { - "argumentTypes": null, - "id": 1943, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1921, - "src": "13561:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1944, - "modifierName": { - "argumentTypes": null, - "id": 1942, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "13544:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "13544:24:2" - } - ], - "name": "commitReceipts", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1937, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1921, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13323:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1920, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13323:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1924, - "name": "taskIds", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13347:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1922, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13347:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1923, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13347:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1927, - "name": "inStateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13374:28:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1925, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13374:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1926, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13374:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1930, - "name": "outStateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13412:29:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1928, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13412:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1929, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13412:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1933, - "name": "ethCalls", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13451:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 1931, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13451:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 1932, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13451:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1936, - "name": "sigs", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13477:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 1934, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13477:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 1935, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13477:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13313:182:2" - }, - "payable": false, - "returnParameters": { - "id": 1945, - "nodeType": "ParameterList", - "parameters": [], - "src": "13573:0:2" - }, - "scope": 2657, - "src": "13290:828:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2048, - "nodeType": "Block", - "src": "14291:132:2", - "statements": [ - { - "assignments": [ - 2031 - ], - "declarations": [ - { - "constant": false, - "id": 2031, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14301:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2030, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "14301:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2038, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2035, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2023, - "src": "14343:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2033, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3435, - "src": "14326:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2034, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14326:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14326:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2032, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3442, - "src": "14316:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14316:33:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14301:48:2" - }, - { - "assignments": [ - 2040 - ], - "declarations": [ - { - "constant": false, - "id": 2040, - "name": "signer", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14359:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2039, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14359:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2045, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2043, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2025, - "src": "14389:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2041, - "name": "hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2031, - "src": "14376:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 2042, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "recover", - "nodeType": "MemberAccess", - "referencedDeclaration": 2904, - "src": "14376:12:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_address_$bound_to$_t_bytes32_$", - "typeString": "function (bytes32,bytes memory) pure returns (address)" - } - }, - "id": 2044, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14376:17:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14359:34:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2046, - "name": "signer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2040, - "src": "14410:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2029, - "id": 2047, - "nodeType": "Return", - "src": "14403:13:2" - } - ] - }, - "documentation": null, - "id": 2049, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "verifyParamsSig", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2026, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2023, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14218:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2022, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14218:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2025, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14232:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2024, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "14232:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14217:25:2" - }, - "payable": false, - "returnParameters": { - "id": 2029, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2028, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14278:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2027, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14278:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14277:9:2" - }, - "scope": 2657, - "src": "14193:230:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2218, - "nodeType": "Block", - "src": "14799:1905:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2067, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2061, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "15016:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2064, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2062, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "15024:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15024:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15016:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2065, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "15016:26:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2066, - "name": "principal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 928, - "src": "15046:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15016:39:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f6e6c7920746865205072696e636970616c2063616e20757064617465207468652073656564", - "id": 2068, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15057:40:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bc5bcb5ed31af9f048e73c2cbe5de0569fa9bcd43014614ad5223290fd42066d", - "typeString": "literal_string \"Only the Principal can update the seed\"" - }, - "value": "Only the Principal can update the seed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bc5bcb5ed31af9f048e73c2cbe5de0569fa9bcd43014614ad5223290fd42066d", - "typeString": "literal_string \"Only the Principal can update the seed\"" - } - ], - "id": 2060, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "15008:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15008:90:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2070, - "nodeType": "ExpressionStatement", - "src": "15008:90:2" - }, - { - "assignments": [ - 2072 - ], - "declarations": [ - { - "constant": false, - "id": 2072, - "name": "paramIndex", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "15419:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2071, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "15419:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2074, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2073, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15437:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15419:19:2" - }, - { - "body": { - "id": 2114, - "nodeType": "Block", - "src": "15499:363:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2086, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15601:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2088, - "indexExpression": { - "argumentTypes": null, - "id": 2087, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15615:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15601:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2089, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "15601:34:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2090, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15639:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "15601:39:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2098, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15723:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2100, - "indexExpression": { - "argumentTypes": null, - "id": 2099, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15737:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15723:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2101, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "15723:34:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2102, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15760:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2104, - "indexExpression": { - "argumentTypes": null, - "id": 2103, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15774:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15760:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2105, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "15760:42:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15723:79:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2112, - "nodeType": "IfStatement", - "src": "15719:133:2", - "trueBody": { - "id": 2111, - "nodeType": "Block", - "src": "15804:48:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2107, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15822:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2108, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15835:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15822:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2110, - "nodeType": "ExpressionStatement", - "src": "15822:15:2" - } - ] - } - }, - "id": 2113, - "nodeType": "IfStatement", - "src": "15597:255:2", - "trueBody": { - "id": 2097, - "nodeType": "Block", - "src": "15642:71:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2094, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2092, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15660:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2093, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15673:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15660:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2095, - "nodeType": "ExpressionStatement", - "src": "15660:15:2" - }, - { - "id": 2096, - "nodeType": "Break", - "src": "15693:5:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2079, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15466:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2080, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15471:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15471:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15466:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2115, - "initializationExpression": { - "assignments": [ - 2076 - ], - "declarations": [ - { - "constant": false, - "id": 2076, - "name": "pi", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "15453:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2075, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "15453:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2078, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2077, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15463:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15453:11:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "15493:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2083, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15493:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2085, - "nodeType": "ExpressionStatement", - "src": "15493:4:2" - }, - "nodeType": "ForStatement", - "src": "15448:414:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2116, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15871:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2118, - "indexExpression": { - "argumentTypes": null, - "id": 2117, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15885:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15871:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2119, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "15871:42:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2120, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3438, - "src": "15916:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15916:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15871:57:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2123, - "nodeType": "ExpressionStatement", - "src": "15871:57:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2124, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15938:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2126, - "indexExpression": { - "argumentTypes": null, - "id": 2125, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15952:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15938:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2127, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "seed", - "nodeType": "MemberAccess", - "referencedDeclaration": 947, - "src": "15938:30:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2128, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2051, - "src": "15971:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15938:37:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2130, - "nodeType": "ExpressionStatement", - "src": "15938:37:2" - }, - { - "assignments": [ - 2132 - ], - "declarations": [ - { - "constant": false, - "id": 2132, - "name": "workerIndex", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "16026:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2131, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16026:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2134, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2133, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16045:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "16026:20:2" - }, - { - "body": { - "id": 2202, - "nodeType": "Block", - "src": "16109:463:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2146, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "16127:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2150, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2147, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "16135:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2149, - "indexExpression": { - "argumentTypes": null, - "id": 2148, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16151:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16135:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16127:28:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2151, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "16127:36:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 2152, - "name": "stakingThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 985, - "src": "16166:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16127:55:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2201, - "nodeType": "IfStatement", - "src": "16123:439:2", - "trueBody": { - "id": 2200, - "nodeType": "Block", - "src": "16184:378:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "16202:42:2", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2154, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16202:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2156, - "indexExpression": { - "argumentTypes": null, - "id": 2155, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16216:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16202:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2157, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "16202:33:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2158, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16202:40:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2160, - "nodeType": "ExpressionStatement", - "src": "16202:42:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2161, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16262:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2163, - "indexExpression": { - "argumentTypes": null, - "id": 2162, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16276:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16262:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2164, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "16262:33:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2166, - "indexExpression": { - "argumentTypes": null, - "id": 2165, - "name": "workerIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "16296:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "16262:46:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2167, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "16311:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2169, - "indexExpression": { - "argumentTypes": null, - "id": 2168, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16327:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16311:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "16262:68:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2171, - "nodeType": "ExpressionStatement", - "src": "16262:68:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "16349:43:2", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2172, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16349:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2174, - "indexExpression": { - "argumentTypes": null, - "id": 2173, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16363:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16349:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2175, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "16349:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 2176, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16349:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2178, - "nodeType": "ExpressionStatement", - "src": "16349:43:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2179, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16410:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2181, - "indexExpression": { - "argumentTypes": null, - "id": 2180, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16424:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16410:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2182, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "16410:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 2184, - "indexExpression": { - "argumentTypes": null, - "id": 2183, - "name": "workerIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "16445:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "16410:47:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2185, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "16460:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2189, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2186, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "16468:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2188, - "indexExpression": { - "argumentTypes": null, - "id": 2187, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16484:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16468:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16460:28:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2190, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "16460:36:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16410:86:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2192, - "nodeType": "ExpressionStatement", - "src": "16410:86:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2193, - "name": "workerIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "16515:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 2196, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16545:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 2194, - "name": "workerIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "16529:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "16529:15:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16529:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16515:32:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2199, - "nodeType": "ExpressionStatement", - "src": "16515:32:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2139, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16074:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2140, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "16079:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2141, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16079:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16074:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2203, - "initializationExpression": { - "assignments": [ - 2136 - ], - "declarations": [ - { - "constant": false, - "id": 2136, - "name": "wi", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "16061:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2135, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16061:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2138, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16071:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "16061:11:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2144, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "16103:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2143, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16103:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2145, - "nodeType": "ExpressionStatement", - "src": "16103:4:2" - }, - "nodeType": "ForStatement", - "src": "16056:516:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2205, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2051, - "src": "16607:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2206, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3438, - "src": "16613:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16613:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2208, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16627:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2210, - "indexExpression": { - "argumentTypes": null, - "id": 2209, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16641:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16627:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2211, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "16627:33:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2212, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16662:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2214, - "indexExpression": { - "argumentTypes": null, - "id": 2213, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16676:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16662:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2215, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "16662:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - ], - "id": 2204, - "name": "WorkersParameterized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1013, - "src": "16586:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address[] memory,uint256[] memory)" - } - }, - "id": 2216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16586:111:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2217, - "nodeType": "EmitStatement", - "src": "16581:116:2" - } - ] - }, - "documentation": "Reparameterizing workers with a new seed\nThis should be called for each epoch by the Principal node\n * @param seed The random integer generated by the enclave\n@param sig The random integer signed by the the principal node's enclave", - "id": 2219, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2056, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "14783:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2057, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14783:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 2058, - "modifierName": { - "argumentTypes": null, - "id": 2055, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "14766:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "14766:28:2" - } - ], - "name": "setWorkersParams", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2054, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2051, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "14729:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2050, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "14729:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2053, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "14740:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2052, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "14740:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14728:22:2" - }, - "payable": false, - "returnParameters": { - "id": 2059, - "nodeType": "ParameterList", - "parameters": [], - "src": "14799:0:2" - }, - "scope": 2657, - "src": "14703:2001:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2288, - "nodeType": "Block", - "src": "16803:493:2", - "statements": [ - { - "assignments": [ - 2227 - ], - "declarations": [ - { - "constant": false, - "id": 2227, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 2289, - "src": "16872:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": { - "id": 2226, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "16872:4:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2230, - "initialValue": { - "argumentTypes": null, - "id": 2229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "16885:3:2", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2228, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16887:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_-1_by_1", - "typeString": "int_const -1" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16872:16:2" - }, - { - "body": { - "id": 2274, - "nodeType": "Block", - "src": "16946:227:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 2265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2242, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16964:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2244, - "indexExpression": { - "argumentTypes": null, - "id": 2243, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "16978:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16964:16:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2245, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "16964:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 2246, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2221, - "src": "17001:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16964:48:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 2263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 2251, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2248, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17017:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2250, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "17026:3:2", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2249, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17028:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_-1_by_1", - "typeString": "int_const -1" - } - }, - "src": "17017:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2252, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "17033:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2254, - "indexExpression": { - "argumentTypes": null, - "id": 2253, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "17047:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17033:16:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2255, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "17033:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2256, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "17069:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2260, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2258, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17088:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - ], - "id": 2257, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "17083:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 2259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17083:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17069:26:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2261, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "17069:43:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17033:79:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "17017:95:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 2264, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "17016:97:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "16964:149:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2273, - "nodeType": "IfStatement", - "src": "16960:203:2", - "trueBody": { - "id": 2272, - "nodeType": "Block", - "src": "17115:48:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2266, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17133:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2268, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "17146:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "17141:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int8_$", - "typeString": "type(int8)" - }, - "typeName": "int8" - }, - "id": 2269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:7:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "17133:15:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "id": 2271, - "nodeType": "ExpressionStatement", - "src": "17133:15:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2235, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "16915:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2236, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16919:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16919:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16915:24:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2275, - "initializationExpression": { - "assignments": [ - 2232 - ], - "declarations": [ - { - "constant": false, - "id": 2232, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 2289, - "src": "16903:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2231, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16903:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2234, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2233, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16912:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "16903:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "16941:3:2", - "subExpression": { - "argumentTypes": null, - "id": 2239, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "16941:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2241, - "nodeType": "ExpressionStatement", - "src": "16941:3:2" - }, - "nodeType": "ForStatement", - "src": "16898:275:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 2280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2277, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17190:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 2279, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "17199:3:2", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17201:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_-1_by_1", - "typeString": "int_const -1" - } - }, - "src": "17190:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f20776f726b65727320706172616d657465727320656e74727920666f722073706563696669656420626c6f636b206e756d626572", - "id": 2281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17204:56:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e9fab335fbd58bdc8f1aa0d5f38123bc711e5112f8f3f95c75615d3d06674c6d", - "typeString": "literal_string \"No workers parameters entry for specified block number\"" - }, - "value": "No workers parameters entry for specified block number" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e9fab335fbd58bdc8f1aa0d5f38123bc711e5112f8f3f95c75615d3d06674c6d", - "typeString": "literal_string \"No workers parameters entry for specified block number\"" - } - ], - "id": 2276, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "17182:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17182:79:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2283, - "nodeType": "ExpressionStatement", - "src": "17182:79:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2285, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17283:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - ], - "id": 2284, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "17278:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 2286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17278:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2225, - "id": 2287, - "nodeType": "Return", - "src": "17271:18:2" - } - ] - }, - "documentation": null, - "id": 2289, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getWorkerParamsIndex", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2222, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2221, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 2289, - "src": "16740:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2220, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16740:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16739:18:2" - }, - "payable": false, - "returnParameters": { - "id": 2225, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2224, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2289, - "src": "16793:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2223, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16793:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16792:6:2" - }, - "scope": 2657, - "src": "16710:586:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2326, - "nodeType": "Block", - "src": "17409:211:2", - "statements": [ - { - "assignments": [ - 2305 - ], - "declarations": [ - { - "constant": false, - "id": 2305, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17419:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2304, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17419:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2309, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2307, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2291, - "src": "17453:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2306, - "name": "getWorkerParamsIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2289, - "src": "17432:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 2308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17432:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17419:46:2" - }, - { - "assignments": [ - 2311 - ], - "declarations": [ - { - "constant": false, - "id": 2311, - "name": "params", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17475:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams" - }, - "typeName": { - "contractScope": null, - "id": 2310, - "name": "WorkersParams", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 948, - "src": "17475:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage_ptr", - "typeString": "struct Enigma.WorkersParams" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2315, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2312, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "17505:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2314, - "indexExpression": { - "argumentTypes": null, - "id": 2313, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2305, - "src": "17519:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17505:20:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17475:50:2" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2316, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "17543:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2317, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "17543:23:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2318, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "17568:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2319, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "seed", - "nodeType": "MemberAccess", - "referencedDeclaration": 947, - "src": "17568:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2320, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "17581:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2321, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "17581:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2322, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "17597:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2323, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "17597:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - } - ], - "id": 2324, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "17542:71:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_array$_t_address_$dyn_memory_$_t_array$_t_uint256_$dyn_memory_$", - "typeString": "tuple(uint256,uint256,address[] memory,uint256[] memory)" - } - }, - "functionReturnParameters": 2303, - "id": 2325, - "nodeType": "Return", - "src": "17535:78:2" - } - ] - }, - "documentation": null, - "id": 2327, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getWorkerParams", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2292, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2291, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17327:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2290, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17327:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17326:18:2" - }, - "payable": false, - "returnParameters": { - "id": 2303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2294, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17378:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2293, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17378:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2296, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17384:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2295, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17384:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2299, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17390:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2297, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17390:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2298, - "length": null, - "nodeType": "ArrayTypeName", - "src": "17390:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2302, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17401:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 2300, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17401:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2301, - "length": null, - "nodeType": "ArrayTypeName", - "src": "17401:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17377:31:2" - }, - "scope": 2657, - "src": "17302:318:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2446, - "nodeType": "Block", - "src": "17716:728:2", - "statements": [ - { - "assignments": [ - 2336 - ], - "declarations": [ - { - "constant": false, - "id": 2336, - "name": "params", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17726:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams" - }, - "typeName": { - "contractScope": null, - "id": 2335, - "name": "WorkersParams", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 948, - "src": "17726:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage_ptr", - "typeString": "struct Enigma.WorkersParams" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2340, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2337, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "17756:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2339, - "indexExpression": { - "argumentTypes": null, - "id": 2338, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2329, - "src": "17770:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17756:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17726:55:2" - }, - { - "assignments": [ - 2342 - ], - "declarations": [ - { - "constant": false, - "id": 2342, - "name": "tokenCpt", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17791:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2341, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17791:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2344, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2343, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17807:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "17791:17:2" - }, - { - "body": { - "id": 2375, - "nodeType": "Block", - "src": "17867:130:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2357, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "17885:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2358, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "17885:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2360, - "indexExpression": { - "argumentTypes": null, - "id": 2359, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "17900:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17885:17:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2361, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17906:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "17885:24:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2374, - "nodeType": "IfStatement", - "src": "17881:106:2", - "trueBody": { - "id": 2373, - "nodeType": "Block", - "src": "17911:76:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2363, - "name": "tokenCpt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2342, - "src": "17929:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2366, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "17953:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2367, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "17953:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - }, - "id": 2369, - "indexExpression": { - "argumentTypes": null, - "id": 2368, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "17969:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17953:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2364, - "name": "tokenCpt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2342, - "src": "17940:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "17940:12:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17940:32:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17929:43:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2372, - "nodeType": "ExpressionStatement", - "src": "17929:43:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2349, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "17835:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2350, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "17839:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2351, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "17839:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2352, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17839:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17835:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2376, - "initializationExpression": { - "assignments": [ - 2346 - ], - "declarations": [ - { - "constant": false, - "id": 2346, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17823:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2345, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17823:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2348, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2347, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17832:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "17823:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "17862:3:2", - "subExpression": { - "argumentTypes": null, - "id": 2354, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "17862:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2356, - "nodeType": "ExpressionStatement", - "src": "17862:3:2" - }, - "nodeType": "ForStatement", - "src": "17818:179:2" - }, - { - "assignments": [ - 2380 - ], - "declarations": [ - { - "constant": false, - "id": 2380, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "18006:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2378, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18006:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2379, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18006:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2386, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2384, - "name": "tokenCpt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2342, - "src": "18046:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2383, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "18032:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 2381, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18036:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2382, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18036:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 2385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18032:23:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18006:49:2" - }, - { - "assignments": [ - 2388 - ], - "declarations": [ - { - "constant": false, - "id": 2388, - "name": "tokenIndex", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "18065:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2387, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18065:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2390, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2389, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18083:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18065:19:2" - }, - { - "body": { - "id": 2442, - "nodeType": "Block", - "src": "18146:269:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2403, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "18164:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2404, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "18164:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2406, - "indexExpression": { - "argumentTypes": null, - "id": 2405, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18179:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18164:18:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2407, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18186:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "18164:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2441, - "nodeType": "IfStatement", - "src": "18160:245:2", - "trueBody": { - "id": 2440, - "nodeType": "Block", - "src": "18191:214:2", - "statements": [ - { - "body": { - "id": 2438, - "nodeType": "Block", - "src": "18259:132:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2422, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2380, - "src": "18281:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2424, - "indexExpression": { - "argumentTypes": null, - "id": 2423, - "name": "tokenIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2388, - "src": "18288:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "18281:18:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2425, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "18302:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2426, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "18302:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2428, - "indexExpression": { - "argumentTypes": null, - "id": 2427, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18317:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18302:18:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "18281:39:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2430, - "nodeType": "ExpressionStatement", - "src": "18281:39:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2436, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2431, - "name": "tokenIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2388, - "src": "18342:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 2434, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18370:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 2432, - "name": "tokenIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2388, - "src": "18355:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2433, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "18355:14:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2435, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18355:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18342:30:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2437, - "nodeType": "ExpressionStatement", - "src": "18342:30:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2413, - "name": "ib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2410, - "src": "18227:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2414, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "18232:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2415, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "18232:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - }, - "id": 2417, - "indexExpression": { - "argumentTypes": null, - "id": 2416, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18248:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18232:19:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18227:24:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2439, - "initializationExpression": { - "assignments": [ - 2410 - ], - "declarations": [ - { - "constant": false, - "id": 2410, - "name": "ib", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "18214:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2409, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18214:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2412, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2411, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18224:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18214:11:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18253:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2419, - "name": "ib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2410, - "src": "18253:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2421, - "nodeType": "ExpressionStatement", - "src": "18253:4:2" - }, - "nodeType": "ForStatement", - "src": "18209:182:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2395, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18112:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2396, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "18117:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2397, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "18117:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18117:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18112:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2443, - "initializationExpression": { - "assignments": [ - 2392 - ], - "declarations": [ - { - "constant": false, - "id": 2392, - "name": "ia", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "18099:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2391, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18099:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2394, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2393, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18109:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18099:11:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18140:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2400, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18140:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2402, - "nodeType": "ExpressionStatement", - "src": "18140:4:2" - }, - "nodeType": "ForStatement", - "src": "18094:321:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2444, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2380, - "src": "18431:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 2334, - "id": 2445, - "nodeType": "Return", - "src": "18424:13:2" - } - ] - }, - "documentation": null, - "id": 2447, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "compileTokens", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2330, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2329, - "name": "paramIndex", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17649:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2328, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17649:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17648:17:2" - }, - "payable": false, - "returnParameters": { - "id": 2334, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2333, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17701:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2331, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17701:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2332, - "length": null, - "nodeType": "ArrayTypeName", - "src": "17701:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17700:11:2" - }, - "scope": 2657, - "src": "17626:818:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2582, - "nodeType": "Block", - "src": "18532:1194:2", - "statements": [ - { - "assignments": [ - 2455 - ], - "declarations": [ - { - "constant": false, - "id": 2455, - "name": "paramIndex", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18641:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2454, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18641:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2459, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2457, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2449, - "src": "18680:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2456, - "name": "getWorkerParamsIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2289, - "src": "18659:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 2458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18659:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18641:51:2" - }, - { - "assignments": [ - 2463 - ], - "declarations": [ - { - "constant": false, - "id": 2463, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18702:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2461, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18702:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2462, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18702:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2467, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2465, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2455, - "src": "18742:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2464, - "name": "compileTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2447, - "src": "18728:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) view returns (address[] memory)" - } - }, - "id": 2466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18728:25:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18702:51:2" - }, - { - "assignments": [ - 2469 - ], - "declarations": [ - { - "constant": false, - "id": 2469, - "name": "params", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18763:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams" - }, - "typeName": { - "contractScope": null, - "id": 2468, - "name": "WorkersParams", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 948, - "src": "18763:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage_ptr", - "typeString": "struct Enigma.WorkersParams" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2473, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2470, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "18793:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2472, - "indexExpression": { - "argumentTypes": null, - "id": 2471, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2455, - "src": "18807:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18793:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18763:55:2" - }, - { - "assignments": [ - 2477 - ], - "declarations": [ - { - "constant": false, - "id": 2477, - "name": "selectedWorkers", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18829:32:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2475, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18829:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2476, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18829:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2483, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2481, - "name": "workerGroupSize", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 987, - "src": "18878:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "18864:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 2478, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18868:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2479, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18868:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 2482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18864:30:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18829:65:2" - }, - { - "body": { - "id": 2580, - "nodeType": "Block", - "src": "18953:767:2", - "statements": [ - { - "body": { - "id": 2573, - "nodeType": "Block", - "src": "18970:692:2", - "statements": [ - { - "assignments": [ - 2495 - ], - "declarations": [ - { - "constant": false, - "id": 2495, - "name": "nonce", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18988:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2494, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18988:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2497, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2496, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19001:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18988:14:2" - }, - { - "assignments": [ - 2499 - ], - "declarations": [ - { - "constant": false, - "id": 2499, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19020:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2498, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "19020:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2510, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2503, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2495, - "src": "19062:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2504, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2469, - "src": "19069:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2505, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "seed", - "nodeType": "MemberAccess", - "referencedDeclaration": 947, - "src": "19069:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2506, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2449, - "src": "19082:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2507, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2451, - "src": "19095:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2501, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3435, - "src": "19045:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2502, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19045:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2508, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19045:57:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2500, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3442, - "src": "19035:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19035:68:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19020:83:2" - }, - { - "assignments": [ - 2512 - ], - "declarations": [ - { - "constant": false, - "id": 2512, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19121:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2511, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19121:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2519, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2514, - "name": "hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2499, - "src": "19142:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 2513, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19134:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 2515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19134:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2516, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2463, - "src": "19150:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19150:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19134:29:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19121:42:2" - }, - { - "assignments": [ - 2521 - ], - "declarations": [ - { - "constant": false, - "id": 2521, - "name": "worker", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19181:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2520, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19181:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2525, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2522, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2463, - "src": "19198:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2524, - "indexExpression": { - "argumentTypes": null, - "id": 2523, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2512, - "src": "19205:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19198:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19181:30:2" - }, - { - "assignments": [ - 2527 - ], - "declarations": [ - { - "constant": false, - "id": 2527, - "name": "dup", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19229:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2526, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "19229:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2529, - "initialValue": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 2528, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19240:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "nodeType": "VariableDeclarationStatement", - "src": "19229:16:2" - }, - { - "body": { - "id": 2552, - "nodeType": "Block", - "src": "19312:165:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2544, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2540, - "name": "worker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2521, - "src": "19338:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2541, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "19348:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2543, - "indexExpression": { - "argumentTypes": null, - "id": 2542, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2531, - "src": "19364:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19348:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "19338:29:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2551, - "nodeType": "IfStatement", - "src": "19334:125:2", - "trueBody": { - "id": 2550, - "nodeType": "Block", - "src": "19369:90:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2545, - "name": "dup", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2527, - "src": "19395:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2546, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19401:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "19395:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2548, - "nodeType": "ExpressionStatement", - "src": "19395:10:2" - }, - { - "id": 2549, - "nodeType": "Break", - "src": "19431:5:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2533, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2531, - "src": "19277:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2534, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "19282:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19282:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19277:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2553, - "initializationExpression": { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2531, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19268:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2530, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19268:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2532, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "19268:7:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2538, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "19306:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2537, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2531, - "src": "19306:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2539, - "nodeType": "ExpressionStatement", - "src": "19306:4:2" - }, - "nodeType": "ForStatement", - "src": "19263:214:2" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 2556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2554, - "name": "dup", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2527, - "src": "19498:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 2555, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19505:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "19498:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2571, - "nodeType": "Block", - "src": "19587:61:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2564, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2495, - "src": "19609:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 2567, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19627:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 2565, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2495, - "src": "19617:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "19617:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19617:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19609:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2570, - "nodeType": "ExpressionStatement", - "src": "19609:20:2" - } - ] - }, - "id": 2572, - "nodeType": "IfStatement", - "src": "19494:154:2", - "trueBody": { - "id": 2563, - "nodeType": "Block", - "src": "19512:69:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2557, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "19534:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2559, - "indexExpression": { - "argumentTypes": null, - "id": 2558, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "19550:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "19534:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2560, - "name": "worker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2521, - "src": "19556:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "19534:28:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2562, - "nodeType": "ExpressionStatement", - "src": "19534:28:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2574, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "19682:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2576, - "indexExpression": { - "argumentTypes": null, - "id": 2575, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "19698:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19682:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2577, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19705:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "19682:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2579, - "nodeType": "DoWhileStatement", - "src": "18967:743:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2487, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "18918:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2488, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "18923:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18923:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18918:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2581, - "initializationExpression": { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2485, - "name": "it", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18909:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2484, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18909:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2486, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "18909:7:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18947:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2491, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "18947:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2493, - "nodeType": "ExpressionStatement", - "src": "18947:4:2" - }, - "nodeType": "ForStatement", - "src": "18904:816:2" - } - ] - }, - "documentation": null, - "id": 2583, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getWorkerGroup", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2452, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2449, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18474:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2448, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18474:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2451, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18492:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2450, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18492:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18473:34:2" - }, - "payable": false, - "returnParameters": { - "id": 2453, - "nodeType": "ParameterList", - "parameters": [], - "src": "18532:0:2" - }, - "scope": 2657, - "src": "18450:1276:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2622, - "nodeType": "Block", - "src": "19992:261:2", - "statements": [ - { - "assignments": [ - 2599 - ], - "declarations": [ - { - "constant": false, - "id": 2599, - "name": "firstBlockNumber", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "20043:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2598, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "20043:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2601, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2600, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20067:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "20043:25:2" - }, - { - "assignments": [ - 2603 - ], - "declarations": [ - { - "constant": false, - "id": 2603, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "20078:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2602, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "20078:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2605, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2604, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20090:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "20078:13:2" - }, - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2609, - "name": "activeWorkers", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "20101:30:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2607, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20101:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2608, - "length": null, - "nodeType": "ArrayTypeName", - "src": "20101:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2610, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "20101:30:2" - }, - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2614, - "name": "activeContracts", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "20141:32:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2612, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20141:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2613, - "length": null, - "nodeType": "ArrayTypeName", - "src": "20141:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2615, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "20141:32:2" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 2616, - "name": "firstBlockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2599, - "src": "20191:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2617, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2603, - "src": "20209:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2618, - "name": "activeWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2609, - "src": "20215:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 2619, - "name": "activeContracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2614, - "src": "20230:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - } - ], - "id": 2620, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20190:56:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "tuple(uint256,uint256,address[] memory,address[] memory)" - } - }, - "functionReturnParameters": 2597, - "id": 2621, - "nodeType": "Return", - "src": "20183:63:2" - } - ] - }, - "documentation": "The worker parameters corresponding to the specified block number\n * @param blockNumber The reference block number", - "id": 2623, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getWorkersParams", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2586, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2585, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19903:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2584, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19903:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19902:18:2" - }, - "payable": false, - "returnParameters": { - "id": 2597, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2588, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19954:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2587, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19954:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2590, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19960:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2589, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19960:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2593, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19966:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2591, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19966:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2592, - "length": null, - "nodeType": "ArrayTypeName", - "src": "19966:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2596, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19977:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2594, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19977:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2595, - "length": null, - "nodeType": "ArrayTypeName", - "src": "19977:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19953:34:2" - }, - "scope": 2657, - "src": "19877:376:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2655, - "nodeType": "Block", - "src": "20513:234:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2641, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2636, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "20611:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2638, - "indexExpression": { - "argumentTypes": null, - "id": 2637, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20619:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20611:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2639, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "20611:25:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2640, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20640:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "20611:32:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "576f726b6572206e6f742072656769737465726564", - "id": 2642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20645:23:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ad68aef7a0c9f95c0e940996fbd009b216d0a6ca729c2f480732643f59319eb1", - "typeString": "literal_string \"Worker not registered\"" - }, - "value": "Worker not registered" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ad68aef7a0c9f95c0e940996fbd009b216d0a6ca729c2f480732643f59319eb1", - "typeString": "literal_string \"Worker not registered\"" - } - ], - "id": 2635, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "20603:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20603:66:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2644, - "nodeType": "ExpressionStatement", - "src": "20603:66:2" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2645, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "20687:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2647, - "indexExpression": { - "argumentTypes": null, - "id": 2646, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20695:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20687:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2648, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "20687:25:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2649, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "20714:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2651, - "indexExpression": { - "argumentTypes": null, - "id": 2650, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20722:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20714:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2652, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "report", - "nodeType": "MemberAccess", - "referencedDeclaration": 934, - "src": "20714:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - } - ], - "id": 2653, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20686:54:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_bytes_storage_$", - "typeString": "tuple(address,bytes storage ref)" - } - }, - "functionReturnParameters": 2634, - "id": 2654, - "nodeType": "Return", - "src": "20679:61:2" - } - ] - }, - "documentation": "The RLP encoded report returned by the IAS server\n * @param custodian The worker's custodian address", - "id": 2656, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 2628, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20469:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 2629, - "modifierName": { - "argumentTypes": null, - "id": 2627, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "20452:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "20452:27:2" - } - ], - "name": "getReport", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2626, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2625, - "name": "custodian", - "nodeType": "VariableDeclaration", - "scope": 2656, - "src": "20409:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2624, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20409:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20408:19:2" - }, - "payable": false, - "returnParameters": { - "id": 2634, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2631, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2656, - "src": "20493:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2630, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20493:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2633, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2656, - "src": "20502:5:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2632, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20502:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20492:16:2" - }, - "scope": 2657, - "src": "20390:357:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 2658, - "src": "808:19941:2" - } - ], - "src": "0:20750:2" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "2.0.0", - "updatedAt": "2018-10-14T09:14:17.662Z" -} \ No newline at end of file diff --git a/test/ethereum/scripts/includes/build/ERC20Basic.json b/test/ethereum/scripts/includes/build/ERC20Basic.json deleted file mode 100644 index ed0c8346..00000000 --- a/test/ethereum/scripts/includes/build/ERC20Basic.json +++ /dev/null @@ -1,866 +0,0 @@ -{ - "contractName": "ERC20Basic", - "abi": [ - { - "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" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_who", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "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" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "sourceMap": "", - "deployedSourceMap": "", - "source": "pragma solidity ^0.4.24;\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * See https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address _who) public view returns (uint256);\n function transfer(address _to, uint256 _value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n", - "sourcePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol", - "ast": { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol", - "exportedSymbols": { - "ERC20Basic": [ - 3186 - ] - }, - "id": 3187, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 3156, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:10" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": "@title ERC20Basic\n@dev Simpler version of ERC20 interface\nSee https://github.com/ethereum/EIPs/issues/179", - "fullyImplemented": false, - "id": 3186, - "linearizedBaseContracts": [ - 3186 - ], - "name": "ERC20Basic", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 3161, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3157, - "nodeType": "ParameterList", - "parameters": [], - "src": "194:2:10" - }, - "payable": false, - "returnParameters": { - "id": 3160, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3159, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3161, - "src": "218:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3158, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "218:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "217:9:10" - }, - "scope": 3186, - "src": "174:53:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 3168, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3164, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3163, - "name": "_who", - "nodeType": "VariableDeclaration", - "scope": 3168, - "src": "249:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3162, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "249:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "248:14:10" - }, - "payable": false, - "returnParameters": { - "id": 3167, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3166, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3168, - "src": "284:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3165, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "284:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "283:9:10" - }, - "scope": 3186, - "src": "230:63:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 3177, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3173, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3170, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 3177, - "src": "314:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3169, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "314:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3172, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 3177, - "src": "327:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3171, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "327:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "313:29:10" - }, - "payable": false, - "returnParameters": { - "id": 3176, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3175, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3177, - "src": "359:4:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3174, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "359:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "358:6:10" - }, - "scope": 3186, - "src": "296:69:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 3185, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 3184, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3179, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 3185, - "src": "383:20:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3178, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "383:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3181, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3185, - "src": "405:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3180, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "405:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3183, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 3185, - "src": "425:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3182, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "425:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "382:57:10" - }, - "src": "368:72:10" - } - ], - "scope": 3187, - "src": "150:292:10" - } - ], - "src": "0:443:10" - }, - "legacyAST": { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol", - "exportedSymbols": { - "ERC20Basic": [ - 3186 - ] - }, - "id": 3187, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 3156, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:10" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": "@title ERC20Basic\n@dev Simpler version of ERC20 interface\nSee https://github.com/ethereum/EIPs/issues/179", - "fullyImplemented": false, - "id": 3186, - "linearizedBaseContracts": [ - 3186 - ], - "name": "ERC20Basic", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 3161, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3157, - "nodeType": "ParameterList", - "parameters": [], - "src": "194:2:10" - }, - "payable": false, - "returnParameters": { - "id": 3160, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3159, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3161, - "src": "218:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3158, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "218:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "217:9:10" - }, - "scope": 3186, - "src": "174:53:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 3168, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3164, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3163, - "name": "_who", - "nodeType": "VariableDeclaration", - "scope": 3168, - "src": "249:12:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3162, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "249:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "248:14:10" - }, - "payable": false, - "returnParameters": { - "id": 3167, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3166, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3168, - "src": "284:7:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3165, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "284:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "283:9:10" - }, - "scope": 3186, - "src": "230:63:10", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 3177, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3173, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3170, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 3177, - "src": "314:11:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3169, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "314:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3172, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 3177, - "src": "327:14:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3171, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "327:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "313:29:10" - }, - "payable": false, - "returnParameters": { - "id": 3176, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3175, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3177, - "src": "359:4:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3174, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "359:4:10", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "358:6:10" - }, - "scope": 3186, - "src": "296:69:10", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 3185, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 3184, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3179, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 3185, - "src": "383:20:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3178, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "383:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3181, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 3185, - "src": "405:18:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3180, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "405:7:10", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3183, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 3185, - "src": "425:13:10", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3182, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "425:7:10", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "382:57:10" - }, - "src": "368:72:10" - } - ], - "scope": 3187, - "src": "150:292:10" - } - ], - "src": "0:443:10" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "2.0.0", - "updatedAt": "2018-10-10T12:57:03.071Z" -} \ No newline at end of file diff --git a/test/ethereum/scripts/includes/build/Enigma.json b/test/ethereum/scripts/includes/build/Enigma.json deleted file mode 100644 index 105bd254..00000000 --- a/test/ethereum/scripts/includes/build/Enigma.json +++ /dev/null @@ -1,47923 +0,0 @@ -{ - "contractName": "Enigma", - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "workerAddresses", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x0a318da0" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "workers", - "outputs": [ - { - "name": "signer", - "type": "address" - }, - { - "name": "status", - "type": "uint8" - }, - { - "name": "report", - "type": "bytes" - }, - { - "name": "balance", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x4048a257" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "scAddresses", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x5f0dd5bb" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "contracts", - "outputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "codeHash", - "type": "bytes32" - }, - { - "name": "status", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x69dc9ff3" - }, - { - "constant": true, - "inputs": [], - "name": "engToken", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x9489ad40" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "name": "tasks", - "outputs": [ - { - "name": "fee", - "type": "uint256" - }, - { - "name": "token", - "type": "address" - }, - { - "name": "tokenValue", - "type": "uint256" - }, - { - "name": "proof", - "type": "bytes" - }, - { - "name": "sender", - "type": "address" - }, - { - "name": "status", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xe579f500" - }, - { - "inputs": [ - { - "name": "_tokenAddress", - "type": "address" - }, - { - "name": "_principal", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor", - "signature": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "custodian", - "type": "address" - }, - { - "indexed": false, - "name": "signer", - "type": "address" - } - ], - "name": "Registered", - "type": "event", - "signature": "0x0a31ee9d46a828884b81003c8498156ea6aa15b9b54bdd0ef0b533d9eba57e55" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "sig", - "type": "bytes" - }, - { - "indexed": false, - "name": "hash", - "type": "bytes32" - }, - { - "indexed": false, - "name": "workerAddr", - "type": "address" - } - ], - "name": "ValidatedSig", - "type": "event", - "signature": "0xe36691ca52ee024e298e5c0ff07191b87f0ac571c01a7631db2d70d573d955cb" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "seed", - "type": "uint256" - }, - { - "indexed": false, - "name": "blockNumber", - "type": "uint256" - }, - { - "indexed": false, - "name": "workers", - "type": "address[]" - }, - { - "indexed": false, - "name": "balances", - "type": "uint256[]" - } - ], - "name": "WorkersParameterized", - "type": "event", - "signature": "0x7047379c64ccafb62f6625e6b2d8eb6e1b0e091fac56a11ab5e2fd896e4db1d0" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "taskId", - "type": "bytes32" - }, - { - "indexed": false, - "name": "fee", - "type": "uint256" - }, - { - "indexed": false, - "name": "token", - "type": "address" - }, - { - "indexed": false, - "name": "tokenValue", - "type": "uint256" - }, - { - "indexed": false, - "name": "sender", - "type": "address" - } - ], - "name": "TaskRecordCreated", - "type": "event", - "signature": "0x51364a5a527e38841b15c974f7924dad755bc9ce0d29701d7501a7bd297b787b" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "taskIds", - "type": "bytes32[]" - }, - { - "indexed": false, - "name": "fees", - "type": "uint256[]" - }, - { - "indexed": false, - "name": "tokens", - "type": "address[]" - }, - { - "indexed": false, - "name": "tokenValues", - "type": "uint256[]" - }, - { - "indexed": false, - "name": "sender", - "type": "address" - } - ], - "name": "TaskRecordsCreated", - "type": "event", - "signature": "0xcb8afab3437be2f96ef2a2932eb02d02fd765bfe8be7c1f5a58edd6452317dde" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "taskId", - "type": "bytes32" - }, - { - "indexed": false, - "name": "inStateDeltaHash", - "type": "bytes32" - }, - { - "indexed": false, - "name": "outStateDeltaHash", - "type": "bytes32" - }, - { - "indexed": false, - "name": "ethCall", - "type": "bytes" - }, - { - "indexed": false, - "name": "sig", - "type": "bytes" - } - ], - "name": "ReceiptVerified", - "type": "event", - "signature": "0x665329bb9a4e1062edc215d9c5ab57fa54c4c88e3dfbcc68e0cd92fdd010fa6e" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "taskIds", - "type": "bytes32[]" - }, - { - "indexed": false, - "name": "inStateDeltaHashes", - "type": "bytes32[]" - }, - { - "indexed": false, - "name": "outStateDeltaHashes", - "type": "bytes32[]" - }, - { - "indexed": false, - "name": "ethCalls", - "type": "bytes[]" - }, - { - "indexed": false, - "name": "sigs", - "type": "bytes[]" - } - ], - "name": "ReceiptsVerified", - "type": "event", - "signature": "0x7243cbab94fa1d25e0cb54fdd36b41f803ff5e5a29aaae09979a888b156b5872" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "from", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "DepositSuccessful", - "type": "event", - "signature": "0xb3ef81558ed1a50072a492984535a009da8b129c749500b387f1e5f4886bdde5" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "scAddr", - "type": "address" - }, - { - "indexed": false, - "name": "codeHash", - "type": "bytes32" - } - ], - "name": "SecretContractDeployed", - "type": "event", - "signature": "0xff27b3bb5dfb682b066cdace68b5dda84d03c3d2eadac54284aaec44cbcff516" - }, - { - "constant": false, - "inputs": [ - { - "name": "signer", - "type": "address" - }, - { - "name": "report", - "type": "bytes" - } - ], - "name": "register", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x24b8fbf6" - }, - { - "constant": false, - "inputs": [ - { - "name": "custodian", - "type": "address" - }, - { - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x47e7ef24" - }, - { - "constant": false, - "inputs": [ - { - "name": "scAddr", - "type": "address" - }, - { - "name": "codeHash", - "type": "bytes32" - }, - { - "name": "owner", - "type": "address" - }, - { - "name": "sig", - "type": "bytes" - } - ], - "name": "deploySecretContract", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xd3b524c4" - }, - { - "constant": true, - "inputs": [ - { - "name": "scAddr", - "type": "address" - } - ], - "name": "isDeployed", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x90184b02" - }, - { - "constant": true, - "inputs": [ - { - "name": "scAddr", - "type": "address" - } - ], - "name": "getCodeHash", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x81ea4408" - }, - { - "constant": true, - "inputs": [], - "name": "countSecretContracts", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x75bbf75b" - }, - { - "constant": true, - "inputs": [ - { - "name": "start", - "type": "uint256" - }, - { - "name": "stop", - "type": "uint256" - } - ], - "name": "getSecretContractAddresses", - "outputs": [ - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x8e055b8b" - }, - { - "constant": true, - "inputs": [ - { - "name": "scAddr", - "type": "address" - } - ], - "name": "countStateDeltas", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x84062df7" - }, - { - "constant": true, - "inputs": [ - { - "name": "scAddr", - "type": "address" - }, - { - "name": "index", - "type": "uint256" - } - ], - "name": "getStateDeltaHash", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x44409496" - }, - { - "constant": true, - "inputs": [ - { - "name": "scAddr", - "type": "address" - }, - { - "name": "start", - "type": "uint256" - }, - { - "name": "stop", - "type": "uint256" - } - ], - "name": "getStateDeltaHashes", - "outputs": [ - { - "name": "", - "type": "bytes32[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x05e62db6" - }, - { - "constant": true, - "inputs": [ - { - "name": "scAddr", - "type": "address" - }, - { - "name": "stateDeltaHash", - "type": "bytes32" - } - ], - "name": "isValidDeltaHash", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x7b5b2ce3" - }, - { - "constant": false, - "inputs": [ - { - "name": "taskId", - "type": "bytes32" - }, - { - "name": "fee", - "type": "uint256" - }, - { - "name": "token", - "type": "address" - }, - { - "name": "tokenValue", - "type": "uint256" - } - ], - "name": "createTaskRecord", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xd28cf5c1" - }, - { - "constant": false, - "inputs": [ - { - "name": "taskIds", - "type": "bytes32[]" - }, - { - "name": "fees", - "type": "uint256[]" - }, - { - "name": "tokens", - "type": "address[]" - }, - { - "name": "tokenValues", - "type": "uint256[]" - } - ], - "name": "createTaskRecords", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xa85d84ef" - }, - { - "constant": false, - "inputs": [ - { - "name": "scAddr", - "type": "address" - }, - { - "name": "taskId", - "type": "bytes32" - }, - { - "name": "inStateDeltaHash", - "type": "bytes32" - }, - { - "name": "outStateDeltaHash", - "type": "bytes32" - }, - { - "name": "ethCall", - "type": "bytes" - }, - { - "name": "sig", - "type": "bytes" - } - ], - "name": "commitReceipt", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x5956efef" - }, - { - "constant": false, - "inputs": [ - { - "name": "scAddr", - "type": "address" - }, - { - "name": "taskIds", - "type": "bytes32[]" - }, - { - "name": "inStateDeltaHashes", - "type": "bytes32[]" - }, - { - "name": "outStateDeltaHashes", - "type": "bytes32[]" - }, - { - "name": "ethCalls", - "type": "bytes[]" - }, - { - "name": "sigs", - "type": "bytes[]" - } - ], - "name": "commitReceipts", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xd245f478" - }, - { - "constant": false, - "inputs": [ - { - "name": "seed", - "type": "uint256" - }, - { - "name": "sig", - "type": "bytes" - } - ], - "name": "setWorkersParams", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x2873e73c" - }, - { - "constant": true, - "inputs": [ - { - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getWorkerParams", - "outputs": [ - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "address[]" - }, - { - "name": "", - "type": "uint256[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x9836ca31" - }, - { - "constant": true, - "inputs": [ - { - "name": "blockNumber", - "type": "uint256" - }, - { - "name": "scAddr", - "type": "address" - } - ], - "name": "getWorkerGroup", - "outputs": [], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xd9611203" - }, - { - "constant": true, - "inputs": [ - { - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getWorkersParams", - "outputs": [ - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "address[]" - }, - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x59c91a12" - }, - { - "constant": true, - "inputs": [ - { - "name": "custodian", - "type": "address" - } - ], - "name": "getReport", - "outputs": [ - { - "name": "", - "type": "address" - }, - { - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xa3bdae3e" - } - ], - "bytecode": "0x60806040523480156200001157600080fd5b5060405160408062003e29833981018060405262000033919081019062000082565b60008054600160a060020a03938416600160a060020a03199182161790915560018054929093169116178155601b55600a601c55620000cd565b60006200007b8251620000c1565b9392505050565b600080604083850312156200009657600080fd5b6000620000a485856200006d565b9250506020620000b7858286016200006d565b9150509250929050565b600160a060020a031690565b613d4c80620000dd6000396000f3006080604052600436106101535763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305e62db681146101585780630a318da01461018e57806324b8fbf6146101bb5780632873e73c146101dd5780634048a257146101fd578063444094961461022d57806347e7ef241461025a5780635956efef1461027a57806359c91a121461029a5780635f0dd5bb146102ca57806369dc9ff3146102ea57806375bbf75b146103195780637b5b2ce31461032e57806381ea44081461035b57806384062df71461037b5780638e055b8b1461039b57806390184b02146103c85780639489ad40146103e85780639836ca311461040a578063a3bdae3e1461043a578063a85d84ef14610468578063d245f47814610488578063d28cf5c1146104a8578063d3b524c4146104c8578063d9611203146104e8578063e579f50014610508575b600080fd5b34801561016457600080fd5b50610178610173366004613099565b61053a565b6040516101859190613868565b60405180910390f35b34801561019a57600080fd5b506101ae6101a936600461319a565b610669565b6040516101859190613786565b3480156101c757600080fd5b506101db6101d6366004613051565b610691565b005b3480156101e957600080fd5b506101db6101f836600461323d565b6107c5565b34801561020957600080fd5b5061021d610218366004612dcf565b610bca565b6040516101859493929190613812565b34801561023957600080fd5b5061024d610248366004612ef4565b610c8e565b6040516101859190613959565b34801561026657600080fd5b506101db610275366004612ef4565b610d18565b34801561028657600080fd5b506101db610295366004612fa7565b610eb5565b3480156102a657600080fd5b506102ba6102b536600461319a565b61110e565b6040516101859493929190613b40565b3480156102d657600080fd5b506101ae6102e536600461319a565b61111b565b3480156102f657600080fd5b5061030a610305366004612dcf565b611129565b604051610185939291906137ca565b34801561032557600080fd5b5061024d611157565b34801561033a57600080fd5b5061034e610349366004612ef4565b61115e565b604051610185919061394b565b34801561036757600080fd5b5061024d610376366004612dcf565b611238565b34801561038757600080fd5b5061024d610396366004612dcf565b6112a7565b3480156103a757600080fd5b506103bb6103b636600461325c565b611316565b6040516101859190613857565b3480156103d457600080fd5b5061034e6103e3366004612dcf565b6113c8565b3480156103f457600080fd5b506103fd61140d565b6040516101859190613a2c565b34801561041657600080fd5b5061042a61042536600461319a565b61141c565b6040516101859493929190613b81565b34801561044657600080fd5b5061045a610455366004612dcf565b611547565b6040516101859291906137f2565b34801561047457600080fd5b506101db6104833660046130e6565b611758565b34801561049457600080fd5b506101db6104a3366004612df5565b6119ce565b3480156104b457600080fd5b506101db6104c33660046131b8565b611d36565b3480156104d457600080fd5b506101db6104e3366004612f2e565b611e16565b3480156104f457600080fd5b506101db61050336600461320d565b61203f565b34801561051457600080fd5b5061052861052336600461319a565b61235f565b60405161018596959493929190613aea565b606080600080866001600160a060020a0382166000908152601a602052604090206003015460ff16600181111561056d57fe5b146105965760405160e560020a62461bcd02815260040161058d90613aba565b60405180910390fd5b8515156105bc57600160a060020a0388166000908152601a602052604090206002015495505b6105cc868863ffffffff61243916565b6040519080825280602002602001820160405280156105f5578160200160208202803883390190505b509350600092508691505b8582101561065d57600160a060020a0388166000908152601a6020526040902060020180548390811061062f57fe5b9060005260206000200154848481518110151561064857fe5b60209081029091010152600190910190610600565b50919695505050505050565b601680548290811061067757fe5b600091825260209091200154600160a060020a0316905081565b33600090815260186020526040812054600160a060020a031615156107055750601680549081906106c59060018301612a8f565b50336016828154811015156106d657fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a031602179055505b3360009081526018602090815260408220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038716178155600281019290925583516107569260010191850190612ab8565b503360008181526018602052604090819020805474ff0000000000000000000000000000000000000000191660a060020a179055517f0a31ee9d46a828884b81003c8498156ea6aa15b9b54bdd0ef0b533d9eba57e55916107b8918690613794565b60405180910390a1505050565b600080600080336107d4612b36565b600160a060020a0382811660009081526018602090815260409182902082516080810184528154948516815260a060020a90940460ff1684830152600180820180548551600261010094831615949094026000190190911692909204601f8101859004850283018501865280835292948601939192909183018282801561089c5780601f106108715761010080835404028352916020019161089c565b820191906000526020600020905b81548152906001019060200180831161087f57829003601f168201915b5050505050815260200160028201548152505090506000816020015160ff161115156108dd5760405160e560020a62461bcd02815260040161058d90613a3a565b60015433600090815260186020526040902054600160a060020a0390811691161461091d5760405160e560020a62461bcd02815260040161058d90613a9a565b60009550600094505b6005851015610988576002856005811061093c57fe5b6004020154151561094f57849550610988565b6002866005811061095c57fe5b60040201546002866005811061096e57fe5b6004020154101561097d578495505b600190940193610926565b436002876005811061099657fe5b600402015587600287600581106109a957fe5b600402016003018190555060009350600092505b601654831015610b5b57601b54601860006016868154811015156109dd57fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020600201541115610b505760028660058110610a1857fe5b600402016001018054809190600101610a319190612a8f565b506016805484908110610a4057fe5b600091825260209091200154600160a060020a031660028760058110610a6257fe5b6004020160010185815481101515610a7657fe5b6000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039290921691909117905560028660058110610ab957fe5b600402016002018054809190600101610ad29190612a8f565b5060186000601685815481101515610ae657fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020600290810154908760058110610b1c57fe5b6004020160020185815481101515610b3057fe5b600091825260209091200155610b4d84600163ffffffff61245016565b93505b6001909201916109bd565b7f7047379c64ccafb62f6625e6b2d8eb6e1b0e091fac56a11ab5e2fd896e4db1d0884360028960058110610b8b57fe5b6004020160010160028a600581101515610ba157fe5b60040201600201604051610bb89493929190613bc2565b60405180910390a15050505050505050565b6018602090815260009182526040918290208054600180830180548651600261010094831615949094026000190190911692909204601f8101869004860283018601909652858252600160a060020a0383169560a060020a90930460ff169491929091830182828015610c7e5780601f10610c5357610100808354040283529160200191610c7e565b820191906000526020600020905b815481529060010190602001808311610c6157829003601f168201915b5050505050908060020154905084565b6000826001600160a060020a0382166000908152601a602052604090206003015460ff166001811115610cbd57fe5b14610cdd5760405160e560020a62461bcd02815260040161058d90613aba565b600160a060020a0384166000908152601a60205260409020600201805484908110610d0457fe5b906000526020600020015491505092915050565b81610d21612b36565b600160a060020a0382811660009081526018602090815260409182902082516080810184528154948516815260a060020a90940460ff1684830152600180820180548551600261010094831615949094026000190190911692909204601f81018590048502830185018652808352929486019391929091830182828015610de95780601f10610dbe57610100808354040283529160200191610de9565b820191906000526020600020905b815481529060010190602001808311610dcc57829003601f168201915b5050505050815260200160028201548152505090506000816020015160ff16111515610e2a5760405160e560020a62461bcd02815260040161058d90613a3a565b600160a060020a038416600090815260186020526040902060020154610e56908463ffffffff61245016565b600160a060020a0385166000908152601860205260409081902060020191909155517fb3ef81558ed1a50072a492984535a009da8b129c749500b387f1e5f4886bdde590610ea790869086906137af565b60405180910390a150505050565b33610ebe612b36565b600160a060020a0382811660009081526018602090815260409182902082516080810184528154948516815260a060020a90940460ff1684830152600180820180548551600261010094831615949094026000190190911692909204601f81018590048502830185018652808352929486019391929091830182828015610f865780601f10610f5b57610100808354040283529160200191610f86565b820191906000526020600020905b815481529060010190602001808311610f6957829003601f168201915b5050505050815260200160028201548152505090506000816020015160ff16111515610fc75760405160e560020a62461bcd02815260040161058d90613a3a565b876001600160a060020a0382166000908152601a602052604090206003015460ff166001811115610ff457fe5b146110145760405160e560020a62461bcd02815260040161058d90613aba565b6000808981526019602052604090206004015460a060020a900460ff16600181111561103c57fe5b1461105c5760405160e560020a62461bcd02815260040161058d90613a5a565b61106a89898989898961245d565b6000888152601960209081526040909120855161108f92600390920191870190612ab8565b5060008881526019602052604090819020600401805474ff0000000000000000000000000000000000000000191660a060020a179055517f665329bb9a4e1062edc215d9c5ab57fa54c4c88e3dfbcc68e0cd92fdd010fa6e906110fb908a908a908a908a908a90613967565b60405180910390a1505050505050505050565b6000806060809193509193565b601780548290811061067757fe5b601a60205260009081526040902080546001820154600390920154600160a060020a03909116919060ff1683565b6017545b90565b60008080846001600160a060020a0382166000908152601a602052604090206003015460ff16600181111561118f57fe5b146111af5760405160e560020a62461bcd02815260040161058d90613aba565b60009250600091505b600160a060020a0386166000908152601a602052604090206002015482101561122b57600160a060020a0386166000908152601a6020526040902060020180548691908490811061120557fe5b6000918252602090912001541415611220576001925061122b565b6001909101906111b8565b8293505b50505092915050565b6000816001600160a060020a0382166000908152601a602052604090206003015460ff16600181111561126757fe5b146112875760405160e560020a62461bcd02815260040161058d90613aba565b5050600160a060020a03166000908152601a602052604090206001015490565b6000816001600160a060020a0382166000908152601a602052604090206003015460ff1660018111156112d657fe5b146112f65760405160e560020a62461bcd02815260040161058d90613aba565b5050600160a060020a03166000908152601a602052604090206002015490565b6060806000808415156113295760175494505b611339858763ffffffff61243916565b604051908082528060200260200182016040528015611362578160200160208202803883390190505b509250600091508590505b8481101561122b57601780548290811061138357fe5b6000918252602090912001548351600160a060020a03909116908490849081106113a957fe5b600160a060020a0390921660209283029091019091015260010161136d565b60006001600160a060020a0383166000908152601a602052604090206003015460ff1660018111156113f657fe5b141561140457506001611408565b5060005b919050565b600054600160a060020a031681565b600080606080600061142c612b6b565b611435876126ad565b91506002826005811061144457fe5b600402016080604051908101604052908160008201548152602001600182018054806020026020016040519081016040528092919081815260200182805480156114b757602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611499575b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561150f57602002820191906000526020600020905b8154815260200190600101908083116114fb575b5050509183525050600391909101546020918201528151606083015191830151604090930151909a9199509197509095509350505050565b6000606082611554612b36565b600160a060020a0382811660009081526018602090815260409182902082516080810184528154948516815260a060020a90940460ff1684830152600180820180548551600261010094831615949094026000190190911692909204601f8101859004850283018501865280835292948601939192909183018282801561161c5780601f106115f15761010080835404028352916020019161161c565b820191906000526020600020905b8154815290600101906020018083116115ff57829003601f168201915b5050505050815260200160028201548152505090506000816020015160ff1611151561165d5760405160e560020a62461bcd02815260040161058d90613a3a565b600160a060020a038086166000908152601860205260409020541615156116995760405160e560020a62461bcd02815260040161058d90613a8a565b600160a060020a038581166000908152601860209081526040918290208054600191820180548551600261010095831615959095026000190190911693909304601f81018590048502840185019095528483529416939290918391908301828280156117465780601f1061171b57610100808354040283529160200191611746565b820191906000526020600020905b81548152906001019060200180831161172957829003601f168201915b50505050509050935093505050915091565b60005b84518110156119885760196000868381518110151561177657fe5b6020908102909101810151825281019190915260400160002060040154600160a060020a0316156117bc5760405160e560020a62461bcd02815260040161058d90613aaa565b83818151811015156117ca57fe5b906020019060200201516019600087848151811015156117e657fe5b6020908102909101810151825281019190915260400160002055825183908290811061180e57fe5b9060200190602002015160196000878481518110151561182a57fe5b6020908102919091018101518252810191909152604001600020600101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055815182908290811061188057fe5b9060200190602002015160196000878481518110151561189c57fe5b906020019060200201516000191660001916815260200190815260200160002060020181905550336019600087848151811015156118d657fe5b60209081029190910181015182528101919091526040016000908120600401805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0393909316929092179091558551601990829088908590811061193457fe5b60209081029091018101518252810191909152604001600020600401805474ff0000000000000000000000000000000000000000191660a060020a83600181111561197b57fe5b021790555060010161175b565b7fcb8afab3437be2f96ef2a2932eb02d02fd765bfe8be7c1f5a58edd6452317dde85858585336040516119bf9594939291906138e5565b60405180910390a15050505050565b6000336119d9612b36565b600160a060020a0382811660009081526018602090815260409182902082516080810184528154948516815260a060020a90940460ff1684830152600180820180548551600261010094831615949094026000190190911692909204601f81018590048502830185018652808352929486019391929091830182828015611aa15780601f10611a7657610100808354040283529160200191611aa1565b820191906000526020600020905b815481529060010190602001808311611a8457829003601f168201915b5050505050815260200160028201548152505090506000816020015160ff16111515611ae25760405160e560020a62461bcd02815260040161058d90613a3a565b886001600160a060020a0382166000908152601a602052604090206003015460ff166001811115611b0f57fe5b14611b2f5760405160e560020a62461bcd02815260040161058d90613aba565b600093505b8851841015611ceb576000601960008b87815181101515611b5157fe5b602090810290910181015182528101919091526040016000206004015460ff60a060020a909104166001811115611b8457fe5b14611ba45760405160e560020a62461bcd02815260040161058d90613a5a565b611c258a8a86815181101515611bb657fe5b906020019060200201518a87815181101515611bce57fe5b906020019060200201518a88815181101515611be657fe5b906020019060200201518a89815181101515611bfe57fe5b906020019060200201518a8a815181101515611c1657fe5b9060200190602002015161245d565b8484815181101515611c3357fe5b90602001906020020151601960008b87815181101515611c4f57fe5b60209081029091018101518252818101929092526040016000208251611c7f936003909201929190910190612ab8565b506001601960008b87815181101515611c9457fe5b60209081029091018101518252810191909152604001600020600401805474ff0000000000000000000000000000000000000000191660a060020a836001811115611cdb57fe5b0217905550600190930192611b34565b7f7243cbab94fa1d25e0cb54fdd36b41f803ff5e5a29aaae09979a888b156b58728989898989604051611d22959493929190613879565b60405180910390a150505050505050505050565b600084815260196020526040902060040154600160a060020a031615611d715760405160e560020a62461bcd02815260040161058d90613aaa565b60008481526019602052604090819020848155600181018054600160a060020a03861673ffffffffffffffffffffffffffffffffffffffff199182161790915560028201849055600490910180549091163390811774ff0000000000000000000000000000000000000000191690915590517f51364a5a527e38841b15c974f7924dad755bc9ce0d29701d7501a7bd297b787b91610ea79187918791879187916139b5565b33611e1f612b36565b600160a060020a0382811660009081526018602090815260409182902082516080810184528154948516815260a060020a90940460ff1684830152600180820180548551600261010094831615949094026000190190911692909204601f81018590048502830185018652808352929486019391929091830182828015611ee75780601f10611ebc57610100808354040283529160200191611ee7565b820191906000526020600020905b815481529060010190602001808311611eca57829003601f168201915b5050505050815260200160028201548152505090506000816020015160ff16111515611f285760405160e560020a62461bcd02815260040161058d90613a3a565b600160a060020a0386166000908152601a602052604081206003015460ff166001811115611f5257fe5b14611f725760405160e560020a62461bcd02815260040161058d90613a4a565b600160a060020a038681166000818152601a6020526040808220805494891673ffffffffffffffffffffffffffffffffffffffff1995861617815560018082018b90556003909101805460ff1916821790556017805491820181559092527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c159091018054909316909117909155517fff27b3bb5dfb682b066cdace68b5dda84d03c3d2eadac54284aaec44cbcff5169061202f90889088906137af565b60405180910390a1505050505050565b6000606061204b612b6b565b606060008060008060008060006120618d6126ad565b9a5061206c8b612755565b995060028b6005811061207b57fe5b600402016080604051908101604052908160008201548152602001600182018054806020026020016040519081016040528092919081815260200182805480156120ee57602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116120d0575b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561214657602002820191906000526020600020905b815481526020019060010190808311612132575b505050505081526020016003820154815250509850601c54604051908082528060200260200182016040528015612187578160200160208202803883390190505b5097505b8751871015612350575b600095508589606001518e8e6040516020018085815260200184815260200183815260200182600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019450505050506040516020818303038152906040526040518082805190602001908083835b602083106122255780518252601f199092019160209182019101612206565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902094508951856001900481151561226457fe5b069350898481518110151561227557fe5b906020019060200201519250600091505b87518110156122d157878181518110151561229d57fe5b90602001906020020151600160a060020a031683600160a060020a031614156122c957600191506122d1565b600101612286565b811515612303578288888151811015156122e757fe5b600160a060020a03909216602092830290910190910152612317565b61231486600163ffffffff61245016565b95505b878781518110151561232557fe5b90602001906020020151600160a060020a03166000141561234557612195565b60019096019561218b565b50505050505050505050505050565b601960209081526000918252604091829020805460018083015460028085015460038601805489516101009682161596909602600019011692909204601f81018890048802850188019098528784529396600160a060020a03909216959394939091908301828280156124135780601f106123e857610100808354040283529160200191612413565b820191906000526020600020905b8154815290600101906020018083116123f657829003601f168201915b50505060049093015491925050600160a060020a0381169060ff60a060020a9091041686565b60008282111561244557fe5b508082035b92915050565b8181018281101561244a57fe5b600160a060020a0386166000908152601a602052604081206002015490808215156124a85786156124a35760405160e560020a62461bcd02815260040161058d90613a7a565b61250b565b600160a060020a0389166000908152601a602052604090206002016124d484600163ffffffff61243916565b815481106124de57fe5b600091825260209091200154871461250b5760405160e560020a62461bcd02815260040161058d90613a6a565b600160a060020a0389166000908152601a602052604090206002018054906125369060018301612a8f565b50600160a060020a0389166000908152601a6020526040902060020180548791908590811061256157fe5b60009182526020918290200191909155604080518083018b81529181018a90526060810189905287518b938b938b938b939192608090910191908401908083835b602083106125c15780518252601f1990920191602091820191016125a2565b6001836020036101000a0380198251168184511680821785525050505050509050019450505050506040516020818303038152906040526040518082805190602001908083835b602083106126275780518252601f199092019160209182019101612608565b5181516020939093036101000a60001901801990911692169190911790526040519201829003909120945061266292508491508690506129d2565b33600090815260186020526040902054909150600160a060020a038083169116146126a25760405160e560020a62461bcd02815260040161058d90613aca565b505050505050505050565b6000600019815b60058110156127225783600282600581106126cb57fe5b60040201541180159061271157508160000b600019148061271157506002600083900b600581106126f857fe5b60040201546002826005811061270a57fe5b6004020154115b1561271a578091505b6001016126b4565b600019600083900b141561274b5760405160e560020a62461bcd02815260040161058d90613ada565b5060000b92915050565b606061275f612b6b565b60008060608180806002896005811061277457fe5b600402016080604051908101604052908160008201548152602001600182018054806020026020016040519081016040528092919081815260200182805480156127e757602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116127c9575b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561283f57602002820191906000526020600020905b81548152602001906001019080831161282b575b50505050508152602001600382015481525050965060009550600094505b8660200151518510156128cd57602087015180518690811061287b57fe5b60209081029091010151600160a060020a0316156128c2576128bf8760400151868151811015156128a857fe5b60209081029091010151879063ffffffff61245016565b95505b60019094019361285d565b856040519080825280602002602001820160405280156128f7578160200160208202803883390190505b50935060009250600091505b8660200151518210156129c557602087015180518390811061292157fe5b60209081029091010151600160a060020a0316156129ba575060005b604087015180518390811061294e57fe5b906020019060200201518110156129ba57602087015180518390811061297057fe5b90602001906020020151848481518110151561298857fe5b600160a060020a039092166020928302909101909101526129b083600163ffffffff61245016565b925060010161293d565b600190910190612903565b5091979650505050505050565b600080600080845160411415156129ec576000935061122f565b50505060208201516040830151606084015160001a601b60ff82161015612a1157601b015b8060ff16601b14158015612a2957508060ff16601c14155b15612a37576000935061122f565b60018682858560405160008152602001604052604051612a5a94939291906139f7565b60206040516020810390808403906000865af1158015612a7e573d6000803e3d6000fd5b50505060206040510351935061122f565b815481835581811115612ab357600083815260209020612ab3918101908301612b94565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612af957805160ff1916838001178555612b26565b82800160010185558215612b26579182015b82811115612b26578251825591602001919060010190612b0b565b50612b32929150612b94565b5090565b6080604051908101604052806000600160a060020a03168152602001600060ff16815260200160608152602001600081525090565b608060405190810160405280600081526020016060815260200160608152602001600081525090565b61115b91905b80821115612b325760008155600101612b9a565b6000612bba8235613c93565b9392505050565b6000601f82018313612bd257600080fd5b8135612be5612be082613c2a565b613c03565b91508181835260208401935060208101905083856020840282011115612c0a57600080fd5b60005b83811015612c365781612c208882612bae565b8452506020928301929190910190600101612c0d565b5050505092915050565b6000601f82018313612c5157600080fd5b8135612c5f612be082613c2a565b91508181835260208401935060208101905083856020840282011115612c8457600080fd5b60005b83811015612c365781612c9a8882612d7d565b8452506020928301929190910190600101612c87565b6000601f82018313612cc157600080fd5b8135612ccf612be082613c2a565b81815260209384019390925082018360005b83811015612c365781358601612cf78882612d89565b8452506020928301929190910190600101612ce1565b6000601f82018313612d1e57600080fd5b8135612d2c612be082613c2a565b91508181835260208401935060208101905083856020840282011115612d5157600080fd5b60005b83811015612c365781612d678882612d7d565b8452506020928301929190910190600101612d54565b6000612bba823561115b565b6000601f82018313612d9a57600080fd5b8135612da8612be082613c4b565b91508082526020830160208301858383011115612dc457600080fd5b61122f838284613ccc565b600060208284031215612de157600080fd5b6000612ded8484612bae565b949350505050565b60008060008060008060c08789031215612e0e57600080fd5b6000612e1a8989612bae565b965050602087013567ffffffffffffffff811115612e3757600080fd5b612e4389828a01612c40565b955050604087013567ffffffffffffffff811115612e6057600080fd5b612e6c89828a01612c40565b945050606087013567ffffffffffffffff811115612e8957600080fd5b612e9589828a01612c40565b935050608087013567ffffffffffffffff811115612eb257600080fd5b612ebe89828a01612cb0565b92505060a087013567ffffffffffffffff811115612edb57600080fd5b612ee789828a01612cb0565b9150509295509295509295565b60008060408385031215612f0757600080fd5b6000612f138585612bae565b9250506020612f2485828601612d7d565b9150509250929050565b60008060008060808587031215612f4457600080fd5b6000612f508787612bae565b9450506020612f6187828801612d7d565b9350506040612f7287828801612bae565b925050606085013567ffffffffffffffff811115612f8f57600080fd5b612f9b87828801612d89565b91505092959194509250565b60008060008060008060c08789031215612fc057600080fd5b6000612fcc8989612bae565b9650506020612fdd89828a01612d7d565b9550506040612fee89828a01612d7d565b9450506060612fff89828a01612d7d565b935050608087013567ffffffffffffffff81111561301c57600080fd5b61302889828a01612d89565b92505060a087013567ffffffffffffffff81111561304557600080fd5b612ee789828a01612d89565b6000806040838503121561306457600080fd5b60006130708585612bae565b925050602083013567ffffffffffffffff81111561308d57600080fd5b612f2485828601612d89565b6000806000606084860312156130ae57600080fd5b60006130ba8686612bae565b93505060206130cb86828701612d7d565b92505060406130dc86828701612d7d565b9150509250925092565b600080600080608085870312156130fc57600080fd5b843567ffffffffffffffff81111561311357600080fd5b61311f87828801612c40565b945050602085013567ffffffffffffffff81111561313c57600080fd5b61314887828801612d0d565b935050604085013567ffffffffffffffff81111561316557600080fd5b61317187828801612bc1565b925050606085013567ffffffffffffffff81111561318e57600080fd5b612f9b87828801612d0d565b6000602082840312156131ac57600080fd5b6000612ded8484612d7d565b600080600080608085870312156131ce57600080fd5b60006131da8787612d7d565b94505060206131eb87828801612d7d565b93505060406131fc87828801612bae565b9250506060612f9b87828801612d7d565b6000806040838503121561322057600080fd5b600061322c8585612d7d565b9250506020612f2485828601612bae565b6000806040838503121561325057600080fd5b60006130708585612d7d565b6000806040838503121561326f57600080fd5b6000612f138585612d7d565b61328481613c93565b82525050565b600061329582613c85565b8084526020840193506132a783613c73565b60005b828110156132d7576132bd86835161327b565b6132c682613c73565b6020969096019591506001016132aa565b5093949350505050565b60006132ec82613c89565b8084526020840193506132fe83613c79565b60005b828110156132d75761331486835461327b565b61331d82613c8d565b602096909601959150600101613301565b600061333982613c85565b80845260208401935061334b83613c73565b60005b828110156132d757613361868351613485565b61336a82613c73565b60209690960195915060010161334e565b600061338682613c85565b8084526020840193508360208202850161339f85613c73565b60005b848110156133d65783830388526133ba83835161348e565b92506133c582613c73565b6020989098019791506001016133a2565b50909695505050505050565b60006133ed82613c85565b8084526020840193506133ff83613c73565b60005b828110156132d757613415868351613485565b61341e82613c73565b602096909601959150600101613402565b600061343a82613c89565b80845260208401935061344c83613c79565b60005b828110156132d757613462868354613485565b61346b82613c8d565b60209690960195915060010161344f565b61328481613c9f565b6132848161115b565b600061349982613c85565b8084526134ad816020860160208601613cd8565b6134b681613d08565b9093016020019392505050565b61328481613cb6565b61328481613cc1565b601481527f556e7265676973746572656420776f726b65722e000000000000000000000000602082015260400190565b602181527f53656372657420636f6e747261637420616c7265616479206465706c6f79656460208201527f2e00000000000000000000000000000000000000000000000000000000000000604082015260600190565b601381527f496e76616c6964207461736b2073746174757300000000000000000000000000602082015260400190565b601e81527f496e76616c696420696e7075742073746174652064656c746120686173680000602082015260400190565b602e81527f496e76616c696420696e7075742073746174652064656c74612068617368206660208201527f6f7220656d707479207374617465000000000000000000000000000000000000604082015260600190565b601581527f576f726b6572206e6f7420726567697374657265640000000000000000000000602082015260400190565b602681527f4f6e6c7920746865205072696e636970616c2063616e2075706461746520746860208201527f6520736565640000000000000000000000000000000000000000000000000000604082015260600190565b601381527f5461736b20616c72656164792065786973742e00000000000000000000000000602082015260400190565b601d81527f53656372657420636f6e7472616374206e6f74206465706c6f7965642e000000602082015260400190565b601281527f496e76616c6964207369676e61747572652e0000000000000000000000000000602082015260400190565b603681527f4e6f20776f726b65727320706172616d657465727320656e74727920666f722060208201527f73706563696669656420626c6f636b206e756d62657200000000000000000000604082015260600190565b61328481613cb0565b6020810161244a828461327b565b604081016137a2828561327b565b612bba602083018461327b565b604081016137bd828561327b565b612bba6020830184613485565b606081016137d8828661327b565b6137e56020830185613485565b612ded60408301846134cc565b60408101613800828561327b565b8181036020830152612ded818461348e565b60808101613820828761327b565b61382d602083018661377d565b818103604083015261383f818561348e565b905061384e6060830184613485565b95945050505050565b60208082528101612bba818461328a565b60208082528101612bba818461332e565b60a0808252810161388a818861332e565b9050818103602083015261389e818761332e565b905081810360408301526138b2818661332e565b905081810360608301526138c6818561337b565b905081810360808301526138da818461337b565b979650505050505050565b60a080825281016138f6818861332e565b9050818103602083015261390a81876133e2565b9050818103604083015261391e818661328a565b9050818103606083015261393281856133e2565b9050613941608083018461327b565b9695505050505050565b6020810161244a828461347c565b6020810161244a8284613485565b60a081016139758288613485565b6139826020830187613485565b61398f6040830186613485565b81810360608301526139a1818561348e565b905081810360808301526138da818461348e565b60a081016139c38288613485565b6139d06020830187613485565b6139dd604083018661327b565b6139ea6060830185613485565b613941608083018461327b565b60808101613a058287613485565b613a12602083018661377d565b613a1f6040830185613485565b61384e6060830184613485565b6020810161244a82846134c3565b6020808252810161244a816134d5565b6020808252810161244a81613505565b6020808252810161244a8161355b565b6020808252810161244a8161358b565b6020808252810161244a816135bb565b6020808252810161244a81613611565b6020808252810161244a81613641565b6020808252810161244a81613697565b6020808252810161244a816136c7565b6020808252810161244a816136f7565b6020808252810161244a81613727565b60c08101613af88289613485565b613b05602083018861327b565b613b126040830187613485565b8181036060830152613b24818661348e565b9050613b33608083018561327b565b6138da60a08301846134cc565b60808101613b4e8287613485565b613b5b6020830186613485565b8181036040830152613b6d818561328a565b90508181036060830152613941818461328a565b60808101613b8f8287613485565b613b9c6020830186613485565b8181036040830152613bae818561328a565b9050818103606083015261394181846133e2565b60808101613bd08287613485565b613bdd6020830186613485565b8181036040830152613bef81856132e1565b90508181036060830152613941818461342f565b60405181810167ffffffffffffffff81118282101715613c2257600080fd5b604052919050565b600067ffffffffffffffff821115613c4157600080fd5b5060209081020190565b600067ffffffffffffffff821115613c6257600080fd5b506020601f91909101601f19160190565b60200190565b60009081526020902090565b5190565b5490565b60010190565b600160a060020a031690565b151590565b600060028210612b3257fe5b60ff1690565b600061244a82613c93565b600061244a82613ca4565b82818337506000910152565b60005b83811015613cf3578181015183820152602001613cdb565b83811115613d02576000848401525b50505050565b601f01601f1916905600a265627a7a7230582089b352402456618e80684a1428cc8d207c5060670b7820a30537acf16bae1f306c6578706572696d656e74616cf50037", - "deployedBytecode": "0x6080604052600436106101535763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305e62db681146101585780630a318da01461018e57806324b8fbf6146101bb5780632873e73c146101dd5780634048a257146101fd578063444094961461022d57806347e7ef241461025a5780635956efef1461027a57806359c91a121461029a5780635f0dd5bb146102ca57806369dc9ff3146102ea57806375bbf75b146103195780637b5b2ce31461032e57806381ea44081461035b57806384062df71461037b5780638e055b8b1461039b57806390184b02146103c85780639489ad40146103e85780639836ca311461040a578063a3bdae3e1461043a578063a85d84ef14610468578063d245f47814610488578063d28cf5c1146104a8578063d3b524c4146104c8578063d9611203146104e8578063e579f50014610508575b600080fd5b34801561016457600080fd5b50610178610173366004613099565b61053a565b6040516101859190613868565b60405180910390f35b34801561019a57600080fd5b506101ae6101a936600461319a565b610669565b6040516101859190613786565b3480156101c757600080fd5b506101db6101d6366004613051565b610691565b005b3480156101e957600080fd5b506101db6101f836600461323d565b6107c5565b34801561020957600080fd5b5061021d610218366004612dcf565b610bca565b6040516101859493929190613812565b34801561023957600080fd5b5061024d610248366004612ef4565b610c8e565b6040516101859190613959565b34801561026657600080fd5b506101db610275366004612ef4565b610d18565b34801561028657600080fd5b506101db610295366004612fa7565b610eb5565b3480156102a657600080fd5b506102ba6102b536600461319a565b61110e565b6040516101859493929190613b40565b3480156102d657600080fd5b506101ae6102e536600461319a565b61111b565b3480156102f657600080fd5b5061030a610305366004612dcf565b611129565b604051610185939291906137ca565b34801561032557600080fd5b5061024d611157565b34801561033a57600080fd5b5061034e610349366004612ef4565b61115e565b604051610185919061394b565b34801561036757600080fd5b5061024d610376366004612dcf565b611238565b34801561038757600080fd5b5061024d610396366004612dcf565b6112a7565b3480156103a757600080fd5b506103bb6103b636600461325c565b611316565b6040516101859190613857565b3480156103d457600080fd5b5061034e6103e3366004612dcf565b6113c8565b3480156103f457600080fd5b506103fd61140d565b6040516101859190613a2c565b34801561041657600080fd5b5061042a61042536600461319a565b61141c565b6040516101859493929190613b81565b34801561044657600080fd5b5061045a610455366004612dcf565b611547565b6040516101859291906137f2565b34801561047457600080fd5b506101db6104833660046130e6565b611758565b34801561049457600080fd5b506101db6104a3366004612df5565b6119ce565b3480156104b457600080fd5b506101db6104c33660046131b8565b611d36565b3480156104d457600080fd5b506101db6104e3366004612f2e565b611e16565b3480156104f457600080fd5b506101db61050336600461320d565b61203f565b34801561051457600080fd5b5061052861052336600461319a565b61235f565b60405161018596959493929190613aea565b606080600080866001600160a060020a0382166000908152601a602052604090206003015460ff16600181111561056d57fe5b146105965760405160e560020a62461bcd02815260040161058d90613aba565b60405180910390fd5b8515156105bc57600160a060020a0388166000908152601a602052604090206002015495505b6105cc868863ffffffff61243916565b6040519080825280602002602001820160405280156105f5578160200160208202803883390190505b509350600092508691505b8582101561065d57600160a060020a0388166000908152601a6020526040902060020180548390811061062f57fe5b9060005260206000200154848481518110151561064857fe5b60209081029091010152600190910190610600565b50919695505050505050565b601680548290811061067757fe5b600091825260209091200154600160a060020a0316905081565b33600090815260186020526040812054600160a060020a031615156107055750601680549081906106c59060018301612a8f565b50336016828154811015156106d657fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a031602179055505b3360009081526018602090815260408220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038716178155600281019290925583516107569260010191850190612ab8565b503360008181526018602052604090819020805474ff0000000000000000000000000000000000000000191660a060020a179055517f0a31ee9d46a828884b81003c8498156ea6aa15b9b54bdd0ef0b533d9eba57e55916107b8918690613794565b60405180910390a1505050565b600080600080336107d4612b36565b600160a060020a0382811660009081526018602090815260409182902082516080810184528154948516815260a060020a90940460ff1684830152600180820180548551600261010094831615949094026000190190911692909204601f8101859004850283018501865280835292948601939192909183018282801561089c5780601f106108715761010080835404028352916020019161089c565b820191906000526020600020905b81548152906001019060200180831161087f57829003601f168201915b5050505050815260200160028201548152505090506000816020015160ff161115156108dd5760405160e560020a62461bcd02815260040161058d90613a3a565b60015433600090815260186020526040902054600160a060020a0390811691161461091d5760405160e560020a62461bcd02815260040161058d90613a9a565b60009550600094505b6005851015610988576002856005811061093c57fe5b6004020154151561094f57849550610988565b6002866005811061095c57fe5b60040201546002866005811061096e57fe5b6004020154101561097d578495505b600190940193610926565b436002876005811061099657fe5b600402015587600287600581106109a957fe5b600402016003018190555060009350600092505b601654831015610b5b57601b54601860006016868154811015156109dd57fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020600201541115610b505760028660058110610a1857fe5b600402016001018054809190600101610a319190612a8f565b506016805484908110610a4057fe5b600091825260209091200154600160a060020a031660028760058110610a6257fe5b6004020160010185815481101515610a7657fe5b6000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039290921691909117905560028660058110610ab957fe5b600402016002018054809190600101610ad29190612a8f565b5060186000601685815481101515610ae657fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020600290810154908760058110610b1c57fe5b6004020160020185815481101515610b3057fe5b600091825260209091200155610b4d84600163ffffffff61245016565b93505b6001909201916109bd565b7f7047379c64ccafb62f6625e6b2d8eb6e1b0e091fac56a11ab5e2fd896e4db1d0884360028960058110610b8b57fe5b6004020160010160028a600581101515610ba157fe5b60040201600201604051610bb89493929190613bc2565b60405180910390a15050505050505050565b6018602090815260009182526040918290208054600180830180548651600261010094831615949094026000190190911692909204601f8101869004860283018601909652858252600160a060020a0383169560a060020a90930460ff169491929091830182828015610c7e5780601f10610c5357610100808354040283529160200191610c7e565b820191906000526020600020905b815481529060010190602001808311610c6157829003601f168201915b5050505050908060020154905084565b6000826001600160a060020a0382166000908152601a602052604090206003015460ff166001811115610cbd57fe5b14610cdd5760405160e560020a62461bcd02815260040161058d90613aba565b600160a060020a0384166000908152601a60205260409020600201805484908110610d0457fe5b906000526020600020015491505092915050565b81610d21612b36565b600160a060020a0382811660009081526018602090815260409182902082516080810184528154948516815260a060020a90940460ff1684830152600180820180548551600261010094831615949094026000190190911692909204601f81018590048502830185018652808352929486019391929091830182828015610de95780601f10610dbe57610100808354040283529160200191610de9565b820191906000526020600020905b815481529060010190602001808311610dcc57829003601f168201915b5050505050815260200160028201548152505090506000816020015160ff16111515610e2a5760405160e560020a62461bcd02815260040161058d90613a3a565b600160a060020a038416600090815260186020526040902060020154610e56908463ffffffff61245016565b600160a060020a0385166000908152601860205260409081902060020191909155517fb3ef81558ed1a50072a492984535a009da8b129c749500b387f1e5f4886bdde590610ea790869086906137af565b60405180910390a150505050565b33610ebe612b36565b600160a060020a0382811660009081526018602090815260409182902082516080810184528154948516815260a060020a90940460ff1684830152600180820180548551600261010094831615949094026000190190911692909204601f81018590048502830185018652808352929486019391929091830182828015610f865780601f10610f5b57610100808354040283529160200191610f86565b820191906000526020600020905b815481529060010190602001808311610f6957829003601f168201915b5050505050815260200160028201548152505090506000816020015160ff16111515610fc75760405160e560020a62461bcd02815260040161058d90613a3a565b876001600160a060020a0382166000908152601a602052604090206003015460ff166001811115610ff457fe5b146110145760405160e560020a62461bcd02815260040161058d90613aba565b6000808981526019602052604090206004015460a060020a900460ff16600181111561103c57fe5b1461105c5760405160e560020a62461bcd02815260040161058d90613a5a565b61106a89898989898961245d565b6000888152601960209081526040909120855161108f92600390920191870190612ab8565b5060008881526019602052604090819020600401805474ff0000000000000000000000000000000000000000191660a060020a179055517f665329bb9a4e1062edc215d9c5ab57fa54c4c88e3dfbcc68e0cd92fdd010fa6e906110fb908a908a908a908a908a90613967565b60405180910390a1505050505050505050565b6000806060809193509193565b601780548290811061067757fe5b601a60205260009081526040902080546001820154600390920154600160a060020a03909116919060ff1683565b6017545b90565b60008080846001600160a060020a0382166000908152601a602052604090206003015460ff16600181111561118f57fe5b146111af5760405160e560020a62461bcd02815260040161058d90613aba565b60009250600091505b600160a060020a0386166000908152601a602052604090206002015482101561122b57600160a060020a0386166000908152601a6020526040902060020180548691908490811061120557fe5b6000918252602090912001541415611220576001925061122b565b6001909101906111b8565b8293505b50505092915050565b6000816001600160a060020a0382166000908152601a602052604090206003015460ff16600181111561126757fe5b146112875760405160e560020a62461bcd02815260040161058d90613aba565b5050600160a060020a03166000908152601a602052604090206001015490565b6000816001600160a060020a0382166000908152601a602052604090206003015460ff1660018111156112d657fe5b146112f65760405160e560020a62461bcd02815260040161058d90613aba565b5050600160a060020a03166000908152601a602052604090206002015490565b6060806000808415156113295760175494505b611339858763ffffffff61243916565b604051908082528060200260200182016040528015611362578160200160208202803883390190505b509250600091508590505b8481101561122b57601780548290811061138357fe5b6000918252602090912001548351600160a060020a03909116908490849081106113a957fe5b600160a060020a0390921660209283029091019091015260010161136d565b60006001600160a060020a0383166000908152601a602052604090206003015460ff1660018111156113f657fe5b141561140457506001611408565b5060005b919050565b600054600160a060020a031681565b600080606080600061142c612b6b565b611435876126ad565b91506002826005811061144457fe5b600402016080604051908101604052908160008201548152602001600182018054806020026020016040519081016040528092919081815260200182805480156114b757602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611499575b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561150f57602002820191906000526020600020905b8154815260200190600101908083116114fb575b5050509183525050600391909101546020918201528151606083015191830151604090930151909a9199509197509095509350505050565b6000606082611554612b36565b600160a060020a0382811660009081526018602090815260409182902082516080810184528154948516815260a060020a90940460ff1684830152600180820180548551600261010094831615949094026000190190911692909204601f8101859004850283018501865280835292948601939192909183018282801561161c5780601f106115f15761010080835404028352916020019161161c565b820191906000526020600020905b8154815290600101906020018083116115ff57829003601f168201915b5050505050815260200160028201548152505090506000816020015160ff1611151561165d5760405160e560020a62461bcd02815260040161058d90613a3a565b600160a060020a038086166000908152601860205260409020541615156116995760405160e560020a62461bcd02815260040161058d90613a8a565b600160a060020a038581166000908152601860209081526040918290208054600191820180548551600261010095831615959095026000190190911693909304601f81018590048502840185019095528483529416939290918391908301828280156117465780601f1061171b57610100808354040283529160200191611746565b820191906000526020600020905b81548152906001019060200180831161172957829003601f168201915b50505050509050935093505050915091565b60005b84518110156119885760196000868381518110151561177657fe5b6020908102909101810151825281019190915260400160002060040154600160a060020a0316156117bc5760405160e560020a62461bcd02815260040161058d90613aaa565b83818151811015156117ca57fe5b906020019060200201516019600087848151811015156117e657fe5b6020908102909101810151825281019190915260400160002055825183908290811061180e57fe5b9060200190602002015160196000878481518110151561182a57fe5b6020908102919091018101518252810191909152604001600020600101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055815182908290811061188057fe5b9060200190602002015160196000878481518110151561189c57fe5b906020019060200201516000191660001916815260200190815260200160002060020181905550336019600087848151811015156118d657fe5b60209081029190910181015182528101919091526040016000908120600401805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0393909316929092179091558551601990829088908590811061193457fe5b60209081029091018101518252810191909152604001600020600401805474ff0000000000000000000000000000000000000000191660a060020a83600181111561197b57fe5b021790555060010161175b565b7fcb8afab3437be2f96ef2a2932eb02d02fd765bfe8be7c1f5a58edd6452317dde85858585336040516119bf9594939291906138e5565b60405180910390a15050505050565b6000336119d9612b36565b600160a060020a0382811660009081526018602090815260409182902082516080810184528154948516815260a060020a90940460ff1684830152600180820180548551600261010094831615949094026000190190911692909204601f81018590048502830185018652808352929486019391929091830182828015611aa15780601f10611a7657610100808354040283529160200191611aa1565b820191906000526020600020905b815481529060010190602001808311611a8457829003601f168201915b5050505050815260200160028201548152505090506000816020015160ff16111515611ae25760405160e560020a62461bcd02815260040161058d90613a3a565b886001600160a060020a0382166000908152601a602052604090206003015460ff166001811115611b0f57fe5b14611b2f5760405160e560020a62461bcd02815260040161058d90613aba565b600093505b8851841015611ceb576000601960008b87815181101515611b5157fe5b602090810290910181015182528101919091526040016000206004015460ff60a060020a909104166001811115611b8457fe5b14611ba45760405160e560020a62461bcd02815260040161058d90613a5a565b611c258a8a86815181101515611bb657fe5b906020019060200201518a87815181101515611bce57fe5b906020019060200201518a88815181101515611be657fe5b906020019060200201518a89815181101515611bfe57fe5b906020019060200201518a8a815181101515611c1657fe5b9060200190602002015161245d565b8484815181101515611c3357fe5b90602001906020020151601960008b87815181101515611c4f57fe5b60209081029091018101518252818101929092526040016000208251611c7f936003909201929190910190612ab8565b506001601960008b87815181101515611c9457fe5b60209081029091018101518252810191909152604001600020600401805474ff0000000000000000000000000000000000000000191660a060020a836001811115611cdb57fe5b0217905550600190930192611b34565b7f7243cbab94fa1d25e0cb54fdd36b41f803ff5e5a29aaae09979a888b156b58728989898989604051611d22959493929190613879565b60405180910390a150505050505050505050565b600084815260196020526040902060040154600160a060020a031615611d715760405160e560020a62461bcd02815260040161058d90613aaa565b60008481526019602052604090819020848155600181018054600160a060020a03861673ffffffffffffffffffffffffffffffffffffffff199182161790915560028201849055600490910180549091163390811774ff0000000000000000000000000000000000000000191690915590517f51364a5a527e38841b15c974f7924dad755bc9ce0d29701d7501a7bd297b787b91610ea79187918791879187916139b5565b33611e1f612b36565b600160a060020a0382811660009081526018602090815260409182902082516080810184528154948516815260a060020a90940460ff1684830152600180820180548551600261010094831615949094026000190190911692909204601f81018590048502830185018652808352929486019391929091830182828015611ee75780601f10611ebc57610100808354040283529160200191611ee7565b820191906000526020600020905b815481529060010190602001808311611eca57829003601f168201915b5050505050815260200160028201548152505090506000816020015160ff16111515611f285760405160e560020a62461bcd02815260040161058d90613a3a565b600160a060020a0386166000908152601a602052604081206003015460ff166001811115611f5257fe5b14611f725760405160e560020a62461bcd02815260040161058d90613a4a565b600160a060020a038681166000818152601a6020526040808220805494891673ffffffffffffffffffffffffffffffffffffffff1995861617815560018082018b90556003909101805460ff1916821790556017805491820181559092527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c159091018054909316909117909155517fff27b3bb5dfb682b066cdace68b5dda84d03c3d2eadac54284aaec44cbcff5169061202f90889088906137af565b60405180910390a1505050505050565b6000606061204b612b6b565b606060008060008060008060006120618d6126ad565b9a5061206c8b612755565b995060028b6005811061207b57fe5b600402016080604051908101604052908160008201548152602001600182018054806020026020016040519081016040528092919081815260200182805480156120ee57602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116120d0575b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561214657602002820191906000526020600020905b815481526020019060010190808311612132575b505050505081526020016003820154815250509850601c54604051908082528060200260200182016040528015612187578160200160208202803883390190505b5097505b8751871015612350575b600095508589606001518e8e6040516020018085815260200184815260200183815260200182600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019450505050506040516020818303038152906040526040518082805190602001908083835b602083106122255780518252601f199092019160209182019101612206565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902094508951856001900481151561226457fe5b069350898481518110151561227557fe5b906020019060200201519250600091505b87518110156122d157878181518110151561229d57fe5b90602001906020020151600160a060020a031683600160a060020a031614156122c957600191506122d1565b600101612286565b811515612303578288888151811015156122e757fe5b600160a060020a03909216602092830290910190910152612317565b61231486600163ffffffff61245016565b95505b878781518110151561232557fe5b90602001906020020151600160a060020a03166000141561234557612195565b60019096019561218b565b50505050505050505050505050565b601960209081526000918252604091829020805460018083015460028085015460038601805489516101009682161596909602600019011692909204601f81018890048802850188019098528784529396600160a060020a03909216959394939091908301828280156124135780601f106123e857610100808354040283529160200191612413565b820191906000526020600020905b8154815290600101906020018083116123f657829003601f168201915b50505060049093015491925050600160a060020a0381169060ff60a060020a9091041686565b60008282111561244557fe5b508082035b92915050565b8181018281101561244a57fe5b600160a060020a0386166000908152601a602052604081206002015490808215156124a85786156124a35760405160e560020a62461bcd02815260040161058d90613a7a565b61250b565b600160a060020a0389166000908152601a602052604090206002016124d484600163ffffffff61243916565b815481106124de57fe5b600091825260209091200154871461250b5760405160e560020a62461bcd02815260040161058d90613a6a565b600160a060020a0389166000908152601a602052604090206002018054906125369060018301612a8f565b50600160a060020a0389166000908152601a6020526040902060020180548791908590811061256157fe5b60009182526020918290200191909155604080518083018b81529181018a90526060810189905287518b938b938b938b939192608090910191908401908083835b602083106125c15780518252601f1990920191602091820191016125a2565b6001836020036101000a0380198251168184511680821785525050505050509050019450505050506040516020818303038152906040526040518082805190602001908083835b602083106126275780518252601f199092019160209182019101612608565b5181516020939093036101000a60001901801990911692169190911790526040519201829003909120945061266292508491508690506129d2565b33600090815260186020526040902054909150600160a060020a038083169116146126a25760405160e560020a62461bcd02815260040161058d90613aca565b505050505050505050565b6000600019815b60058110156127225783600282600581106126cb57fe5b60040201541180159061271157508160000b600019148061271157506002600083900b600581106126f857fe5b60040201546002826005811061270a57fe5b6004020154115b1561271a578091505b6001016126b4565b600019600083900b141561274b5760405160e560020a62461bcd02815260040161058d90613ada565b5060000b92915050565b606061275f612b6b565b60008060608180806002896005811061277457fe5b600402016080604051908101604052908160008201548152602001600182018054806020026020016040519081016040528092919081815260200182805480156127e757602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116127c9575b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561283f57602002820191906000526020600020905b81548152602001906001019080831161282b575b50505050508152602001600382015481525050965060009550600094505b8660200151518510156128cd57602087015180518690811061287b57fe5b60209081029091010151600160a060020a0316156128c2576128bf8760400151868151811015156128a857fe5b60209081029091010151879063ffffffff61245016565b95505b60019094019361285d565b856040519080825280602002602001820160405280156128f7578160200160208202803883390190505b50935060009250600091505b8660200151518210156129c557602087015180518390811061292157fe5b60209081029091010151600160a060020a0316156129ba575060005b604087015180518390811061294e57fe5b906020019060200201518110156129ba57602087015180518390811061297057fe5b90602001906020020151848481518110151561298857fe5b600160a060020a039092166020928302909101909101526129b083600163ffffffff61245016565b925060010161293d565b600190910190612903565b5091979650505050505050565b600080600080845160411415156129ec576000935061122f565b50505060208201516040830151606084015160001a601b60ff82161015612a1157601b015b8060ff16601b14158015612a2957508060ff16601c14155b15612a37576000935061122f565b60018682858560405160008152602001604052604051612a5a94939291906139f7565b60206040516020810390808403906000865af1158015612a7e573d6000803e3d6000fd5b50505060206040510351935061122f565b815481835581811115612ab357600083815260209020612ab3918101908301612b94565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612af957805160ff1916838001178555612b26565b82800160010185558215612b26579182015b82811115612b26578251825591602001919060010190612b0b565b50612b32929150612b94565b5090565b6080604051908101604052806000600160a060020a03168152602001600060ff16815260200160608152602001600081525090565b608060405190810160405280600081526020016060815260200160608152602001600081525090565b61115b91905b80821115612b325760008155600101612b9a565b6000612bba8235613c93565b9392505050565b6000601f82018313612bd257600080fd5b8135612be5612be082613c2a565b613c03565b91508181835260208401935060208101905083856020840282011115612c0a57600080fd5b60005b83811015612c365781612c208882612bae565b8452506020928301929190910190600101612c0d565b5050505092915050565b6000601f82018313612c5157600080fd5b8135612c5f612be082613c2a565b91508181835260208401935060208101905083856020840282011115612c8457600080fd5b60005b83811015612c365781612c9a8882612d7d565b8452506020928301929190910190600101612c87565b6000601f82018313612cc157600080fd5b8135612ccf612be082613c2a565b81815260209384019390925082018360005b83811015612c365781358601612cf78882612d89565b8452506020928301929190910190600101612ce1565b6000601f82018313612d1e57600080fd5b8135612d2c612be082613c2a565b91508181835260208401935060208101905083856020840282011115612d5157600080fd5b60005b83811015612c365781612d678882612d7d565b8452506020928301929190910190600101612d54565b6000612bba823561115b565b6000601f82018313612d9a57600080fd5b8135612da8612be082613c4b565b91508082526020830160208301858383011115612dc457600080fd5b61122f838284613ccc565b600060208284031215612de157600080fd5b6000612ded8484612bae565b949350505050565b60008060008060008060c08789031215612e0e57600080fd5b6000612e1a8989612bae565b965050602087013567ffffffffffffffff811115612e3757600080fd5b612e4389828a01612c40565b955050604087013567ffffffffffffffff811115612e6057600080fd5b612e6c89828a01612c40565b945050606087013567ffffffffffffffff811115612e8957600080fd5b612e9589828a01612c40565b935050608087013567ffffffffffffffff811115612eb257600080fd5b612ebe89828a01612cb0565b92505060a087013567ffffffffffffffff811115612edb57600080fd5b612ee789828a01612cb0565b9150509295509295509295565b60008060408385031215612f0757600080fd5b6000612f138585612bae565b9250506020612f2485828601612d7d565b9150509250929050565b60008060008060808587031215612f4457600080fd5b6000612f508787612bae565b9450506020612f6187828801612d7d565b9350506040612f7287828801612bae565b925050606085013567ffffffffffffffff811115612f8f57600080fd5b612f9b87828801612d89565b91505092959194509250565b60008060008060008060c08789031215612fc057600080fd5b6000612fcc8989612bae565b9650506020612fdd89828a01612d7d565b9550506040612fee89828a01612d7d565b9450506060612fff89828a01612d7d565b935050608087013567ffffffffffffffff81111561301c57600080fd5b61302889828a01612d89565b92505060a087013567ffffffffffffffff81111561304557600080fd5b612ee789828a01612d89565b6000806040838503121561306457600080fd5b60006130708585612bae565b925050602083013567ffffffffffffffff81111561308d57600080fd5b612f2485828601612d89565b6000806000606084860312156130ae57600080fd5b60006130ba8686612bae565b93505060206130cb86828701612d7d565b92505060406130dc86828701612d7d565b9150509250925092565b600080600080608085870312156130fc57600080fd5b843567ffffffffffffffff81111561311357600080fd5b61311f87828801612c40565b945050602085013567ffffffffffffffff81111561313c57600080fd5b61314887828801612d0d565b935050604085013567ffffffffffffffff81111561316557600080fd5b61317187828801612bc1565b925050606085013567ffffffffffffffff81111561318e57600080fd5b612f9b87828801612d0d565b6000602082840312156131ac57600080fd5b6000612ded8484612d7d565b600080600080608085870312156131ce57600080fd5b60006131da8787612d7d565b94505060206131eb87828801612d7d565b93505060406131fc87828801612bae565b9250506060612f9b87828801612d7d565b6000806040838503121561322057600080fd5b600061322c8585612d7d565b9250506020612f2485828601612bae565b6000806040838503121561325057600080fd5b60006130708585612d7d565b6000806040838503121561326f57600080fd5b6000612f138585612d7d565b61328481613c93565b82525050565b600061329582613c85565b8084526020840193506132a783613c73565b60005b828110156132d7576132bd86835161327b565b6132c682613c73565b6020969096019591506001016132aa565b5093949350505050565b60006132ec82613c89565b8084526020840193506132fe83613c79565b60005b828110156132d75761331486835461327b565b61331d82613c8d565b602096909601959150600101613301565b600061333982613c85565b80845260208401935061334b83613c73565b60005b828110156132d757613361868351613485565b61336a82613c73565b60209690960195915060010161334e565b600061338682613c85565b8084526020840193508360208202850161339f85613c73565b60005b848110156133d65783830388526133ba83835161348e565b92506133c582613c73565b6020989098019791506001016133a2565b50909695505050505050565b60006133ed82613c85565b8084526020840193506133ff83613c73565b60005b828110156132d757613415868351613485565b61341e82613c73565b602096909601959150600101613402565b600061343a82613c89565b80845260208401935061344c83613c79565b60005b828110156132d757613462868354613485565b61346b82613c8d565b60209690960195915060010161344f565b61328481613c9f565b6132848161115b565b600061349982613c85565b8084526134ad816020860160208601613cd8565b6134b681613d08565b9093016020019392505050565b61328481613cb6565b61328481613cc1565b601481527f556e7265676973746572656420776f726b65722e000000000000000000000000602082015260400190565b602181527f53656372657420636f6e747261637420616c7265616479206465706c6f79656460208201527f2e00000000000000000000000000000000000000000000000000000000000000604082015260600190565b601381527f496e76616c6964207461736b2073746174757300000000000000000000000000602082015260400190565b601e81527f496e76616c696420696e7075742073746174652064656c746120686173680000602082015260400190565b602e81527f496e76616c696420696e7075742073746174652064656c74612068617368206660208201527f6f7220656d707479207374617465000000000000000000000000000000000000604082015260600190565b601581527f576f726b6572206e6f7420726567697374657265640000000000000000000000602082015260400190565b602681527f4f6e6c7920746865205072696e636970616c2063616e2075706461746520746860208201527f6520736565640000000000000000000000000000000000000000000000000000604082015260600190565b601381527f5461736b20616c72656164792065786973742e00000000000000000000000000602082015260400190565b601d81527f53656372657420636f6e7472616374206e6f74206465706c6f7965642e000000602082015260400190565b601281527f496e76616c6964207369676e61747572652e0000000000000000000000000000602082015260400190565b603681527f4e6f20776f726b65727320706172616d657465727320656e74727920666f722060208201527f73706563696669656420626c6f636b206e756d62657200000000000000000000604082015260600190565b61328481613cb0565b6020810161244a828461327b565b604081016137a2828561327b565b612bba602083018461327b565b604081016137bd828561327b565b612bba6020830184613485565b606081016137d8828661327b565b6137e56020830185613485565b612ded60408301846134cc565b60408101613800828561327b565b8181036020830152612ded818461348e565b60808101613820828761327b565b61382d602083018661377d565b818103604083015261383f818561348e565b905061384e6060830184613485565b95945050505050565b60208082528101612bba818461328a565b60208082528101612bba818461332e565b60a0808252810161388a818861332e565b9050818103602083015261389e818761332e565b905081810360408301526138b2818661332e565b905081810360608301526138c6818561337b565b905081810360808301526138da818461337b565b979650505050505050565b60a080825281016138f6818861332e565b9050818103602083015261390a81876133e2565b9050818103604083015261391e818661328a565b9050818103606083015261393281856133e2565b9050613941608083018461327b565b9695505050505050565b6020810161244a828461347c565b6020810161244a8284613485565b60a081016139758288613485565b6139826020830187613485565b61398f6040830186613485565b81810360608301526139a1818561348e565b905081810360808301526138da818461348e565b60a081016139c38288613485565b6139d06020830187613485565b6139dd604083018661327b565b6139ea6060830185613485565b613941608083018461327b565b60808101613a058287613485565b613a12602083018661377d565b613a1f6040830185613485565b61384e6060830184613485565b6020810161244a82846134c3565b6020808252810161244a816134d5565b6020808252810161244a81613505565b6020808252810161244a8161355b565b6020808252810161244a8161358b565b6020808252810161244a816135bb565b6020808252810161244a81613611565b6020808252810161244a81613641565b6020808252810161244a81613697565b6020808252810161244a816136c7565b6020808252810161244a816136f7565b6020808252810161244a81613727565b60c08101613af88289613485565b613b05602083018861327b565b613b126040830187613485565b8181036060830152613b24818661348e565b9050613b33608083018561327b565b6138da60a08301846134cc565b60808101613b4e8287613485565b613b5b6020830186613485565b8181036040830152613b6d818561328a565b90508181036060830152613941818461328a565b60808101613b8f8287613485565b613b9c6020830186613485565b8181036040830152613bae818561328a565b9050818103606083015261394181846133e2565b60808101613bd08287613485565b613bdd6020830186613485565b8181036040830152613bef81856132e1565b90508181036060830152613941818461342f565b60405181810167ffffffffffffffff81118282101715613c2257600080fd5b604052919050565b600067ffffffffffffffff821115613c4157600080fd5b5060209081020190565b600067ffffffffffffffff821115613c6257600080fd5b506020601f91909101601f19160190565b60200190565b60009081526020902090565b5190565b5490565b60010190565b600160a060020a031690565b151590565b600060028210612b3257fe5b60ff1690565b600061244a82613c93565b600061244a82613ca4565b82818337506000910152565b60005b83811015613cf3578181015183820152602001613cdb565b83811115613d02576000848401525b50505050565b601f01601f1916905600a265627a7a7230582089b352402456618e80684a1428cc8d207c5060670b7820a30537acf16bae1f306c6578706572696d656e74616cf50037", - "sourceMap": "808:19941:2:-;;;4522:202;8:9:-1;5:2;;;30:1;27;20:12;5:2;4522:202:2;;;;;;;;;;;;;;;;;;;;;;4594:8;:31;;-1:-1:-1;;;;;4594:31:2;;;-1:-1:-1;;;;;;4594:31:2;;;;;;;;4635:22;;;;;;;;;;;4667:16;:20;4715:2;4697:15;:20;808:19941;;5:122:-1;;83:39;114:6;108:13;83:39;;;74:48;68:59;-1:-1;;;68:59;134:399;;;266:2;254:9;245:7;241:23;237:32;234:2;;;282:1;279;272:12;234:2;317:1;334:64;390:7;370:9;334:64;;;324:74;;296:108;435:2;453:64;509:7;500:6;489:9;485:22;453:64;;;443:74;;414:109;228:305;;;;;;540:128;-1:-1;;;;;609:54;;592:76;;808:19941:2;;;;;;", - "deployedSourceMap": "808:19941:2:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9024:481;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9024:481:2;;;;;;;;;;;;;;;;;;;;;;;;;3183:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3183:32:2;;;;;;;;;;;;;;;;;5629:733;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5629:733:2;;;;;;;;;;;14703:2001;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;14703:2001:2;;;;;;;;;3376:41;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3376:41:2;;;;;;;;;;;;;;;;;;;;8727:195;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8727:195:2;;;;;;;;;;;;;;;;;6368:397;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6368:397:2;;;;;;;;;12648:636;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;12648:636:2;;;;;;;;;19877:376;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;19877:376:2;;;;;;;;;;;;;;;;;;;;3275:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3275:28:2;;;;;;;;;3466:51;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3466:51:2;;;;;;;;;;;;;;;;;;;7917:117;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7917:117:2;;;;9511:422;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9511:422:2;;;;;;;;;;;;;;;;;7750:161;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7750:161:2;;;;;;;;;8542:179;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8542:179:2;;;;;;;;;8131:405;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8131:405:2;;;;;;;;;;;;;;;;;7512:232;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7512:232:2;;;;;;;;;959:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;959:21:2;;;;;;;;;;;;17302:318;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;17302:318:2;;;;;;;;;;;;;;;;;;;;20390:357;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;20390:357:2;;;;;;;;;;;;;;;;;;10498:647;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;10498:647:2;;;;;;;;;13290:828;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;13290:828:2;;;;;;;;;9984:508;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9984:508:2;;;;;;;;;6940:566;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6940:566:2;;;;;;;;;18450:1276;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;18450:1276:2;;;;;;;;;3423:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3423:37:2;;;;;;;;;;;;;;;;;;;;;;9024:481;9154:9;;9342:8;;9133:6;5196:29;-1:-1:-1;;;;;5168:17:2;;;;;;:9;:17;;;;;:24;;;;;;:57;;;;;;;;5160:99;;;;-1:-1:-1;;;;;5160:99:2;;;;;;;;;;;;;;;;;9183:9;;9179:88;;;-1:-1:-1;;;;;9215:17:2;;;;;;:9;:17;;;;;:34;;:41;;-1:-1:-1;9179:88:2;9316:15;:4;9325:5;9316:15;:8;:15;:::i;:::-;9302:30;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;9302:30:2;;9276:56;;9353:1;9342:12;;9378:5;9369:14;;9364:112;9389:4;9385:1;:8;9364:112;;;-1:-1:-1;;;;;9428:17:2;;;;;;:9;:17;;;;;:34;;:37;;9463:1;;9428:37;;;;;;;;;;;;;;9414:6;9421:3;9414:11;;;;;;;;;;;;;;;;;;:51;9395:3;;;;;9364:112;;;-1:-1:-1;9492:6:2;;9024:481;-1:-1:-1;;;;;;9024:481:2:o;3183:32::-;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3183:32:2;;-1:-1:-1;3183:32:2;:::o;5629:733::-;5861:10;5965;5853:19;;;:7;:19;;;;;:26;-1:-1:-1;;;;;5853:26:2;:33;5849:249;;;-1:-1:-1;5978:15:2;:22;;;;;6014:24;;;;;;:::i;:::-;;6077:10;6052:15;6068:5;6052:22;;;;;;;;;;;;;;;;;;:35;;;;;-1:-1:-1;;;;;6052:35:2;;;;;-1:-1:-1;;;;;6052:35:2;;;;;;5849:249;6156:10;6148:19;;;;:7;:19;;;;;;;:35;;-1:-1:-1;;6148:35:2;-1:-1:-1;;;;;6148:35:2;;;;;6193:27;;;:31;;;;6234:35;;;;-1:-1:-1;6234:26:2;;:35;;;;:::i;:::-;-1:-1:-1;6287:10:2;6279:19;;;;:7;:19;;;;;;;:30;;-1:-1:-1;;6279:30:2;-1:-1:-1;;;6279:30:2;;;6325;;;;;6348:6;;6325:30;;;;;;;;;;5629:733;;;:::o;14703:2001::-;15419:15;15453:7;16026:16;16061:7;14783:10;4988:20;;:::i;:::-;-1:-1:-1;;;;;5011:13:2;;;;;;;:7;:13;;;;;;;;;4988:36;;;;;;;;;;;;;;-1:-1:-1;;;4988:36:2;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4988:36:2;;;;;;;;;;;;;;;;;;;;;;;;;5011:13;;4988:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5058:1;5042:6;:13;;;:17;;;5034:50;;;;;;-1:-1:-1;;;;;5034:50:2;;;;;;;;;15046:9;;15024:10;15046:9;15016:19;;;:7;:19;;;;;:26;-1:-1:-1;;;;;15016:26:2;;;15046:9;;15016:39;15008:90;;;;-1:-1:-1;;;;;15008:90:2;;;;;;;;;15437:1;15419:19;;15463:1;15453:11;;15448:414;15471:20;15466:2;:25;15448:414;;;15601:13;15615:2;15601:17;;;;;;;;;;:34;:39;15597:255;;;15673:2;15660:15;;15693:5;;15597:255;15760:13;15774:10;15760:25;;;;;;;;;;:42;15723:13;15737:2;15723:17;;;;;;;;;;:34;:79;15719:133;;;15835:2;15822:15;;15719:133;15493:4;;;;;15448:414;;;15916:12;15871:13;15885:10;15871:25;;;;;;;;;;:57;15971:4;15938:13;15952:10;15938:25;;;;;;;;;;:30;;:37;;;;16045:1;16026:20;;16071:1;16061:11;;16056:516;16079:15;:22;16074:27;;16056:516;;;16166:16;;16127:7;:28;16135:15;16151:2;16135:19;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;16135:19:2;16127:28;;;;;;;;;;;;:36;;;:55;16123:439;;;16202:13;16216:10;16202:25;;;;;;;;;;:33;;:42;;;;;;;;;;;:::i;:::-;-1:-1:-1;16311:15:2;:19;;16327:2;;16311:19;;;;;;;;;;;;;;;;-1:-1:-1;;;;;16311:19:2;16262:13;16276:10;16262:25;;;;;;;;;;:33;;16296:11;16262:46;;;;;;;;;;;;;;;;;;;:68;;-1:-1:-1;;16262:68:2;-1:-1:-1;;;;;16262:68:2;;;;;;;;;;16349:13;16363:10;16349:25;;;;;;;;;;:34;;:43;;;;;;;;;;;:::i;:::-;;16460:7;:28;16468:15;16484:2;16468:19;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;16468:19:2;16460:28;;;;;;;;;;;;:36;;;;;;16424:10;16410:25;;;;;;;;;;:34;;16445:11;16410:47;;;;;;;;;;;;;;;;;;;:86;16529:18;:11;16545:1;16529:18;:15;:18;:::i;:::-;16515:32;;16123:439;16103:4;;;;;16056:516;;;16586:111;16607:4;16613:12;16627:13;16641:10;16627:25;;;;;;;;;;:33;;16662:13;16676:10;16662:25;;;;;;;;;;;;:34;;16586:111;;;;;;;;;;;;;;;;;;14703:2001;;;;;;;;:::o;3376:41::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3376:41:2;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3376:41:2;;;-1:-1:-1;;;3376:41:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;8727:195::-;8844:7;8823:6;5196:29;-1:-1:-1;;;;;5168:17:2;;;;;;:9;:17;;;;;:24;;;;;;:57;;;;;;;;5160:99;;;;-1:-1:-1;;;;;5160:99:2;;;;;;;;;-1:-1:-1;;;;;8874:17:2;;;;;;:9;:17;;;;;:34;;:41;;8909:5;;8874:41;;;;;;;;;;;;;;8867:48;;8727:195;;;;;:::o;6368:397::-;6449:9;4988:20;;:::i;:::-;-1:-1:-1;;;;;5011:13:2;;;;;;;:7;:13;;;;;;;;;4988:36;;;;;;;;;;;;;;-1:-1:-1;;;4988:36:2;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4988:36:2;;;;;;;;;;;;;;;;;;;;;;;;;5011:13;;4988:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5058:1;5042:6;:13;;;:17;;;5034:50;;;;;;-1:-1:-1;;;;;5034:50:2;;;;;;;;;-1:-1:-1;;;;;6668:18:2;;;;;;:7;:18;;;;;:26;;;:38;;6699:6;6668:38;:30;:38;:::i;:::-;-1:-1:-1;;;;;6639:18:2;;;;;;:7;:18;;;;;;;:26;;:67;;;;6722:36;;;;;6647:9;;6751:6;;6722:36;;;;;;;;;;6368:397;;;;:::o;12648:636::-;12868:10;4988:20;;:::i;:::-;-1:-1:-1;;;;;5011:13:2;;;;;;;:7;:13;;;;;;;;;4988:36;;;;;;;;;;;;;;-1:-1:-1;;;4988:36:2;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4988:36:2;;;;;;;;;;;;;;;;;;;;;;;;;5011:13;;4988:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5058:1;5042:6;:13;;;:17;;;5034:50;;;;;;-1:-1:-1;;;;;5034:50:2;;;;;;;;;12901:6;5196:29;-1:-1:-1;;;;;5168:17:2;;;;;;:9;:17;;;;;:24;;;;;;:57;;;;;;;;5160:99;;;;-1:-1:-1;;;;;5160:99:2;;;;;;;;;12955:24;12931:13;;;;:5;:13;;;;;:20;;;-1:-1:-1;;;12931:20:2;;;;:48;;;;;;;;;12923:80;;;;-1:-1:-1;;;;;12923:80:2;;;;;;;;;13013;13027:6;13035;13043:16;13061:17;13080:7;13089:3;13013:13;:80::i;:::-;13104:13;;;;:5;:13;;;;;;;;:25;;;;:19;;;;;:25;;;;:::i;:::-;-1:-1:-1;13139:13:2;;;;:5;:13;;;;;;;:20;;:49;;-1:-1:-1;;13139:49:2;-1:-1:-1;;;13139:49:2;;;13203:74;;;;;13139:13;;13227:16;;13245:17;;13264:7;;13273:3;;13203:74;;;;;;;;;;5094:1;12648:636;;;;;;;;:::o;19877:376::-;19954:4;;19966:9;;19877:376;;;;;:::o;3275:28::-;;;;;;;;;;;3466:51;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3466:51:2;;;;;;;;:::o;7917:117::-;8009:11;:18;7917:117;;:::o;9511:422::-;9639:4;;;9618:6;5196:29;-1:-1:-1;;;;;5168:17:2;;;;;;:9;:17;;;;;:24;;;;;;:57;;;;;;;;5160:99;;;;-1:-1:-1;;;;;5160:99:2;;;;;;;;;9672:5;9659:18;;9701:1;9692:10;;9687:218;-1:-1:-1;;;;;9708:17:2;;;;;;:9;:17;;;;;:34;;:41;9704:45;;9687:218;;;-1:-1:-1;;;;;9773:17:2;;:55;:17;;;:9;:17;;;;;:34;;:37;;9814:14;;9773:34;9808:1;;9773:37;;;;;;;;;;;;;;;;:55;9769:126;;;9855:4;9847:12;;9876:5;;9769:126;9751:3;;;;;9687:218;;;9921:5;9914:12;;5269:1;9511:422;;;;;;;:::o;7750:161::-;7849:7;7828:6;5196:29;-1:-1:-1;;;;;5168:17:2;;;;;;:9;:17;;;;;:24;;;;;;:57;;;;;;;;5160:99;;;;-1:-1:-1;;;;;5160:99:2;;;;;;;;;-1:-1:-1;;;;;;;7878:17:2;;;;;:9;:17;;;;;:26;;;;7750:161::o;8542:179::-;8646:4;8625:6;5196:29;-1:-1:-1;;;;;5168:17:2;;;;;;:9;:17;;;;;:24;;;;;;:57;;;;;;;;5160:99;;;;-1:-1:-1;;;;;5160:99:2;;;;;;;;;-1:-1:-1;;;;;;;8673:17:2;;;;;:9;:17;;;;;:34;;:41;;8542:179::o;8131:405::-;8223:9;;8391:8;;8252:9;;8248:65;;;8284:11;:18;;-1:-1:-1;8248:65:2;8365:15;:4;8374:5;8365:15;:8;:15;:::i;:::-;8351:30;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;8351:30:2;;8322:59;;8402:1;8391:12;;8427:5;8418:14;;8413:91;8438:4;8434:1;:8;8413:91;;;8479:11;:14;;8491:1;;8479:14;;;;;;;;;;;;;;;;8462;;-1:-1:-1;;;;;8479:14:2;;;;8462:9;;8472:3;;8462:14;;;;;;-1:-1:-1;;;;;8462:31:2;;;:14;;;;;;;;;;:31;8444:3;;8413:91;;7512:232;7581:4;7632:29;-1:-1:-1;;;;;7604:17:2;;;;;;:9;:17;;;;;:24;;;;;;:57;;;;;;;;7600:138;;;-1:-1:-1;7683:4:2;7676:11;;7600:138;-1:-1:-1;7723:5:2;7600:138;7512:232;;;:::o;959:21::-;;;-1:-1:-1;;;;;959:21:2;;:::o;17302:318::-;17378:4;17384;17390:9;17401:6;17419:10;17475:27;;:::i;:::-;17432:33;17453:11;17432:20;:33::i;:::-;17419:46;-1:-1:-1;17505:13:2;17419:46;17505:20;;;;;;;;;;17475:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;17475:50:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;17475:50:2;;;-1:-1:-1;;17475:50:2;;;;;;;;;;;17543:23;;17568:11;;;;17581:14;;;;17597:15;;;;;17543:23;;17568:11;;-1:-1:-1;17581:14:2;;-1:-1:-1;17597:15:2;;-1:-1:-1;17302:318:2;-1:-1:-1;;;;17302:318:2:o;20390:357::-;20493:7;20502:5;20469:9;4988:20;;:::i;:::-;-1:-1:-1;;;;;5011:13:2;;;;;;;:7;:13;;;;;;;;;4988:36;;;;;;;;;;;;;;-1:-1:-1;;;4988:36:2;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4988:36:2;;;;;;;;;;;;;;;;;;;;;;;;;5011:13;;4988:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5058:1;5042:6;:13;;;:17;;;5034:50;;;;;;-1:-1:-1;;;;;5034:50:2;;;;;;;;;-1:-1:-1;;;;;20611:18:2;;;;;;;:7;:18;;;;;:25;;:32;;20603:66;;;;-1:-1:-1;;;;;20603:66:2;;;;;;;;;-1:-1:-1;;;;;20687:18:2;;;;;;;:7;:18;;;;;;;;;:25;;;20714;;;20679:61;;;;;20687:25;20679:61;;;;;;;;-1:-1:-1;;20679:61:2;;;;;;;;;;;;;;;;;;;;;;;;;;20687:25;;;20714;20679:61;;20714:25;;20679:61;;;20714:25;20679:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20390:357;;;;;:::o;10498:647::-;10663:6;10658:400;10679:7;:14;10675:1;:18;10658:400;;;10722:5;:17;10728:7;10736:1;10728:10;;;;;;;;;;;;;;;;;;;;10722:17;;;;;;;;;;;;:24;;;-1:-1:-1;;;;;10722:24:2;:31;10714:63;;;;-1:-1:-1;;;;;10714:63:2;;;;;;;;;10816:4;10821:1;10816:7;;;;;;;;;;;;;;;;;;10792:5;:17;10798:7;10806:1;10798:10;;;;;;;;;;;;;;;;;;;;10792:17;;;;;;;;;;;;:31;10863:9;;:6;;10870:1;;10863:9;;;;;;;;;;;;;;10837:5;:17;10843:7;10851:1;10843:10;;;;;;;;;;;;;;;;;;;;;10837:17;;;;;;;;;;-1:-1:-1;10837:17:2;:23;;:35;;-1:-1:-1;;10837:35:2;-1:-1:-1;;;;;10837:35:2;;;;;;;;;;10917:14;;;;10929:1;;10917:14;;;;;;;;;;;;;;10886:5;:17;10892:7;10900:1;10892:10;;;;;;;;;;;;;;;;;;10886:17;;;;;;;;;;;;;;;;;:28;;:45;;;;10972:10;10945:5;:17;10951:7;10959:1;10951:10;;;;;;;;;;;;;;;;;;;;;10945:17;;;;;;;;;;-1:-1:-1;10945:17:2;;;:24;;:37;;-1:-1:-1;;10945:37:2;-1:-1:-1;;;;;10945:37:2;;;;;;;;;;;11002:10;;10996:5;;-1:-1:-1;;11002:10:2;;11010:1;;11002:10;;;;;;;;;;;;;;;;10996:17;;;;;;;;;;;;:24;;:51;;-1:-1:-1;;10996:51:2;-1:-1:-1;;;10996:51:2;;;;;;;;;;;;;-1:-1:-1;10695:3:2;;10658:400;;;11072:66;11091:7;11100:4;11106:6;11114:11;11127:10;11072:66;;;;;;;;;;;;;;;;;;;10498:647;;;;;:::o;13290:828::-;13588:6;13528:10;4988:20;;:::i;:::-;-1:-1:-1;;;;;5011:13:2;;;;;;;:7;:13;;;;;;;;;4988:36;;;;;;;;;;;;;;-1:-1:-1;;;4988:36:2;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4988:36:2;;;;;;;;;;;;;;;;;;;;;;;;;5011:13;;4988:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5058:1;5042:6;:13;;;:17;;;5034:50;;;;;;-1:-1:-1;;;;;5034:50:2;;;;;;;;;13561:6;5196:29;-1:-1:-1;;;;;5168:17:2;;;;;;:9;:17;;;;;:24;;;;;;:57;;;;;;;;5160:99;;;;-1:-1:-1;;;;;5160:99:2;;;;;;;;;13597:1;13588:10;;13583:432;13604:7;:14;13600:1;:18;13583:432;;;13725:24;13697:5;:17;13703:7;13711:1;13703:10;;;;;;;;;;;;;;;;;;;;13697:17;;;;;;;;;;;;:24;;;;-1:-1:-1;;;13697:24:2;;;;:52;;;;;;;;;13689:84;;;;-1:-1:-1;;;;;13689:84:2;;;;;;;;;13787:102;13801:6;13809:7;13817:1;13809:10;;;;;;;;;;;;;;;;;;13821:18;13840:1;13821:21;;;;;;;;;;;;;;;;;;13844:19;13864:1;13844:22;;;;;;;;;;;;;;;;;;13868:8;13877:1;13868:11;;;;;;;;;;;;;;;;;;13881:4;13886:1;13881:7;;;;;;;;;;;;;;;;;;13787:13;:102::i;:::-;13930:4;13935:1;13930:7;;;;;;;;;;;;;;;;;;13904:5;:17;13910:7;13918:1;13910:10;;;;;;;;;;;;;;;;;;;;13904:17;;;;;;;;;;;;;:33;;;;:23;;;;;:33;;;;;;:::i;:::-;;13978:26;13951:5;:17;13957:7;13965:1;13957:10;;;;;;;;;;;;;;;;;;;;13951:17;;;;;;;;;;;;:24;;:53;;-1:-1:-1;;13951:53:2;-1:-1:-1;;;13951:53:2;;;;;;;;;;;;;-1:-1:-1;13620:3:2;;;;;13583:432;;;14029:82;14046:7;14055:18;14075:19;14096:8;14106:4;14029:82;;;;;;;;;;;;;;;;;;;5094:1;13290:828;;;;;;;;;:::o;9984:508::-;10139:13;;;;:5;:13;;;;;:20;;;-1:-1:-1;;;;;10139:20:2;:27;10131:59;;;;-1:-1:-1;;;;;10131:59:2;;;;;;;;;10201:13;;;;:5;:13;;;;;;;:23;;;10234:19;;;:27;;-1:-1:-1;;;;;10234:27:2;;-1:-1:-1;;10234:27:2;;;;;;;10271:24;;;:37;;;10318:20;;;;:33;;;;;10341:10;10318:33;;;-1:-1:-1;;10361:47:2;;;;10424:61;;;;;;10201:13;;:23;;10234:27;;10271:37;;10424:61;;6940:566;7062:10;4988:20;;:::i;:::-;-1:-1:-1;;;;;5011:13:2;;;;;;;:7;:13;;;;;;;;;4988:36;;;;;;;;;;;;;;-1:-1:-1;;;4988:36:2;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4988:36:2;;;;;;;;;;;;;;;;;;;;;;;;;5011:13;;4988:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5058:1;5042:6;:13;;;:17;;;5034:50;;;;;;-1:-1:-1;;;;;5034:50:2;;;;;;;;;-1:-1:-1;;;;;7096:17:2;;7124:30;7096:17;;;:9;:17;;;;;:24;;;;;;:58;;;;;;;;7088:104;;;;-1:-1:-1;;;;;7088:104:2;;;;;;;;;-1:-1:-1;;;;;7265:17:2;;;;;;;:9;:17;;;;;;:31;;;;;-1:-1:-1;;7265:31:2;;;;;;-1:-1:-1;7306:26:2;;;:37;;;7353:24;;;;:56;;-1:-1:-1;;7353:56:2;;;;;7419:11;27:10:-1;;23:18;;;45:23;;7419:24:2;;;;;;;;;;;;;;;;;;7459:40;;;;;7265:17;;7306:37;;7459:40;;;;;;;;;;6940:566;;;;;;:::o;18450:1276::-;18641:15;18702:23;18763:27;;:::i;:::-;18829:32;18909:7;18988:10;19020:12;19121:10;19181:14;19229:8;19268:7;18659:33;18680:11;18659:20;:33::i;:::-;18641:51;;18728:25;18742:10;18728:13;:25::i;:::-;18702:51;-1:-1:-1;18793:13:2;18807:10;18793:25;;;;;;;;;;18763:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;18763:55:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18878:15;;18864:30;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;18864:30:2;;18829:65;;18904:816;18923:15;:22;18918:2;:27;18904:816;;;18967:743;19001:1;18988:14;;19062:5;19069:6;:11;;;19082;19095:6;19045:57;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;19045:57:2;-1:-1:-1;;;;;19045:57:2;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;19045:57:2;;;19035:68;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;19035:68:2;;;;;;;;;;;;;;;;19020:83;;19150:6;:13;19142:4;19134:13;;;:29;;;;;;;;19121:42;;19198:6;19205:5;19198:13;;;;;;;;;;;;;;;;;;19181:30;;19240:5;19229:16;;19263:214;19282:15;:22;19277:2;:27;19263:214;;;19348:15;19364:2;19348:19;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;19338:29:2;:6;-1:-1:-1;;;;;19338:29:2;;19334:125;;;19401:4;19395:10;;19431:5;;19334:125;19306:4;;19263:214;;;19498:12;;;19494:154;;19556:6;19534:15;19550:2;19534:19;;;;;;;;;;-1:-1:-1;;;;;19534:28:2;;;:19;;;;;;;;;;:28;19494:154;;;19617:12;:5;19627:1;19617:12;:9;:12;:::i;:::-;19609:20;;19494:154;19682:15;19698:2;19682:19;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;19682:26:2;19705:3;19682:26;18967:743;;;;;;18947:4;;;;;18904:816;;;18450:1276;;;;;;;;;;;;;:::o;3423:37::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3423:37:2;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3423:37:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3423:37:2;;;;;;;-1:-1:-1;;;;;;;3423:37:2;;;;-1:-1:-1;;;3423:37:2;;;;;:::o;1060:116:7:-;1120:7;1142:8;;;;1135:16;;;;-1:-1:-1;1164:7:7;;;1060:116;;;;;:::o;1238:128::-;1319:7;;;1339;;;;1332:15;;;11439:1137:2;-1:-1:-1;;;;;11667:17:2;;11654:10;11667:17;;;:9;:17;;;;;:34;;:41;;11654:10;11722;;11718:265;;;11756:23;;11748:82;;;;-1:-1:-1;;;;;11748:82:2;;;;;;;;;11718:265;;;-1:-1:-1;;;;;11889:17:2;;;;;;:9;:17;;;;;:34;;11924:12;:5;11934:1;11924:12;:9;:12;:::i;:::-;11889:48;;;;;;;;;;;;;;;;;;11869:68;;11861:111;;;;-1:-1:-1;;;;;11861:111:2;;;;;;;;;-1:-1:-1;;;;;11992:17:2;;;;;;:9;:17;;;;;:34;;:43;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;;12045:17:2;;;;;;:9;:17;;;;;:34;;:41;;12089:17;;12045:34;12080:5;;12045:41;;;;;;;;;;;;;;;;:61;;;;12250:70;;;;;;;;;;;;;;;;;;;;;;;12267:6;;12275:16;;12293:17;;12312:7;;12250:70;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;12250:70:2;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;12250:70:2;;;12240:81;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;12240:81:2;;;;;;;;;;;-1:-1:-1;12471:17:2;;-1:-1:-1;12240:81:2;;-1:-1:-1;12484:3:2;;-1:-1:-1;12471:12:2;:17::i;:::-;12528:10;12520:19;;;;:7;:19;;;;;:26;12450:38;;-1:-1:-1;;;;;;12506:40:2;;;12520:26;;12506:40;12498:71;;;;-1:-1:-1;;;;;12498:71:2;;;;;;;;;11439:1137;;;;;;;;;:::o;16710:586::-;16793:4;-1:-1:-1;;16793:4:2;16898:275;16919:20;16915:1;:24;16898:275;;;17001:11;16964:13;16978:1;16964:16;;;;;;;;;;:33;:48;;;;:149;;;17017:5;:12;;-1:-1:-1;;17017:12:2;:95;;;-1:-1:-1;17069:13:2;17083:11;;;;17069:26;;;;;;;;;;:43;17033:13;17047:1;17033:16;;;;;;;;;;:33;:79;17017:95;16960:203;;;17146:1;17133:15;;16960:203;16941:3;;16898:275;;;-1:-1:-1;;17190:12:2;;;;;;17182:79;;;;-1:-1:-1;;;;;17182:79:2;;;;;;;;;-1:-1:-1;17278:11:2;;;16710:586;-1:-1:-1;;16710:586:2:o;17626:818::-;17701:9;17726:27;;:::i;:::-;17791:13;;18006:23;17791:13;;;17756;17770:10;17756:25;;;;;;;;;;17726:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;17726:55:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17807:1;17791:17;;17832:1;17823:10;;17818:179;17839:6;:14;;;:21;17835:1;:25;17818:179;;;17885:14;;;;:17;;17900:1;;17885:17;;;;;;;;;;;;;;;-1:-1:-1;;;;;17885:24:2;;17881:106;;17940:32;17953:6;:15;;;17969:1;17953:18;;;;;;;;;;;;;;;;;;;17940:8;;:32;:12;:32;:::i;:::-;17929:43;;17881:106;17862:3;;;;;17818:179;;;18046:8;18032:23;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;18032:23:2;;18006:49;;18083:1;18065:19;;18109:1;18099:11;;18094:321;18117:6;:14;;;:21;18112:2;:26;18094:321;;;18164:14;;;;:18;;18179:2;;18164:18;;;;;;;;;;;;;;;-1:-1:-1;;;;;18164:25:2;;18160:245;;-1:-1:-1;18224:1:2;18209:182;18232:15;;;;:19;;18248:2;;18232:19;;;;;;;;;;;;;;18227:2;:24;18209:182;;;18302:14;;;;:18;;18317:2;;18302:18;;;;;;;;;;;;;;18281:6;18288:10;18281:18;;;;;;;;;;-1:-1:-1;;;;;18281:39:2;;;:18;;;;;;;;;;:39;18355:17;:10;18370:1;18355:17;:14;:17;:::i;:::-;18342:30;-1:-1:-1;18253:4:2;;18209:182;;;18140:4;;;;;18094:321;;;-1:-1:-1;18431:6:2;;17626:818;-1:-1:-1;;;;;;;17626:818:2:o;601:939:6:-;680:7;697:9;712;727:7;779:4;:11;794:2;779:17;;775:57;;;822:1;806:19;;;;775:57;-1:-1:-1;;;1103:2:6;1093:13;;1087:20;1135:2;1125:13;;1119:20;1175:2;1165:13;;1159:20;1156:1;1151:29;1287:2;1283:6;;;;1279:34;;;1304:2;1299:7;1279:34;1382:1;:7;;1387:2;1382:7;;:18;;;;;1393:1;:7;;1398:2;1393:7;;1382:18;1378:158;;;1426:1;1410:19;;;;1378:158;1504:25;1514:5;1521:1;1524;1527;1504:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1504:25:6;;;;;;;;1497:32;;;;808:19941:2;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;808:19941:2;;;-1:-1:-1;808:19941:2;:::i;:::-;;;:::o;:::-;;;;;;;;;;;-1:-1:-1;;;;;808:19941:2;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;5:118:-1;;72:46;110:6;97:20;72:46;;;63:55;57:66;-1:-1;;;57:66;148:707;;258:4;246:17;;242:27;-1:-1;232:2;;283:1;280;273:12;232:2;320:6;307:20;342:80;357:64;414:6;357:64;;;342:80;;;333:89;;439:5;464:6;457:5;450:21;494:4;486:6;482:17;472:27;;516:4;511:3;507:14;500:21;;569:6;616:3;608:4;600:6;596:17;591:3;587:27;584:36;581:2;;;633:1;630;623:12;581:2;658:1;643:206;668:6;665:1;662:13;643:206;;;726:3;748:37;781:3;769:10;748:37;;;736:50;;-1:-1;809:4;800:14;;;;828;;;;;690:1;683:9;643:206;;;647:14;225:630;;;;;;;;881:707;;991:4;979:17;;975:27;-1:-1;965:2;;1016:1;1013;1006:12;965:2;1053:6;1040:20;1075:80;1090:64;1147:6;1090:64;;1075:80;1066:89;;1172:5;1197:6;1190:5;1183:21;1227:4;1219:6;1215:17;1205:27;;1249:4;1244:3;1240:14;1233:21;;1302:6;1349:3;1341:4;1333:6;1329:17;1324:3;1320:27;1317:36;1314:2;;;1366:1;1363;1356:12;1314:2;1391:1;1376:206;1401:6;1398:1;1395:13;1376:206;;;1459:3;1481:37;1514:3;1502:10;1481:37;;;1469:50;;-1:-1;1542:4;1533:14;;;;1561;;;;;1423:1;1416:9;1376:206;;1612:693;;1727:4;1715:17;;1711:27;-1:-1;1701:2;;1752:1;1749;1742:12;1701:2;1789:6;1776:20;1811:85;1826:69;1888:6;1826:69;;1811:85;1924:21;;;1968:4;1956:17;;;;1802:94;;-1:-1;1981:14;;1956:17;2076:1;2061:238;2086:6;2083:1;2080:13;2061:238;;;2169:3;2156:17;2148:6;2144:30;2193:42;2231:3;2219:10;2193:42;;;2181:55;;-1:-1;2259:4;2250:14;;;;2278;;;;;2108:1;2101:9;2061:238;;2331:707;;2441:4;2429:17;;2425:27;-1:-1;2415:2;;2466:1;2463;2456:12;2415:2;2503:6;2490:20;2525:80;2540:64;2597:6;2540:64;;2525:80;2516:89;;2622:5;2647:6;2640:5;2633:21;2677:4;2669:6;2665:17;2655:27;;2699:4;2694:3;2690:14;2683:21;;2752:6;2799:3;2791:4;2783:6;2779:17;2774:3;2770:27;2767:36;2764:2;;;2816:1;2813;2806:12;2764:2;2841:1;2826:206;2851:6;2848:1;2845:13;2826:206;;;2909:3;2931:37;2964:3;2952:10;2931:37;;;2919:50;;-1:-1;2992:4;2983:14;;;;3011;;;;;2873:1;2866:9;2826:206;;3046:118;;3113:46;3151:6;3138:20;3113:46;;3172:432;;3262:4;3250:17;;3246:27;-1:-1;3236:2;;3287:1;3284;3277:12;3236:2;3324:6;3311:20;3346:60;3361:44;3398:6;3361:44;;3346:60;3337:69;;3426:6;3419:5;3412:21;3462:4;3454:6;3450:17;3495:4;3488:5;3484:16;3530:3;3521:6;3516:3;3512:16;3509:25;3506:2;;;3547:1;3544;3537:12;3506:2;3557:41;3591:6;3586:3;3581;3557:41;;4186:241;;4290:2;4278:9;4269:7;4265:23;4261:32;4258:2;;;4306:1;4303;4296:12;4258:2;4341:1;4358:53;4403:7;4383:9;4358:53;;;4348:63;4252:175;-1:-1;;;;4252:175;4434:1569;;;;;;;4758:3;4746:9;4737:7;4733:23;4729:33;4726:2;;;4775:1;4772;4765:12;4726:2;4810:1;4827:53;4872:7;4852:9;4827:53;;;4817:63;;4789:97;4945:2;4934:9;4930:18;4917:32;4969:18;4961:6;4958:30;4955:2;;;5001:1;4998;4991:12;4955:2;5021:78;5091:7;5082:6;5071:9;5067:22;5021:78;;;5011:88;;4896:209;5164:2;5153:9;5149:18;5136:32;5188:18;5180:6;5177:30;5174:2;;;5220:1;5217;5210:12;5174:2;5240:78;5310:7;5301:6;5290:9;5286:22;5240:78;;;5230:88;;5115:209;5383:2;5372:9;5368:18;5355:32;5407:18;5399:6;5396:30;5393:2;;;5439:1;5436;5429:12;5393:2;5459:78;5529:7;5520:6;5509:9;5505:22;5459:78;;;5449:88;;5334:209;5602:3;5591:9;5587:19;5574:33;5627:18;5619:6;5616:30;5613:2;;;5659:1;5656;5649:12;5613:2;5679:83;5754:7;5745:6;5734:9;5730:22;5679:83;;;5669:93;;5553:215;5827:3;5816:9;5812:19;5799:33;5852:18;5844:6;5841:30;5838:2;;;5884:1;5881;5874:12;5838:2;5904:83;5979:7;5970:6;5959:9;5955:22;5904:83;;;5894:93;;5778:215;4720:1283;;;;;;;;;6010:366;;;6131:2;6119:9;6110:7;6106:23;6102:32;6099:2;;;6147:1;6144;6137:12;6099:2;6182:1;6199:53;6244:7;6224:9;6199:53;;;6189:63;;6161:97;6289:2;6307:53;6352:7;6343:6;6332:9;6328:22;6307:53;;;6297:63;;6268:98;6093:283;;;;;;6383:721;;;;;6547:3;6535:9;6526:7;6522:23;6518:33;6515:2;;;6564:1;6561;6554:12;6515:2;6599:1;6616:53;6661:7;6641:9;6616:53;;;6606:63;;6578:97;6706:2;6724:53;6769:7;6760:6;6749:9;6745:22;6724:53;;;6714:63;;6685:98;6814:2;6832:53;6877:7;6868:6;6857:9;6853:22;6832:53;;;6822:63;;6793:98;6950:2;6939:9;6935:18;6922:32;6974:18;6966:6;6963:30;6960:2;;;7006:1;7003;6996:12;6960:2;7026:62;7080:7;7071:6;7060:9;7056:22;7026:62;;;7016:72;;6901:193;6509:595;;;;;;;;7111:1077;;;;;;;7318:3;7306:9;7297:7;7293:23;7289:33;7286:2;;;7335:1;7332;7325:12;7286:2;7370:1;7387:53;7432:7;7412:9;7387:53;;;7377:63;;7349:97;7477:2;7495:53;7540:7;7531:6;7520:9;7516:22;7495:53;;;7485:63;;7456:98;7585:2;7603:53;7648:7;7639:6;7628:9;7624:22;7603:53;;;7593:63;;7564:98;7693:2;7711:53;7756:7;7747:6;7736:9;7732:22;7711:53;;;7701:63;;7672:98;7829:3;7818:9;7814:19;7801:33;7854:18;7846:6;7843:30;7840:2;;;7886:1;7883;7876:12;7840:2;7906:62;7960:7;7951:6;7940:9;7936:22;7906:62;;;7896:72;;7780:194;8033:3;8022:9;8018:19;8005:33;8058:18;8050:6;8047:30;8044:2;;;8090:1;8087;8080:12;8044:2;8110:62;8164:7;8155:6;8144:9;8140:22;8110:62;;8195:470;;;8325:2;8313:9;8304:7;8300:23;8296:32;8293:2;;;8341:1;8338;8331:12;8293:2;8376:1;8393:53;8438:7;8418:9;8393:53;;;8383:63;;8355:97;8511:2;8500:9;8496:18;8483:32;8535:18;8527:6;8524:30;8521:2;;;8567:1;8564;8557:12;8521:2;8587:62;8641:7;8632:6;8621:9;8617:22;8587:62;;9045:491;;;;9183:2;9171:9;9162:7;9158:23;9154:32;9151:2;;;9199:1;9196;9189:12;9151:2;9234:1;9251:53;9296:7;9276:9;9251:53;;;9241:63;;9213:97;9341:2;9359:53;9404:7;9395:6;9384:9;9380:22;9359:53;;;9349:63;;9320:98;9449:2;9467:53;9512:7;9503:6;9492:9;9488:22;9467:53;;;9457:63;;9428:98;9145:391;;;;;;9543:1161;;;;;9798:3;9786:9;9777:7;9773:23;9769:33;9766:2;;;9815:1;9812;9805:12;9766:2;9850:31;;9901:18;9890:30;;9887:2;;;9933:1;9930;9923:12;9887:2;9953:78;10023:7;10014:6;10003:9;9999:22;9953:78;;;9943:88;;9829:208;10096:2;10085:9;10081:18;10068:32;10120:18;10112:6;10109:30;10106:2;;;10152:1;10149;10142:12;10106:2;10172:78;10242:7;10233:6;10222:9;10218:22;10172:78;;;10162:88;;10047:209;10315:2;10304:9;10300:18;10287:32;10339:18;10331:6;10328:30;10325:2;;;10371:1;10368;10361:12;10325:2;10391:78;10461:7;10452:6;10441:9;10437:22;10391:78;;;10381:88;;10266:209;10534:2;10523:9;10519:18;10506:32;10558:18;10550:6;10547:30;10544:2;;;10590:1;10587;10580:12;10544:2;10610:78;10680:7;10671:6;10660:9;10656:22;10610:78;;10711:241;;10815:2;10803:9;10794:7;10790:23;10786:32;10783:2;;;10831:1;10828;10821:12;10783:2;10866:1;10883:53;10928:7;10908:9;10883:53;;10959:617;;;;;11114:3;11102:9;11093:7;11089:23;11085:33;11082:2;;;11131:1;11128;11121:12;11082:2;11166:1;11183:53;11228:7;11208:9;11183:53;;;11173:63;;11145:97;11273:2;11291:53;11336:7;11327:6;11316:9;11312:22;11291:53;;;11281:63;;11252:98;11381:2;11399:53;11444:7;11435:6;11424:9;11420:22;11399:53;;;11389:63;;11360:98;11489:2;11507:53;11552:7;11543:6;11532:9;11528:22;11507:53;;11831:366;;;11952:2;11940:9;11931:7;11927:23;11923:32;11920:2;;;11968:1;11965;11958:12;11920:2;12003:1;12020:53;12065:7;12045:9;12020:53;;;12010:63;;11982:97;12110:2;12128:53;12173:7;12164:6;12153:9;12149:22;12128:53;;12204:470;;;12334:2;12322:9;12313:7;12309:23;12305:32;12302:2;;;12350:1;12347;12340:12;12302:2;12385:1;12402:53;12447:7;12427:9;12402:53;;12681:366;;;12802:2;12790:9;12781:7;12777:23;12773:32;12770:2;;;12818:1;12815;12808:12;12770:2;12853:1;12870:53;12915:7;12895:9;12870:53;;13054:110;13127:31;13152:5;13127:31;;;13122:3;13115:44;13109:55;;;13202:590;;13337:54;13385:5;13337:54;;;13409:6;13404:3;13397:19;13433:4;13428:3;13424:14;13417:21;;13478:56;13528:5;13478:56;;;13555:1;13540:230;13565:6;13562:1;13559:13;13540:230;;;13605:53;13654:3;13645:6;13639:13;13605:53;;;13675:60;13728:6;13675:60;;;13758:4;13749:14;;;;;13665:70;-1:-1;13587:1;13580:9;13540:230;;;-1:-1;13783:3;;13316:476;-1:-1;;;;13316:476;13831:578;;13963:51;14008:5;13963:51;;;14032:6;14027:3;14020:19;14056:4;14051:3;14047:14;14040:21;;14101:53;14148:5;14101:53;;;14175:1;14160:227;14185:6;14182:1;14179:13;14160:227;;;14225:53;14274:3;14265:6;14259:13;14225:53;;;14295:57;14345:6;14295:57;;;14375:4;14366:14;;;;;14285:67;-1:-1;14207:1;14200:9;14160:227;;14448:590;;14583:54;14631:5;14583:54;;;14655:6;14650:3;14643:19;14679:4;14674:3;14670:14;14663:21;;14724:56;14774:5;14724:56;;;14801:1;14786:230;14811:6;14808:1;14805:13;14786:230;;;14851:53;14900:3;14891:6;14885:13;14851:53;;;14921:60;14974:6;14921:60;;;15004:4;14995:14;;;;;14911:70;-1:-1;14833:1;14826:9;14786:230;;15073:766;;15218:59;15271:5;15218:59;;;15295:6;15290:3;15283:19;15319:4;15314:3;15310:14;15303:21;;15367:3;15409:4;15401:6;15397:17;15392:3;15388:27;15435:61;15490:5;15435:61;;;15517:1;15502:298;15527:6;15524:1;15521:13;15502:298;;;15589:9;15583:4;15579:20;15574:3;15567:33;15615:68;15678:4;15669:6;15663:13;15615:68;;;15607:76;;15700:65;15758:6;15700:65;;;15788:4;15779:14;;;;;15690:75;-1:-1;15549:1;15542:9;15502:298;;;-1:-1;15813:4;;15197:642;-1:-1;;;;;;15197:642;15878:590;;16013:54;16061:5;16013:54;;;16085:6;16080:3;16073:19;16109:4;16104:3;16100:14;16093:21;;16154:56;16204:5;16154:56;;;16231:1;16216:230;16241:6;16238:1;16235:13;16216:230;;;16281:53;16330:3;16321:6;16315:13;16281:53;;;16351:60;16404:6;16351:60;;;16434:4;16425:14;;;;;16341:70;-1:-1;16263:1;16256:9;16216:230;;16507:578;;16639:51;16684:5;16639:51;;;16708:6;16703:3;16696:19;16732:4;16727:3;16723:14;16716:21;;16777:53;16824:5;16777:53;;;16851:1;16836:227;16861:6;16858:1;16855:13;16836:227;;;16901:53;16950:3;16941:6;16935:13;16901:53;;;16971:57;17021:6;16971:57;;;17051:4;17042:14;;;;;16961:67;-1:-1;16883:1;16876:9;16836:227;;17093:101;17160:28;17182:5;17160:28;;17201:110;17274:31;17299:5;17274:31;;17318:297;;17418:38;17450:5;17418:38;;;17473:6;17468:3;17461:19;17485:63;17541:6;17534:4;17529:3;17525:14;17518:4;17511:5;17507:16;17485:63;;;17580:29;17602:6;17580:29;;;17560:50;;;17573:4;17560:50;;17398:217;-1:-1;;;17398:217;17918:142;18004:50;18048:5;18004:50;;18067:160;18162:59;18215:5;18162:59;;18382:296;18537:2;18525:15;;18574:66;18569:2;18560:12;;18553:88;18669:2;18660:12;;18518:160;18687:397;18842:2;18830:15;;18879:66;18874:2;18865:12;;18858:88;18980:66;18975:2;18966:12;;18959:88;19075:2;19066:12;;18823:261;19093:296;19248:2;19236:15;;19285:66;19280:2;19271:12;;19264:88;19380:2;19371:12;;19229:160;19398:296;19553:2;19541:15;;19590:66;19585:2;19576:12;;19569:88;19685:2;19676:12;;19534:160;19703:397;19858:2;19846:15;;19895:66;19890:2;19881:12;;19874:88;19996:66;19991:2;19982:12;;19975:88;20091:2;20082:12;;19839:261;20109:296;20264:2;20252:15;;20301:66;20296:2;20287:12;;20280:88;20396:2;20387:12;;20245:160;20414:397;20569:2;20557:15;;20606:66;20601:2;20592:12;;20585:88;20707:66;20702:2;20693:12;;20686:88;20802:2;20793:12;;20550:261;20820:296;20975:2;20963:15;;21012:66;21007:2;20998:12;;20991:88;21107:2;21098:12;;20956:160;21125:296;21280:2;21268:15;;21317:66;21312:2;21303:12;;21296:88;21412:2;21403:12;;21261:160;21430:296;21585:2;21573:15;;21622:66;21617:2;21608:12;;21601:88;21717:2;21708:12;;21566:160;21735:397;21890:2;21878:15;;21927:66;21922:2;21913:12;;21906:88;22028:66;22023:2;22014:12;;22007:88;22123:2;22114:12;;21871:261;22257:104;22326:29;22349:5;22326:29;;22368:193;22476:2;22461:18;;22490:61;22465:9;22524:6;22490:61;;22568:294;22704:2;22689:18;;22718:61;22693:9;22752:6;22718:61;;;22790:62;22848:2;22837:9;22833:18;22824:6;22790:62;;22869:294;23005:2;22990:18;;23019:61;22994:9;23053:6;23019:61;;;23091:62;23149:2;23138:9;23134:18;23125:6;23091:62;;23170:439;23356:2;23341:18;;23370:61;23345:9;23404:6;23370:61;;;23442:62;23500:2;23489:9;23485:18;23476:6;23442:62;;;23515:84;23595:2;23584:9;23580:18;23571:6;23515:84;;23616:378;23770:2;23755:18;;23784:61;23759:9;23818:6;23784:61;;;23893:9;23887:4;23883:20;23878:2;23867:9;23863:18;23856:48;23918:66;23979:4;23970:6;23918:66;;24302:565;24504:3;24489:19;;24519:61;24493:9;24553:6;24519:61;;;24591:58;24645:2;24634:9;24630:18;24621:6;24591:58;;;24697:9;24691:4;24687:20;24682:2;24671:9;24667:18;24660:48;24722:62;24779:4;24770:6;24722:62;;;24714:70;;24795:62;24853:2;24842:9;24838:18;24829:6;24795:62;;;24475:392;;;;;;;;24874:341;25032:2;25046:47;;;25017:18;;25107:98;25017:18;25191:6;25107:98;;25222:341;25380:2;25394:47;;;25365:18;;25455:98;25365:18;25539:6;25455:98;;25570:1379;26060:3;26075:47;;;26045:19;;26136:98;26045:19;26220:6;26136:98;;;26128:106;;26282:9;26276:4;26272:20;26267:2;26256:9;26252:18;26245:48;26307:98;26400:4;26391:6;26307:98;;;26299:106;;26453:9;26447:4;26443:20;26438:2;26427:9;26423:18;26416:48;26478:98;26571:4;26562:6;26478:98;;;26470:106;;26624:9;26618:4;26614:20;26609:2;26598:9;26594:18;26587:48;26649:108;26752:4;26743:6;26649:108;;;26641:116;;26806:9;26800:4;26796:20;26790:3;26779:9;26775:19;26768:49;26831:108;26934:4;26925:6;26831:108;;;26823:116;26031:918;-1:-1;;;;;;;26031:918;26956:1191;27376:3;27391:47;;;27361:19;;27452:98;27361:19;27536:6;27452:98;;;27444:106;;27598:9;27592:4;27588:20;27583:2;27572:9;27568:18;27561:48;27623:98;27716:4;27707:6;27623:98;;;27615:106;;27769:9;27763:4;27759:20;27754:2;27743:9;27739:18;27732:48;27794:98;27887:4;27878:6;27794:98;;;27786:106;;27940:9;27934:4;27930:20;27925:2;27914:9;27910:18;27903:48;27965:98;28058:4;28049:6;27965:98;;;27957:106;;28074:63;28132:3;28121:9;28117:19;28108:6;28074:63;;;27347:800;;;;;;;;;28154:181;28256:2;28241:18;;28270:55;28245:9;28298:6;28270:55;;28342:193;28450:2;28435:18;;28464:61;28439:9;28498:6;28464:61;;28542:767;28798:3;28783:19;;28813:61;28787:9;28847:6;28813:61;;;28885:62;28943:2;28932:9;28928:18;28919:6;28885:62;;;28958;29016:2;29005:9;29001:18;28992:6;28958:62;;;29068:9;29062:4;29058:20;29053:2;29042:9;29038:18;29031:48;29093:66;29154:4;29145:6;29093:66;;;29085:74;;29208:9;29202:4;29198:20;29192:3;29181:9;29177:19;29170:49;29233:66;29294:4;29285:6;29233:66;;29316:599;29536:3;29521:19;;29551:61;29525:9;29585:6;29551:61;;;29623:62;29681:2;29670:9;29666:18;29657:6;29623:62;;;29696;29754:2;29743:9;29739:18;29730:6;29696:62;;;29769;29827:2;29816:9;29812:18;29803:6;29769:62;;;29842:63;29900:3;29889:9;29885:19;29876:6;29842:63;;29922:489;30110:3;30095:19;;30125:61;30099:9;30159:6;30125:61;;;30197:58;30251:2;30240:9;30236:18;30227:6;30197:58;;;30266:62;30324:2;30313:9;30309:18;30300:6;30266:62;;;30339;30397:2;30386:9;30382:18;30373:6;30339:62;;30418:219;30539:2;30524:18;;30553:74;30528:9;30600:6;30553:74;;30644:387;30825:2;30839:47;;;30810:18;;30900:121;30810:18;30900:121;;31038:387;31219:2;31233:47;;;31204:18;;31294:121;31204:18;31294:121;;31432:387;31613:2;31627:47;;;31598:18;;31688:121;31598:18;31688:121;;31826:387;32007:2;32021:47;;;31992:18;;32082:121;31992:18;32082:121;;32220:387;32401:2;32415:47;;;32386:18;;32476:121;32386:18;32476:121;;32614:387;32795:2;32809:47;;;32780:18;;32870:121;32780:18;32870:121;;33008:387;33189:2;33203:47;;;33174:18;;33264:121;33174:18;33264:121;;33402:387;33583:2;33597:47;;;33568:18;;33658:121;33568:18;33658:121;;33796:387;33977:2;33991:47;;;33962:18;;34052:121;33962:18;34052:121;;34190:387;34371:2;34385:47;;;34356:18;;34446:121;34356:18;34446:121;;34584:387;34765:2;34779:47;;;34750:18;;34840:121;34750:18;34840:121;;35178:801;35452:3;35437:19;;35467:61;35441:9;35501:6;35467:61;;;35539:62;35597:2;35586:9;35582:18;35573:6;35539:62;;;35612;35670:2;35659:9;35655:18;35646:6;35612:62;;;35722:9;35716:4;35712:20;35707:2;35696:9;35692:18;35685:48;35747:62;35804:4;35795:6;35747:62;;;35739:70;;35820:63;35878:3;35867:9;35863:19;35854:6;35820:63;;;35894:75;35964:3;35953:9;35949:19;35940:6;35894:75;;35986:793;36278:3;36263:19;;36293:61;36267:9;36327:6;36293:61;;;36365:62;36423:2;36412:9;36408:18;36399:6;36365:62;;;36475:9;36469:4;36465:20;36460:2;36449:9;36445:18;36438:48;36500:98;36593:4;36584:6;36500:98;;;36492:106;;36646:9;36640:4;36636:20;36631:2;36620:9;36616:18;36609:48;36671:98;36764:4;36755:6;36671:98;;36786:793;37078:3;37063:19;;37093:61;37067:9;37127:6;37093:61;;;37165:62;37223:2;37212:9;37208:18;37199:6;37165:62;;;37275:9;37269:4;37265:20;37260:2;37249:9;37245:18;37238:48;37300:98;37393:4;37384:6;37300:98;;;37292:106;;37446:9;37440:4;37436:20;37431:2;37420:9;37416:18;37409:48;37471:98;37564:4;37555:6;37471:98;;37586:781;37872:3;37857:19;;37887:61;37861:9;37921:6;37887:61;;;37959:62;38017:2;38006:9;38002:18;37993:6;37959:62;;;38069:9;38063:4;38059:20;38054:2;38043:9;38039:18;38032:48;38094:95;38184:4;38175:6;38094:95;;;38086:103;;38237:9;38231:4;38227:20;38222:2;38211:9;38207:18;38200:48;38262:95;38352:4;38343:6;38262:95;;38374:256;38436:2;38430:9;38462:17;;;38537:18;38522:34;;38558:22;;;38519:62;38516:2;;;38594:1;38591;38584:12;38516:2;38610;38603:22;38414:216;;-1:-1;38414:216;38637:258;;38796:18;38788:6;38785:30;38782:2;;;38828:1;38825;38818:12;38782:2;-1:-1;38857:4;38845:17;;;38875:15;;38719:176;39702:254;;39841:18;39833:6;39830:30;39827:2;;;39873:1;39870;39863:12;39827:2;-1:-1;39946:4;39917;39894:17;;;;-1:-1;;39890:33;39936:15;;39764:192;40230:121;40339:4;40327:17;;40308:43;40362:141;;40444:15;;;40491:4;40478:18;;;40436:67;41065:107;41155:12;;41139:33;41179:104;41266:12;;41250:33;42072:114;42178:1;42168:12;;42149:37;42715:128;-1:-1;;;;;42784:54;;42767:76;42850:92;42923:13;42916:21;;42899:43;43035:141;;43137:1;43127:12;;43117:2;;43143:9;43407:88;43485:4;43474:16;;43457:38;43809:128;;43901:31;43926:5;43901:31;;43944:161;;44045:55;44094:5;44045:55;;44261:145;44342:6;44337:3;44332;44319:30;-1:-1;44398:1;44380:16;;44373:27;44312:94;44415:268;44480:1;44487:101;44501:6;44498:1;44495:13;44487:101;;;44568:11;;;44562:18;44549:11;;;44542:39;44523:2;44516:10;44487:101;;;44603:6;44600:1;44597:13;44594:2;;;44668:1;44659:6;44654:3;44650:16;44643:27;44594:2;44464:219;;;;;44691:97;44779:2;44759:14;-1:-1;;44755:28;;44739:49", - "source": "pragma solidity ^0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/ECRecovery.sol\";\n\ncontract ERC20 {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\ncontract Enigma {\n using SafeMath for uint256;\n using ECRecovery for bytes32;\n\n // The interface of the deployed ENG ERC20 token contract\n ERC20 public engToken;\n\n struct Task {\n uint fee;\n address token;\n uint tokenValue;\n bytes proof; // Signature of (taskId, inStateDeltaHash, outStateDeltaHash, ethCall)\n address sender;\n TaskStatus status;\n }\n enum TaskStatus {RecordCreated, ReceiptVerified}\n\n /**\n * The signer address of the principal node\n * This must be set when deploying the contract and remains immutable\n * Since the signer address is derived from the public key of an\n * SGX enclave, this ensures that the principal node cannot be tempered\n * with or replaced.\n */\n address principal;\n\n // The data representation of a worker (or node)\n struct Worker {\n address signer;\n uint8 status; // Uninitialized: 0; Active: 1; Inactive: 2\n bytes report; // Decided to store this as one RLP encoded attribute for easier external storage in the future\n uint256 balance;\n }\n\n /**\n * The data representation of the worker parameters used as input for\n * the worker selection algorithm\n */\n struct WorkersParams {\n uint firstBlockNumber;\n address[] workers;\n uint[] balances;\n uint seed;\n }\n\n struct SecretContract {\n address owner;\n bytes32 codeHash;\n bytes32[] stateDeltaHashes;\n SecretContractStatus status;\n // TODO: consider keeping an index of taskIds\n }\n // TODO: do we want to have a contract lifecycle?\n enum SecretContractStatus {Undefined, Deployed}\n\n /**\n * The last 5 worker parameters\n * We keep a collection of worker parameters to account for latency issues.\n * A computation task might be conceivably given out at a certain block number\n * but executed at a later block in a different epoch. It follows that\n * the contract must have access to the worker parameters effective when giving\n * out the task, otherwise the selected worker would not match. We calculated\n * that keeping the last 5 items should be more than enough to account for\n * all latent tasks. Tasks results will be rejected past this limit.\n */\n WorkersParams[5] workersParams;\n\n // An address-based index of all registered worker\n address[] public workerAddresses;\n // An address-based index of all secret contracts\n address[] public scAddresses;\n\n // A registry of all registered workers with their attributes\n mapping(address => Worker) public workers;\n mapping(bytes32 => Task) public tasks;\n mapping(address => SecretContract) public contracts;\n\n // TODO: do we keep tasks forever? if not, when do we delete them?\n uint stakingThreshold;\n uint workerGroupSize;\n\n // The events emitted by the contract\n event Registered(address custodian, address signer);\n event ValidatedSig(bytes sig, bytes32 hash, address workerAddr);\n event WorkersParameterized(uint seed, uint256 blockNumber, address[] workers, uint[] balances);\n event TaskRecordCreated(bytes32 taskId, uint fee, address token, uint tokenValue, address sender);\n event TaskRecordsCreated(bytes32[] taskIds, uint[] fees, address[] tokens, uint[] tokenValues, address sender);\n event ReceiptVerified(bytes32 taskId, bytes32 inStateDeltaHash, bytes32 outStateDeltaHash, bytes ethCall, bytes sig);\n event ReceiptsVerified(bytes32[] taskIds, bytes32[] inStateDeltaHashes, bytes32[] outStateDeltaHashes, bytes[] ethCalls, bytes[] sigs);\n event DepositSuccessful(address from, uint value);\n event SecretContractDeployed(address scAddr, bytes32 codeHash);\n\n constructor(address _tokenAddress, address _principal) public {\n engToken = ERC20(_tokenAddress);\n principal = _principal;\n stakingThreshold = 1;\n workerGroupSize = 10;\n }\n\n //TODO: break down these methods into services for upgradability\n\n /**\n * Checks if the custodian wallet is registered as a worker\n *\n * @param user The custodian address of the worker\n */\n modifier workerRegistered(address user) {\n Worker memory worker = workers[user];\n require(worker.status > 0, \"Unregistered worker.\");\n _;\n }\n\n modifier contractDeployed(address scAddr) {\n require(contracts[scAddr].status == SecretContractStatus.Deployed, \"Secret contract not deployed.\");\n _;\n }\n\n /**\n * Registers a new worker of change the signer parameters of an existing\n * worker. This should be called by every worker (and the principal)\n * node in order to receive tasks.\n *\n * @param signer The signer address, derived from the enclave public key\n * @param report The RLP encoded report returned by the IAS\n */\n function register(address signer, bytes report)\n public\n {\n // TODO: consider exit if both signer and custodian as matching\n // If the custodian is not already register, we add an index entry\n if (workers[msg.sender].signer == 0x0) {\n // TODO: does workerAddresses.push just work here?\n uint index = workerAddresses.length;\n workerAddresses.length++;\n workerAddresses[index] = msg.sender;\n }\n\n // Set the custodian attributes\n workers[msg.sender].signer = signer;\n workers[msg.sender].balance = 0;\n workers[msg.sender].report = report;\n workers[msg.sender].status = 1;\n\n emit Registered(msg.sender, signer);\n }\n\n function deposit(address custodian, uint amount)\n public\n workerRegistered(custodian)\n {\n// require(engToken.allowance(custodian, to) >= amount, \"Not enough tokens allowed for transfer\");\n// engToken.transferFrom(custodian, this, amount);\n\n workers[custodian].balance = workers[custodian].balance.add(amount);\n\n emit DepositSuccessful(custodian, amount);\n }\n\n // TODO: should the scAddr be computed on-chain from the codeHash + some randomness\n // TODO: should any user deploy a secret contract or only a trusted enclave?\n function deploySecretContract(address scAddr, bytes32 codeHash, address owner, bytes sig)\n public\n workerRegistered(msg.sender)\n {\n require(contracts[scAddr].status == SecretContractStatus.Undefined, \"Secret contract already deployed.\");\n //TODO: verify sig\n\n //TODO: is this too naive?\n contracts[scAddr].owner = owner;\n contracts[scAddr].codeHash = codeHash;\n contracts[scAddr].status = SecretContractStatus.Deployed;\n scAddresses.push(scAddr);\n\n emit SecretContractDeployed(scAddr, codeHash);\n }\n\n function isDeployed(address scAddr)\n public\n view\n returns (bool)\n {\n if (contracts[scAddr].status == SecretContractStatus.Deployed) {\n return true;\n } else {\n return false;\n }\n }\n\n function getCodeHash(address scAddr)\n public\n view\n contractDeployed(scAddr)\n returns (bytes32)\n {\n return contracts[scAddr].codeHash;\n }\n\n function countSecretContracts()\n public\n view\n returns (uint)\n {\n return scAddresses.length;\n }\n\n /**\n * Selects address from start up to, but not including, the stop number\n **/\n function getSecretContractAddresses(uint start, uint stop)\n public\n view\n returns (address[])\n {\n if (stop == 0) {\n stop = scAddresses.length;\n }\n address[] memory addresses = new address[](stop.sub(start));\n uint pos = 0;\n for (uint i = start; i < stop; i++) {\n addresses[pos] = scAddresses[i];\n }\n return addresses;\n }\n\n function countStateDeltas(address scAddr)\n public\n view\n contractDeployed(scAddr)\n returns (uint)\n {\n return contracts[scAddr].stateDeltaHashes.length;\n }\n\n function getStateDeltaHash(address scAddr, uint index)\n public\n view\n contractDeployed(scAddr)\n returns (bytes32)\n {\n return contracts[scAddr].stateDeltaHashes[index];\n }\n\n /**\n * Selects state deltas from start up to, but not including, the stop number\n **/\n function getStateDeltaHashes(address scAddr, uint start, uint stop)\n public\n view\n contractDeployed(scAddr)\n returns (bytes32[])\n {\n if (stop == 0) {\n stop = contracts[scAddr].stateDeltaHashes.length;\n }\n bytes32[] memory deltas = new bytes32[](stop.sub(start));\n uint pos = 0;\n for (uint i = start; i < stop; i++) {\n deltas[pos] = contracts[scAddr].stateDeltaHashes[i];\n }\n return deltas;\n }\n\n function isValidDeltaHash(address scAddr, bytes32 stateDeltaHash)\n public\n view\n contractDeployed(scAddr)\n returns (bool)\n {\n bool valid = false;\n for (uint i = 0; i < contracts[scAddr].stateDeltaHashes.length; i++) {\n if (contracts[scAddr].stateDeltaHashes[i] == stateDeltaHash) {\n valid = true;\n break;\n }\n }\n return valid;\n }\n\n /**\n * Store task record\n *\n */\n function createTaskRecord(\n bytes32 taskId,\n uint fee,\n address token,\n uint tokenValue\n )\n public\n {\n require(tasks[taskId].sender == 0x0, \"Task already exist.\");\n\n tasks[taskId].fee = fee;\n tasks[taskId].token = token;\n tasks[taskId].tokenValue = tokenValue;\n tasks[taskId].sender = msg.sender;\n tasks[taskId].status = TaskStatus.RecordCreated;\n\n emit TaskRecordCreated(taskId, fee, token, tokenValue, msg.sender);\n }\n\n function createTaskRecords(\n bytes32[] taskIds,\n uint[] fees,\n address[] tokens,\n uint[] tokenValues\n )\n public\n {\n for (uint i = 0; i < taskIds.length; i++) {\n require(tasks[taskIds[i]].sender == 0x0, \"Task already exist.\");\n\n tasks[taskIds[i]].fee = fees[i];\n tasks[taskIds[i]].token = tokens[i];\n tasks[taskIds[i]].tokenValue = tokenValues[i];\n tasks[taskIds[i]].sender = msg.sender;\n tasks[taskIds[i]].status = TaskStatus.RecordCreated;\n }\n emit TaskRecordsCreated(taskIds, fees, tokens, tokenValues, msg.sender);\n }\n\n // Execute the encoded function in the specified contract\n function executeCall(address to, uint256 value, bytes data)\n internal\n returns (bool success)\n {\n assembly {\n success := call(gas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n\n function verifyReceipt(\n address scAddr,\n bytes32 taskId,\n bytes32 inStateDeltaHash,\n bytes32 outStateDeltaHash,\n bytes ethCall,\n bytes sig\n )\n internal\n {\n uint index = contracts[scAddr].stateDeltaHashes.length;\n if (index == 0) {\n require(inStateDeltaHash == 0x0, 'Invalid input state delta hash for empty state');\n } else {\n require(inStateDeltaHash == contracts[scAddr].stateDeltaHashes[index.sub(1)], 'Invalid input state delta hash');\n }\n contracts[scAddr].stateDeltaHashes.length++;\n contracts[scAddr].stateDeltaHashes[index] = outStateDeltaHash;\n\n // TODO: execute the Ethereum calls\n\n // Build a hash to validate that the I/Os are matching\n bytes32 hash = keccak256(abi.encodePacked(taskId, inStateDeltaHash, outStateDeltaHash, ethCall));\n\n // The worker address is not a real Ethereum wallet address but\n // one generated from its signing key\n address workerAddr = hash.recover(sig);\n require(workerAddr == workers[msg.sender].signer, \"Invalid signature.\");\n }\n\n /**\n * Commit the computation task results on chain\n */\n function commitReceipt(\n address scAddr,\n bytes32 taskId,\n bytes32 inStateDeltaHash,\n bytes32 outStateDeltaHash,\n bytes ethCall,\n bytes sig\n )\n public\n workerRegistered(msg.sender)\n contractDeployed(scAddr)\n {\n require(tasks[taskId].status == TaskStatus.RecordCreated, 'Invalid task status');\n verifyReceipt(scAddr, taskId, inStateDeltaHash, outStateDeltaHash, ethCall, sig);\n\n tasks[taskId].proof = sig;\n tasks[taskId].status = TaskStatus.ReceiptVerified;\n emit ReceiptVerified(taskId, inStateDeltaHash, outStateDeltaHash, ethCall, sig);\n }\n\n function commitReceipts(\n address scAddr,\n bytes32[] taskIds,\n bytes32[] inStateDeltaHashes,\n bytes32[] outStateDeltaHashes,\n bytes[] ethCalls,\n bytes[] sigs\n )\n public\n workerRegistered(msg.sender)\n contractDeployed(scAddr)\n {\n for (uint i = 0; i < taskIds.length; i++) {\n // TODO: consider aggregate signature\n require(tasks[taskIds[i]].status == TaskStatus.RecordCreated, 'Invalid task status');\n verifyReceipt(scAddr, taskIds[i], inStateDeltaHashes[i], outStateDeltaHashes[i], ethCalls[i], sigs[i]);\n\n tasks[taskIds[i]].proof = sigs[i];\n tasks[taskIds[i]].status = TaskStatus.ReceiptVerified;\n }\n emit ReceiptsVerified(taskIds, inStateDeltaHashes, outStateDeltaHashes, ethCalls, sigs);\n }\n\n // Verify the signature submitted while reparameterizing workers\n function verifyParamsSig(uint256 seed, bytes sig)\n internal\n pure\n returns (address)\n {\n bytes32 hash = keccak256(abi.encodePacked(seed));\n address signer = hash.recover(sig);\n return signer;\n }\n\n /**\n * Reparameterizing workers with a new seed\n * This should be called for each epoch by the Principal node\n *\n * @param seed The random integer generated by the enclave\n * @param sig The random integer signed by the the principal node's enclave\n */\n function setWorkersParams(uint seed, bytes sig)\n public\n workerRegistered(msg.sender)\n {\n // Reparameterizing workers with a new seed\n // This should be called for each epoch by the Principal node\n\n // We assume that the Principal is always the first registered node\n require(workers[msg.sender].signer == principal, \"Only the Principal can update the seed\");\n // TODO: verify the principal sig\n\n // Create a new workers parameters item for the specified seed.\n // The workers parameters list is a sort of cache, it never grows beyond its limit.\n // If the list is full, the new item will replace the item assigned to the lowest block number.\n uint paramIndex = 0;\n for (uint pi = 0; pi < workersParams.length; pi++) {\n // Find an empty slot in the array, if full use the lowest block number\n if (workersParams[pi].firstBlockNumber == 0) {\n paramIndex = pi;\n break;\n } else if (workersParams[pi].firstBlockNumber < workersParams[paramIndex].firstBlockNumber) {\n paramIndex = pi;\n }\n }\n workersParams[paramIndex].firstBlockNumber = block.number;\n workersParams[paramIndex].seed = seed;\n\n // Copy the current worker list\n uint workerIndex = 0;\n for (uint wi = 0; wi < workerAddresses.length; wi++) {\n if (workers[workerAddresses[wi]].balance > stakingThreshold) {\n workersParams[paramIndex].workers.length++;\n workersParams[paramIndex].workers[workerIndex] = workerAddresses[wi];\n\n workersParams[paramIndex].balances.length++;\n workersParams[paramIndex].balances[workerIndex] = workers[workerAddresses[wi]].balance;\n\n workerIndex = workerIndex.add(1);\n }\n }\n emit WorkersParameterized(seed, block.number, workersParams[paramIndex].workers, workersParams[paramIndex].balances);\n }\n\n function getWorkerParamsIndex(uint blockNumber)\n internal\n view\n returns (uint)\n {\n // The workers parameters for a given block number\n int8 index = - 1;\n for (uint i = 0; i < workersParams.length; i++) {\n if (workersParams[i].firstBlockNumber <= blockNumber && (index == - 1 || workersParams[i].firstBlockNumber > workersParams[uint(index)].firstBlockNumber)) {\n index = int8(i);\n }\n }\n require(index != - 1, \"No workers parameters entry for specified block number\");\n return uint(index);\n }\n\n function getWorkerParams(uint blockNumber)\n public\n view\n returns (uint, uint, address[], uint[]) {\n uint index = getWorkerParamsIndex(blockNumber);\n WorkersParams memory params = workersParams[index];\n return (params.firstBlockNumber, params.seed, params.workers, params.balances);\n }\n\n function compileTokens(uint paramIndex)\n internal\n view\n returns (address[])\n {\n WorkersParams memory params = workersParams[paramIndex];\n uint tokenCpt = 0;\n for (uint i = 0; i < params.workers.length; i++) {\n if (params.workers[i] != 0x0) {\n tokenCpt = tokenCpt.add(params.balances[i]);\n }\n }\n address[] memory tokens = new address[](tokenCpt);\n uint tokenIndex = 0;\n for (uint ia = 0; ia < params.workers.length; ia++) {\n if (params.workers[ia] != 0x0) {\n for (uint ib = 0; ib < params.balances[ia]; ib++) {\n tokens[tokenIndex] = params.workers[ia];\n tokenIndex = tokenIndex.add(1);\n }\n }\n }\n return tokens;\n }\n\n function getWorkerGroup(uint blockNumber, address scAddr)\n public\n view\n {\n // Compile a list of selected workers for the block number and\n // secret contract.\n uint paramIndex = getWorkerParamsIndex(blockNumber);\n address[] memory tokens = compileTokens(paramIndex);\n WorkersParams memory params = workersParams[paramIndex];\n\n address[] memory selectedWorkers = new address[](workerGroupSize);\n for (uint it; it < selectedWorkers.length; it++) {\n do {\n uint nonce = 0;\n bytes32 hash = keccak256(abi.encodePacked(nonce, params.seed, blockNumber, scAddr));\n uint index = uint256(hash) % tokens.length;\n address worker = tokens[index];\n bool dup = false;\n for (uint id; id < selectedWorkers.length; id++) {\n if (worker == selectedWorkers[id]) {\n dup = true;\n break;\n }\n }\n if (dup == false) {\n selectedWorkers[it] = worker;\n } else {\n nonce = nonce.add(1);\n }\n }\n while (selectedWorkers[it] == 0x0);\n }\n }\n\n /**\n * The worker parameters corresponding to the specified block number\n *\n * @param blockNumber The reference block number\n */\n function getWorkersParams(uint blockNumber)\n public\n view\n returns (uint, uint, address[], address[])\n {\n // TODO: finalize implementation\n uint firstBlockNumber = 0;\n uint seed = 0;\n address[] memory activeWorkers;\n address[] memory activeContracts;\n return (firstBlockNumber, seed, activeWorkers, activeContracts);\n }\n\n /**\n * The RLP encoded report returned by the IAS server\n *\n * @param custodian The worker's custodian address\n */\n function getReport(address custodian)\n public\n view\n workerRegistered(custodian)\n returns (address, bytes)\n {\n // The RLP encoded report and signer's address for the specified worker\n require(workers[custodian].signer != 0x0, \"Worker not registered\");\n return (workers[custodian].signer, workers[custodian].report);\n }\n}\n", - "sourcePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/Enigma.sol", - "ast": { - "absolutePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/Enigma.sol", - "exportedSymbols": { - "ERC20": [ - 902 - ], - "Enigma": [ - 2657 - ] - }, - "id": 2658, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 832, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:2" - }, - { - "id": 833, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "25:33:2" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "id": 834, - "nodeType": "ImportDirective", - "scope": 2658, - "sourceUnit": 3016, - "src": "60:59:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/ECRecovery.sol", - "file": "openzeppelin-solidity/contracts/ECRecovery.sol", - "id": 835, - "nodeType": "ImportDirective", - "scope": 2658, - "sourceUnit": 2922, - "src": "120:56:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 902, - "linearizedBaseContracts": [ - 902 - ], - "name": "ERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 844, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 840, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 837, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 844, - "src": "218:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 836, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "218:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 839, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 844, - "src": "233:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 838, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "233:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "217:32:2" - }, - "payable": false, - "returnParameters": { - "id": 843, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 842, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 844, - "src": "271:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 841, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "271:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "270:9:2" - }, - "scope": 902, - "src": "199:81:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 855, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 851, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 846, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 855, - "src": "307:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 845, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "307:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 848, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 855, - "src": "321:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 847, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "321:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 850, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 855, - "src": "333:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 849, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "333:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "306:41:2" - }, - "payable": false, - "returnParameters": { - "id": 854, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 853, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 855, - "src": "364:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 852, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "364:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "363:6:2" - }, - "scope": 902, - "src": "285:85:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 864, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 860, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 857, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 864, - "src": "392:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 856, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "392:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 859, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 864, - "src": "409:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 858, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "409:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "391:32:2" - }, - "payable": false, - "returnParameters": { - "id": 863, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 862, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 864, - "src": "440:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 861, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "440:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "439:6:2" - }, - "scope": 902, - "src": "375:71:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 869, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 865, - "nodeType": "ParameterList", - "parameters": [], - "src": "471:2:2" - }, - "payable": false, - "returnParameters": { - "id": 868, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 867, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 869, - "src": "495:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 866, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "495:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "494:9:2" - }, - "scope": 902, - "src": "451:53:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 876, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 872, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 871, - "name": "who", - "nodeType": "VariableDeclaration", - "scope": 876, - "src": "528:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 870, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "528:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "527:13:2" - }, - "payable": false, - "returnParameters": { - "id": 875, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 874, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 876, - "src": "562:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 873, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "562:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "561:9:2" - }, - "scope": 902, - "src": "509:62:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 885, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 881, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 878, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 885, - "src": "594:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 877, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "594:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 880, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 885, - "src": "606:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 879, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "606:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "593:27:2" - }, - "payable": false, - "returnParameters": { - "id": 884, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 883, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 885, - "src": "637:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 882, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "637:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "636:6:2" - }, - "scope": 902, - "src": "576:67:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 893, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 892, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 887, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 893, - "src": "664:20:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 886, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 889, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 893, - "src": "686:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 888, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "686:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 891, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 893, - "src": "706:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 890, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "706:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "663:57:2" - }, - "src": "649:72:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 901, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 900, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 895, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 901, - "src": "741:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 894, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "741:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 897, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 901, - "src": "764:23:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 896, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "764:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 899, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 901, - "src": "789:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 898, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "789:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "740:63:2" - }, - "src": "726:78:2" - } - ], - "scope": 2658, - "src": "178:628:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 2657, - "linearizedBaseContracts": [ - 2657 - ], - "name": "Enigma", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 905, - "libraryName": { - "contractScope": null, - "id": 903, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3015, - "src": "836:8:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$3015", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "830:27:2", - "typeName": { - "id": 904, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "849:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 908, - "libraryName": { - "contractScope": null, - "id": 906, - "name": "ECRecovery", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2921, - "src": "868:10:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ECRecovery_$2921", - "typeString": "library ECRecovery" - } - }, - "nodeType": "UsingForDirective", - "src": "862:29:2", - "typeName": { - "id": 907, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "883:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - }, - { - "constant": false, - "id": 910, - "name": "engToken", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "959:21:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - }, - "typeName": { - "contractScope": null, - "id": 909, - "name": "ERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 902, - "src": "959:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - } - }, - "value": null, - "visibility": "public" - }, - { - "canonicalName": "Enigma.Task", - "id": 923, - "members": [ - { - "constant": false, - "id": 912, - "name": "fee", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1009:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 911, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1009:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 914, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1027:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 913, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1027:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 916, - "name": "tokenValue", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1050:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 915, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1050:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 918, - "name": "proof", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1075:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 917, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1075:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 920, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1167:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 919, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1167:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 922, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1191:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - }, - "typeName": { - "contractScope": null, - "id": 921, - "name": "TaskStatus", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 926, - "src": "1191:10:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Task", - "nodeType": "StructDefinition", - "scope": 2657, - "src": "987:228:2", - "visibility": "public" - }, - { - "canonicalName": "Enigma.TaskStatus", - "id": 926, - "members": [ - { - "id": 924, - "name": "RecordCreated", - "nodeType": "EnumValue", - "src": "1237:13:2" - }, - { - "id": 925, - "name": "ReceiptVerified", - "nodeType": "EnumValue", - "src": "1252:15:2" - } - ], - "name": "TaskStatus", - "nodeType": "EnumDefinition", - "src": "1220:48:2" - }, - { - "constant": false, - "id": 928, - "name": "principal", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "1576:17:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 927, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1576:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "canonicalName": "Enigma.Worker", - "id": 937, - "members": [ - { - "constant": false, - "id": 930, - "name": "signer", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "1677:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 929, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1677:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 932, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "1701:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 931, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1701:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 934, - "name": "report", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "1767:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 933, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1767:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 936, - "name": "balance", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "1886:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 935, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1886:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Worker", - "nodeType": "StructDefinition", - "scope": 2657, - "src": "1653:255:2", - "visibility": "public" - }, - { - "canonicalName": "Enigma.WorkersParams", - "id": 948, - "members": [ - { - "constant": false, - "id": 939, - "name": "firstBlockNumber", - "nodeType": "VariableDeclaration", - "scope": 948, - "src": "2070:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 938, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2070:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 942, - "name": "workers", - "nodeType": "VariableDeclaration", - "scope": 948, - "src": "2101:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 940, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2101:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 941, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2101:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 945, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 948, - "src": "2128:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 943, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2128:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 944, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2128:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 947, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 948, - "src": "2153:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 946, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2153:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "WorkersParams", - "nodeType": "StructDefinition", - "scope": 2657, - "src": "2039:130:2", - "visibility": "public" - }, - { - "canonicalName": "Enigma.SecretContract", - "id": 958, - "members": [ - { - "constant": false, - "id": 950, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 958, - "src": "2207:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 949, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2207:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 952, - "name": "codeHash", - "nodeType": "VariableDeclaration", - "scope": 958, - "src": "2230:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 951, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2230:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 955, - "name": "stateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 958, - "src": "2256:26:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 953, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2256:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 954, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2256:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 957, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 958, - "src": "2292:27:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - }, - "typeName": { - "contractScope": null, - "id": 956, - "name": "SecretContractStatus", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 961, - "src": "2292:20:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "SecretContract", - "nodeType": "StructDefinition", - "scope": 2657, - "src": "2175:205:2", - "visibility": "public" - }, - { - "canonicalName": "Enigma.SecretContractStatus", - "id": 961, - "members": [ - { - "id": 959, - "name": "Undefined", - "nodeType": "EnumValue", - "src": "2466:9:2" - }, - { - "id": 960, - "name": "Deployed", - "nodeType": "EnumValue", - "src": "2477:8:2" - } - ], - "name": "SecretContractStatus", - "nodeType": "EnumDefinition", - "src": "2439:47:2" - }, - { - "constant": false, - "id": 965, - "name": "workersParams", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3091:30:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams[5]" - }, - "typeName": { - "baseType": { - "contractScope": null, - "id": 962, - "name": "WorkersParams", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 948, - "src": "3091:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage_ptr", - "typeString": "struct Enigma.WorkersParams" - } - }, - "id": 964, - "length": { - "argumentTypes": null, - "hexValue": "35", - "id": 963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3105:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "5" - }, - "nodeType": "ArrayTypeName", - "src": "3091:16:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage_ptr", - "typeString": "struct Enigma.WorkersParams[5]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 968, - "name": "workerAddresses", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3183:32:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 966, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3183:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 967, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3183:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 971, - "name": "scAddresses", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3275:28:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 969, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3275:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 970, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3275:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 975, - "name": "workers", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3376:41:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker)" - }, - "typeName": { - "id": 974, - "keyType": { - "id": 972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3384:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3376:26:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker)" - }, - "valueType": { - "contractScope": null, - "id": 973, - "name": "Worker", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 937, - "src": "3395:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage_ptr", - "typeString": "struct Enigma.Worker" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 979, - "name": "tasks", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3423:37:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task)" - }, - "typeName": { - "id": 978, - "keyType": { - "id": 976, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3431:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "3423:24:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task)" - }, - "valueType": { - "contractScope": null, - "id": 977, - "name": "Task", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 923, - "src": "3442:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage_ptr", - "typeString": "struct Enigma.Task" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 983, - "name": "contracts", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3466:51:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract)" - }, - "typeName": { - "id": 982, - "keyType": { - "id": 980, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3474:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3466:34:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract)" - }, - "valueType": { - "contractScope": null, - "id": 981, - "name": "SecretContract", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 958, - "src": "3485:14:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage_ptr", - "typeString": "struct Enigma.SecretContract" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 985, - "name": "stakingThreshold", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3595:21:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 984, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3595:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 987, - "name": "workerGroupSize", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3622:20:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 986, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3622:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "anonymous": false, - "documentation": null, - "id": 993, - "name": "Registered", - "nodeType": "EventDefinition", - "parameters": { - "id": 992, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 989, - "indexed": false, - "name": "custodian", - "nodeType": "VariableDeclaration", - "scope": 993, - "src": "3708:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 988, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3708:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 991, - "indexed": false, - "name": "signer", - "nodeType": "VariableDeclaration", - "scope": 993, - "src": "3727:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 990, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3727:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3707:35:2" - }, - "src": "3691:52:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1001, - "name": "ValidatedSig", - "nodeType": "EventDefinition", - "parameters": { - "id": 1000, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 995, - "indexed": false, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1001, - "src": "3767:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 994, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3767:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 997, - "indexed": false, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 1001, - "src": "3778:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 996, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3778:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 999, - "indexed": false, - "name": "workerAddr", - "nodeType": "VariableDeclaration", - "scope": 1001, - "src": "3792:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 998, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3792:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3766:45:2" - }, - "src": "3748:64:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1013, - "name": "WorkersParameterized", - "nodeType": "EventDefinition", - "parameters": { - "id": 1012, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1003, - "indexed": false, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 1013, - "src": "3844:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1002, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3844:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1005, - "indexed": false, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 1013, - "src": "3855:19:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1004, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3855:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1008, - "indexed": false, - "name": "workers", - "nodeType": "VariableDeclaration", - "scope": 1013, - "src": "3876:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1006, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3876:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1007, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3876:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1011, - "indexed": false, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 1013, - "src": "3895:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1009, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3895:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1010, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3895:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3843:68:2" - }, - "src": "3817:95:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1025, - "name": "TaskRecordCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 1024, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1015, - "indexed": false, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3941:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1014, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3941:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1017, - "indexed": false, - "name": "fee", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3957:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1016, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3957:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1019, - "indexed": false, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3967:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1018, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3967:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1021, - "indexed": false, - "name": "tokenValue", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3982:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1020, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3982:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1023, - "indexed": false, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3999:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1022, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3999:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3940:74:2" - }, - "src": "3917:98:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1041, - "name": "TaskRecordsCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 1040, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1028, - "indexed": false, - "name": "taskIds", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4045:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1026, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4045:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1027, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4045:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1031, - "indexed": false, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4064:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1029, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4064:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1030, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4064:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1034, - "indexed": false, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4077:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1032, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4077:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1033, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4077:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1037, - "indexed": false, - "name": "tokenValues", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4095:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1035, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4095:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1036, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4095:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1039, - "indexed": false, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4115:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1038, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4115:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4044:86:2" - }, - "src": "4020:111:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1053, - "name": "ReceiptVerified", - "nodeType": "EventDefinition", - "parameters": { - "id": 1052, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1043, - "indexed": false, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4158:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1042, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4158:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1045, - "indexed": false, - "name": "inStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4174:24:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1044, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4174:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1047, - "indexed": false, - "name": "outStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4200:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1046, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4200:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1049, - "indexed": false, - "name": "ethCall", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4227:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1048, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4227:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1051, - "indexed": false, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4242:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1050, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4242:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4157:95:2" - }, - "src": "4136:117:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1070, - "name": "ReceiptsVerified", - "nodeType": "EventDefinition", - "parameters": { - "id": 1069, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1056, - "indexed": false, - "name": "taskIds", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4281:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1054, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4281:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1055, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4281:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1059, - "indexed": false, - "name": "inStateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4300:28:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1057, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4300:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1058, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4300:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1062, - "indexed": false, - "name": "outStateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4330:29:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1060, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4330:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1061, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4330:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1065, - "indexed": false, - "name": "ethCalls", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4361:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 1063, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4361:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 1064, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4361:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1068, - "indexed": false, - "name": "sigs", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4379:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 1066, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4379:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 1067, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4379:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4280:112:2" - }, - "src": "4258:135:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1076, - "name": "DepositSuccessful", - "nodeType": "EventDefinition", - "parameters": { - "id": 1075, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1072, - "indexed": false, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 1076, - "src": "4422:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1071, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4422:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1074, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1076, - "src": "4436:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1073, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4436:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4421:26:2" - }, - "src": "4398:50:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1082, - "name": "SecretContractDeployed", - "nodeType": "EventDefinition", - "parameters": { - "id": 1081, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1078, - "indexed": false, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1082, - "src": "4482:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1077, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4482:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1080, - "indexed": false, - "name": "codeHash", - "nodeType": "VariableDeclaration", - "scope": 1082, - "src": "4498:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1079, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4498:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4481:34:2" - }, - "src": "4453:63:2" - }, - { - "body": { - "id": 1107, - "nodeType": "Block", - "src": "4584:140:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1089, - "name": "engToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 910, - "src": "4594:8:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1091, - "name": "_tokenAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1084, - "src": "4611:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1090, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 902, - "src": "4605:5:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$902_$", - "typeString": "type(contract ERC20)" - } - }, - "id": 1092, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4605:20:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - } - }, - "src": "4594:31:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - } - }, - "id": 1094, - "nodeType": "ExpressionStatement", - "src": "4594:31:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1095, - "name": "principal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 928, - "src": "4635:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1096, - "name": "_principal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1086, - "src": "4647:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4635:22:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1098, - "nodeType": "ExpressionStatement", - "src": "4635:22:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1099, - "name": "stakingThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 985, - "src": "4667:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 1100, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4686:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4667:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1102, - "nodeType": "ExpressionStatement", - "src": "4667:20:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1103, - "name": "workerGroupSize", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 987, - "src": "4697:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1104, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4715:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "4697:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1106, - "nodeType": "ExpressionStatement", - "src": "4697:20:2" - } - ] - }, - "documentation": null, - "id": 1108, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1087, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1084, - "name": "_tokenAddress", - "nodeType": "VariableDeclaration", - "scope": 1108, - "src": "4534:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1083, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4534:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1086, - "name": "_principal", - "nodeType": "VariableDeclaration", - "scope": 1108, - "src": "4557:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1085, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4557:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4533:43:2" - }, - "payable": false, - "returnParameters": { - "id": 1088, - "nodeType": "ParameterList", - "parameters": [], - "src": "4584:0:2" - }, - "scope": 2657, - "src": "4522:202:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1127, - "nodeType": "Block", - "src": "4978:124:2", - "statements": [ - { - "assignments": [ - 1113 - ], - "declarations": [ - { - "constant": false, - "id": 1113, - "name": "worker", - "nodeType": "VariableDeclaration", - "scope": 1128, - "src": "4988:20:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_memory_ptr", - "typeString": "struct Enigma.Worker" - }, - "typeName": { - "contractScope": null, - "id": 1112, - "name": "Worker", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 937, - "src": "4988:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage_ptr", - "typeString": "struct Enigma.Worker" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1117, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1114, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "5011:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1116, - "indexExpression": { - "argumentTypes": null, - "id": 1115, - "name": "user", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1110, - "src": "5019:4:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5011:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4988:36:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1119, - "name": "worker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1113, - "src": "5042:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_memory_ptr", - "typeString": "struct Enigma.Worker memory" - } - }, - "id": 1120, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 932, - "src": "5042:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1121, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5058:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5042:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e7265676973746572656420776f726b65722e", - "id": 1123, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5061:22:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_015d526a09bff2dba6bddc24f9efb2c59ba42ae95d5f989298007e714aa8b419", - "typeString": "literal_string \"Unregistered worker.\"" - }, - "value": "Unregistered worker." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_015d526a09bff2dba6bddc24f9efb2c59ba42ae95d5f989298007e714aa8b419", - "typeString": "literal_string \"Unregistered worker.\"" - } - ], - "id": 1118, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "5034:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5034:50:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1125, - "nodeType": "ExpressionStatement", - "src": "5034:50:2" - }, - { - "id": 1126, - "nodeType": "PlaceholderStatement", - "src": "5094:1:2" - } - ] - }, - "documentation": "Checks if the custodian wallet is registered as a worker\n * @param user The custodian address of the worker", - "id": 1128, - "name": "workerRegistered", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 1111, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1110, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 1128, - "src": "4964:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1109, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4964:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4963:14:2" - }, - "src": "4938:164:2", - "visibility": "internal" - }, - { - "body": { - "id": 1144, - "nodeType": "Block", - "src": "5150:127:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - }, - "id": 1139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1133, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "5168:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1135, - "indexExpression": { - "argumentTypes": null, - "id": 1134, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1130, - "src": "5178:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5168:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1136, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 957, - "src": "5168:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1137, - "name": "SecretContractStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "5196:20:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_SecretContractStatus_$961_$", - "typeString": "type(enum Enigma.SecretContractStatus)" - } - }, - "id": 1138, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Deployed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5196:29:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "src": "5168:57:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "53656372657420636f6e7472616374206e6f74206465706c6f7965642e", - "id": 1140, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5227:31:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d75dc00527700c4b910eb9a01254b9dfa870fc7fe0e54f61053a0ea9455cc0d2", - "typeString": "literal_string \"Secret contract not deployed.\"" - }, - "value": "Secret contract not deployed." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d75dc00527700c4b910eb9a01254b9dfa870fc7fe0e54f61053a0ea9455cc0d2", - "typeString": "literal_string \"Secret contract not deployed.\"" - } - ], - "id": 1132, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "5160:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5160:99:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1142, - "nodeType": "ExpressionStatement", - "src": "5160:99:2" - }, - { - "id": 1143, - "nodeType": "PlaceholderStatement", - "src": "5269:1:2" - } - ] - }, - "documentation": null, - "id": 1145, - "name": "contractDeployed", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 1131, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1130, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1145, - "src": "5134:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1129, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5134:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5133:16:2" - }, - "src": "5108:169:2", - "visibility": "internal" - }, - { - "body": { - "id": 1216, - "nodeType": "Block", - "src": "5692:670:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1152, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "5853:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1155, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1153, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "5861:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5861:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5853:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1156, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "5853:26:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1157, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5883:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "5853:33:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1177, - "nodeType": "IfStatement", - "src": "5849:249:2", - "trueBody": { - "id": 1176, - "nodeType": "Block", - "src": "5888:210:2", - "statements": [ - { - "assignments": [ - 1160 - ], - "declarations": [ - { - "constant": false, - "id": 1160, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 1217, - "src": "5965:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1159, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5965:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1163, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1161, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "5978:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1162, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5978:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5965:35:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "6014:24:2", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1164, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "6014:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1166, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6014:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1168, - "nodeType": "ExpressionStatement", - "src": "6014:24:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1169, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "6052:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1171, - "indexExpression": { - "argumentTypes": null, - "id": 1170, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1160, - "src": "6068:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6052:22:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1172, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6077:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6077:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6052:35:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1175, - "nodeType": "ExpressionStatement", - "src": "6052:35:2" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 1184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1178, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6148:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1181, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1179, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6156:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6156:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6148:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1182, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "6148:26:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1183, - "name": "signer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1147, - "src": "6177:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6148:35:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1185, - "nodeType": "ExpressionStatement", - "src": "6148:35:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1186, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6193:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1189, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1187, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6201:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6201:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6193:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1190, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "6193:27:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 1191, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6223:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6193:31:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1193, - "nodeType": "ExpressionStatement", - "src": "6193:31:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1200, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1194, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6234:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1197, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1195, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6242:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1196, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6242:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6234:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1198, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "report", - "nodeType": "MemberAccess", - "referencedDeclaration": 934, - "src": "6234:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1199, - "name": "report", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1149, - "src": "6263:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "6234:35:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 1201, - "nodeType": "ExpressionStatement", - "src": "6234:35:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1202, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6279:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1205, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1203, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6287:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6287:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6279:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1206, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 932, - "src": "6279:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 1207, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6308:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "6279:30:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 1209, - "nodeType": "ExpressionStatement", - "src": "6279:30:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1211, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6336:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1212, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6336:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1213, - "name": "signer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1147, - "src": "6348:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1210, - "name": "Registered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 993, - "src": "6325:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 1214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6325:30:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1215, - "nodeType": "EmitStatement", - "src": "6320:35:2" - } - ] - }, - "documentation": "Registers a new worker of change the signer parameters of an existing\nworker. This should be called by every worker (and the principal)\nnode in order to receive tasks.\n * @param signer The signer address, derived from the enclave public key\n@param report The RLP encoded report returned by the IAS", - "id": 1217, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "register", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1150, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1147, - "name": "signer", - "nodeType": "VariableDeclaration", - "scope": 1217, - "src": "5647:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1146, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5647:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1149, - "name": "report", - "nodeType": "VariableDeclaration", - "scope": 1217, - "src": "5663:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1148, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5663:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5646:30:2" - }, - "payable": false, - "returnParameters": { - "id": 1151, - "nodeType": "ParameterList", - "parameters": [], - "src": "5692:0:2" - }, - "scope": 2657, - "src": "5629:733:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1245, - "nodeType": "Block", - "src": "6464:301:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1227, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6639:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1229, - "indexExpression": { - "argumentTypes": null, - "id": 1228, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1219, - "src": "6647:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6639:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1230, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "6639:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1236, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1221, - "src": "6699:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1231, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6668:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1233, - "indexExpression": { - "argumentTypes": null, - "id": 1232, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1219, - "src": "6676:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6668:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1234, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "6668:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "6668:30:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6668:38:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6639:67:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1239, - "nodeType": "ExpressionStatement", - "src": "6639:67:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1241, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1219, - "src": "6740:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1242, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1221, - "src": "6751:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1240, - "name": "DepositSuccessful", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1076, - "src": "6722:17:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 1243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6722:36:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1244, - "nodeType": "EmitStatement", - "src": "6717:41:2" - } - ] - }, - "documentation": null, - "id": 1246, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1224, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1219, - "src": "6449:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1225, - "modifierName": { - "argumentTypes": null, - "id": 1223, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "6432:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "6432:27:2" - } - ], - "name": "deposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1222, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1219, - "name": "custodian", - "nodeType": "VariableDeclaration", - "scope": 1246, - "src": "6385:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1218, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6385:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1221, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1246, - "src": "6404:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1220, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6404:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6384:32:2" - }, - "payable": false, - "returnParameters": { - "id": 1226, - "nodeType": "ParameterList", - "parameters": [], - "src": "6464:0:2" - }, - "scope": 2657, - "src": "6368:397:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1305, - "nodeType": "Block", - "src": "7078:428:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - }, - "id": 1268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1262, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7096:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1264, - "indexExpression": { - "argumentTypes": null, - "id": 1263, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7106:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7096:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1265, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 957, - "src": "7096:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1266, - "name": "SecretContractStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "7124:20:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_SecretContractStatus_$961_$", - "typeString": "type(enum Enigma.SecretContractStatus)" - } - }, - "id": 1267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Undefined", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7124:30:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "src": "7096:58:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "53656372657420636f6e747261637420616c7265616479206465706c6f7965642e", - "id": 1269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7156:35:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2e032a85504939142c24900a8270f54bd3f5061914a7a38008c3f763afaca760", - "typeString": "literal_string \"Secret contract already deployed.\"" - }, - "value": "Secret contract already deployed." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2e032a85504939142c24900a8270f54bd3f5061914a7a38008c3f763afaca760", - "typeString": "literal_string \"Secret contract already deployed.\"" - } - ], - "id": 1261, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "7088:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7088:104:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1271, - "nodeType": "ExpressionStatement", - "src": "7088:104:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1272, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7265:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1274, - "indexExpression": { - "argumentTypes": null, - "id": 1273, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7275:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7265:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1275, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "owner", - "nodeType": "MemberAccess", - "referencedDeclaration": 950, - "src": "7265:23:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1276, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1252, - "src": "7291:5:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7265:31:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1278, - "nodeType": "ExpressionStatement", - "src": "7265:31:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1279, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7306:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1281, - "indexExpression": { - "argumentTypes": null, - "id": 1280, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7316:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7306:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1282, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "codeHash", - "nodeType": "MemberAccess", - "referencedDeclaration": 952, - "src": "7306:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1283, - "name": "codeHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1250, - "src": "7335:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "7306:37:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1285, - "nodeType": "ExpressionStatement", - "src": "7306:37:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1292, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1286, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7353:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1288, - "indexExpression": { - "argumentTypes": null, - "id": 1287, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7363:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7353:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1289, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 957, - "src": "7353:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1290, - "name": "SecretContractStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "7380:20:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_SecretContractStatus_$961_$", - "typeString": "type(enum Enigma.SecretContractStatus)" - } - }, - "id": 1291, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Deployed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7380:29:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "src": "7353:56:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "id": 1293, - "nodeType": "ExpressionStatement", - "src": "7353:56:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1297, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7436:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1294, - "name": "scAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "7419:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7419:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) returns (uint256)" - } - }, - "id": 1298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7419:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1299, - "nodeType": "ExpressionStatement", - "src": "7419:24:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1301, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7482:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1302, - "name": "codeHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1250, - "src": "7490:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1300, - "name": "SecretContractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1082, - "src": "7459:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$returns$__$", - "typeString": "function (address,bytes32)" - } - }, - "id": 1303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7459:40:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1304, - "nodeType": "EmitStatement", - "src": "7454:45:2" - } - ] - }, - "documentation": null, - "id": 1306, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1257, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "7062:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7062:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1259, - "modifierName": { - "argumentTypes": null, - "id": 1256, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "7045:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "7045:28:2" - } - ], - "name": "deploySecretContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1255, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1248, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "6970:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1247, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6970:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1250, - "name": "codeHash", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "6986:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1249, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6986:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1252, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "7004:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1251, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7004:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1254, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "7019:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1253, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "7019:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6969:60:2" - }, - "payable": false, - "returnParameters": { - "id": 1260, - "nodeType": "ParameterList", - "parameters": [], - "src": "7078:0:2" - }, - "scope": 2657, - "src": "6940:566:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1327, - "nodeType": "Block", - "src": "7591:153:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - }, - "id": 1319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1313, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7604:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1315, - "indexExpression": { - "argumentTypes": null, - "id": 1314, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "7614:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7604:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1316, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 957, - "src": "7604:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1317, - "name": "SecretContractStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "7632:20:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_SecretContractStatus_$961_$", - "typeString": "type(enum Enigma.SecretContractStatus)" - } - }, - "id": 1318, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Deployed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7632:29:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "src": "7604:57:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1325, - "nodeType": "Block", - "src": "7703:35:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 1323, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7723:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 1312, - "id": 1324, - "nodeType": "Return", - "src": "7716:12:2" - } - ] - }, - "id": 1326, - "nodeType": "IfStatement", - "src": "7600:138:2", - "trueBody": { - "id": 1322, - "nodeType": "Block", - "src": "7663:34:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1320, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7683:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1312, - "id": 1321, - "nodeType": "Return", - "src": "7676:11:2" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1328, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isDeployed", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1308, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1328, - "src": "7532:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1307, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7532:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7531:16:2" - }, - "payable": false, - "returnParameters": { - "id": 1312, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1311, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1328, - "src": "7581:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1310, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7581:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7580:6:2" - }, - "scope": 2657, - "src": "7512:232:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1343, - "nodeType": "Block", - "src": "7862:49:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1338, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7878:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1340, - "indexExpression": { - "argumentTypes": null, - "id": 1339, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1330, - "src": "7888:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7878:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1341, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "codeHash", - "nodeType": "MemberAccess", - "referencedDeclaration": 952, - "src": "7878:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 1337, - "id": 1342, - "nodeType": "Return", - "src": "7871:33:2" - } - ] - }, - "documentation": null, - "id": 1344, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1333, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1330, - "src": "7828:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1334, - "modifierName": { - "argumentTypes": null, - "id": 1332, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "7811:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "7811:24:2" - } - ], - "name": "getCodeHash", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1331, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1330, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1344, - "src": "7771:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1329, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7771:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7770:16:2" - }, - "payable": false, - "returnParameters": { - "id": 1337, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1336, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1344, - "src": "7849:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1335, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7849:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7848:9:2" - }, - "scope": 2657, - "src": "7750:161:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1352, - "nodeType": "Block", - "src": "7992:42:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1349, - "name": "scAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "8009:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1350, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8009:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1348, - "id": 1351, - "nodeType": "Return", - "src": "8002:25:2" - } - ] - }, - "documentation": null, - "id": 1353, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "countSecretContracts", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1345, - "nodeType": "ParameterList", - "parameters": [], - "src": "7946:2:2" - }, - "payable": false, - "returnParameters": { - "id": 1348, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1347, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1353, - "src": "7982:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1346, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7982:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7981:6:2" - }, - "scope": 2657, - "src": "7917:117:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1412, - "nodeType": "Block", - "src": "8238:298:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1363, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1357, - "src": "8252:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1364, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8260:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8252:9:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1372, - "nodeType": "IfStatement", - "src": "8248:65:2", - "trueBody": { - "id": 1371, - "nodeType": "Block", - "src": "8263:50:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1366, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1357, - "src": "8277:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1367, - "name": "scAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "8284:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1368, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8284:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8277:25:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1370, - "nodeType": "ExpressionStatement", - "src": "8277:25:2" - } - ] - } - }, - { - "assignments": [ - 1376 - ], - "declarations": [ - { - "constant": false, - "id": 1376, - "name": "addresses", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8322:26:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1374, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8322:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1375, - "length": null, - "nodeType": "ArrayTypeName", - "src": "8322:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1385, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1382, - "name": "start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1355, - "src": "8374:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1380, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1357, - "src": "8365:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "8365:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8365:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1379, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "8351:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 1377, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8355:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1378, - "length": null, - "nodeType": "ArrayTypeName", - "src": "8355:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 1384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8351:30:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8322:59:2" - }, - { - "assignments": [ - 1387 - ], - "declarations": [ - { - "constant": false, - "id": 1387, - "name": "pos", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8391:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1386, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8391:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1389, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8402:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "8391:12:2" - }, - { - "body": { - "id": 1408, - "nodeType": "Block", - "src": "8449:55:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1406, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1400, - "name": "addresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1376, - "src": "8462:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 1402, - "indexExpression": { - "argumentTypes": null, - "id": 1401, - "name": "pos", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1387, - "src": "8472:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8462:14:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1403, - "name": "scAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "8479:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1405, - "indexExpression": { - "argumentTypes": null, - "id": 1404, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1391, - "src": "8491:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8479:14:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8462:31:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1407, - "nodeType": "ExpressionStatement", - "src": "8462:31:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1394, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1391, - "src": "8434:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1395, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1357, - "src": "8438:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8434:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1409, - "initializationExpression": { - "assignments": [ - 1391 - ], - "declarations": [ - { - "constant": false, - "id": 1391, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8418:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1390, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8418:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1393, - "initialValue": { - "argumentTypes": null, - "id": 1392, - "name": "start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1355, - "src": "8427:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8418:14:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "8444:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1397, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1391, - "src": "8444:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1399, - "nodeType": "ExpressionStatement", - "src": "8444:3:2" - }, - "nodeType": "ForStatement", - "src": "8413:91:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1410, - "name": "addresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1376, - "src": "8520:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 1362, - "id": 1411, - "nodeType": "Return", - "src": "8513:16:2" - } - ] - }, - "documentation": "Selects address from start up to, but not including, the stop number*", - "id": 1413, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getSecretContractAddresses", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1358, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1355, - "name": "start", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8167:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1354, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8167:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1357, - "name": "stop", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8179:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1356, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8179:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8166:23:2" - }, - "payable": false, - "returnParameters": { - "id": 1362, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1361, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8223:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1359, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8223:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1360, - "length": null, - "nodeType": "ArrayTypeName", - "src": "8223:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8222:11:2" - }, - "scope": 2657, - "src": "8131:405:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1429, - "nodeType": "Block", - "src": "8656:65:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1423, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "8673:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1425, - "indexExpression": { - "argumentTypes": null, - "id": 1424, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1415, - "src": "8683:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8673:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1426, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "8673:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1427, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8673:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1422, - "id": 1428, - "nodeType": "Return", - "src": "8666:48:2" - } - ] - }, - "documentation": null, - "id": 1430, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1418, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1415, - "src": "8625:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1419, - "modifierName": { - "argumentTypes": null, - "id": 1417, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "8608:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "8608:24:2" - } - ], - "name": "countStateDeltas", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1416, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1415, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1430, - "src": "8568:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1414, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8568:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8567:16:2" - }, - "payable": false, - "returnParameters": { - "id": 1422, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1421, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1430, - "src": "8646:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1420, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8646:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8645:6:2" - }, - "scope": 2657, - "src": "8542:179:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1449, - "nodeType": "Block", - "src": "8857:65:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1442, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "8874:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1444, - "indexExpression": { - "argumentTypes": null, - "id": 1443, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1432, - "src": "8884:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8874:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1445, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "8874:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1447, - "indexExpression": { - "argumentTypes": null, - "id": 1446, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1434, - "src": "8909:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8874:41:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 1441, - "id": 1448, - "nodeType": "Return", - "src": "8867:48:2" - } - ] - }, - "documentation": null, - "id": 1450, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1437, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1432, - "src": "8823:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1438, - "modifierName": { - "argumentTypes": null, - "id": 1436, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "8806:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "8806:24:2" - } - ], - "name": "getStateDeltaHash", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1432, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1450, - "src": "8754:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1431, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8754:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1434, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 1450, - "src": "8770:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1433, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8770:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8753:28:2" - }, - "payable": false, - "returnParameters": { - "id": 1441, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1440, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1450, - "src": "8844:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1439, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8844:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8843:9:2" - }, - "scope": 2657, - "src": "8727:195:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1520, - "nodeType": "Block", - "src": "9169:336:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1465, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "9183:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1466, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9191:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "9183:9:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1477, - "nodeType": "IfStatement", - "src": "9179:88:2", - "trueBody": { - "id": 1476, - "nodeType": "Block", - "src": "9194:73:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1468, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "9208:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1469, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "9215:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1471, - "indexExpression": { - "argumentTypes": null, - "id": 1470, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1452, - "src": "9225:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9215:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1472, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "9215:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1473, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9215:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9208:48:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1475, - "nodeType": "ExpressionStatement", - "src": "9208:48:2" - } - ] - } - }, - { - "assignments": [ - 1481 - ], - "declarations": [ - { - "constant": false, - "id": 1481, - "name": "deltas", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9276:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1479, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9276:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1480, - "length": null, - "nodeType": "ArrayTypeName", - "src": "9276:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1490, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1487, - "name": "start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1454, - "src": "9325:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1485, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "9316:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "9316:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9316:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "9302:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bytes32_$dyn_memory_$", - "typeString": "function (uint256) pure returns (bytes32[] memory)" - }, - "typeName": { - "baseType": { - "id": 1482, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9306:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1483, - "length": null, - "nodeType": "ArrayTypeName", - "src": "9306:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - } - }, - "id": 1489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9302:30:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory", - "typeString": "bytes32[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9276:56:2" - }, - { - "assignments": [ - 1492 - ], - "declarations": [ - { - "constant": false, - "id": 1492, - "name": "pos", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9342:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1491, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9342:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1494, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1493, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9353:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "9342:12:2" - }, - { - "body": { - "id": 1516, - "nodeType": "Block", - "src": "9400:76:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1514, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1505, - "name": "deltas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1481, - "src": "9414:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1507, - "indexExpression": { - "argumentTypes": null, - "id": 1506, - "name": "pos", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1492, - "src": "9421:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9414:11:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1508, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "9428:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1510, - "indexExpression": { - "argumentTypes": null, - "id": 1509, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1452, - "src": "9438:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9428:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1511, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "9428:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1513, - "indexExpression": { - "argumentTypes": null, - "id": 1512, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1496, - "src": "9463:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9428:37:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "9414:51:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1515, - "nodeType": "ExpressionStatement", - "src": "9414:51:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1499, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1496, - "src": "9385:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1500, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "9389:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9385:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1517, - "initializationExpression": { - "assignments": [ - 1496 - ], - "declarations": [ - { - "constant": false, - "id": 1496, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9369:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1495, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9369:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1498, - "initialValue": { - "argumentTypes": null, - "id": 1497, - "name": "start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1454, - "src": "9378:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9369:14:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "9395:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1502, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1496, - "src": "9395:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1504, - "nodeType": "ExpressionStatement", - "src": "9395:3:2" - }, - "nodeType": "ForStatement", - "src": "9364:112:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1518, - "name": "deltas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1481, - "src": "9492:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "functionReturnParameters": 1464, - "id": 1519, - "nodeType": "Return", - "src": "9485:13:2" - } - ] - }, - "documentation": "Selects state deltas from start up to, but not including, the stop number*", - "id": 1521, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1459, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1452, - "src": "9133:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1460, - "modifierName": { - "argumentTypes": null, - "id": 1458, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "9116:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "9116:24:2" - } - ], - "name": "getStateDeltaHashes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1457, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1452, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9053:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1451, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9053:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1454, - "name": "start", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9069:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1453, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9069:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1456, - "name": "stop", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9081:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1455, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9081:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9052:39:2" - }, - "payable": false, - "returnParameters": { - "id": 1464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1463, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9154:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1461, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9154:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1462, - "length": null, - "nodeType": "ArrayTypeName", - "src": "9154:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9153:11:2" - }, - "scope": 2657, - "src": "9024:481:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1570, - "nodeType": "Block", - "src": "9649:284:2", - "statements": [ - { - "assignments": [ - 1534 - ], - "declarations": [ - { - "constant": false, - "id": 1534, - "name": "valid", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9659:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1533, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9659:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1536, - "initialValue": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 1535, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9672:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "nodeType": "VariableDeclarationStatement", - "src": "9659:18:2" - }, - { - "body": { - "id": 1566, - "nodeType": "Block", - "src": "9756:149:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1551, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "9773:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1553, - "indexExpression": { - "argumentTypes": null, - "id": 1552, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1523, - "src": "9783:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9773:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1554, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "9773:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1556, - "indexExpression": { - "argumentTypes": null, - "id": 1555, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1538, - "src": "9808:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9773:37:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1557, - "name": "stateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1525, - "src": "9814:14:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "9773:55:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1565, - "nodeType": "IfStatement", - "src": "9769:126:2", - "trueBody": { - "id": 1564, - "nodeType": "Block", - "src": "9830:65:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1559, - "name": "valid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1534, - "src": "9847:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1560, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9855:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "9847:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1562, - "nodeType": "ExpressionStatement", - "src": "9847:12:2" - }, - { - "id": 1563, - "nodeType": "Break", - "src": "9876:5:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1541, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1538, - "src": "9704:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1542, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "9708:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1544, - "indexExpression": { - "argumentTypes": null, - "id": 1543, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1523, - "src": "9718:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9708:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1545, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "9708:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1546, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9708:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9704:45:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1567, - "initializationExpression": { - "assignments": [ - 1538 - ], - "declarations": [ - { - "constant": false, - "id": 1538, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9692:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1537, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9692:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1540, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1539, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9701:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "9692:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "9751:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1548, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1538, - "src": "9751:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1550, - "nodeType": "ExpressionStatement", - "src": "9751:3:2" - }, - "nodeType": "ForStatement", - "src": "9687:218:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1568, - "name": "valid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1534, - "src": "9921:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1532, - "id": 1569, - "nodeType": "Return", - "src": "9914:12:2" - } - ] - }, - "documentation": null, - "id": 1571, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1528, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1523, - "src": "9618:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1529, - "modifierName": { - "argumentTypes": null, - "id": 1527, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "9601:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "9601:24:2" - } - ], - "name": "isValidDeltaHash", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1526, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1523, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9537:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1522, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9537:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1525, - "name": "stateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9553:22:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1524, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9553:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9536:40:2" - }, - "payable": false, - "returnParameters": { - "id": 1532, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1531, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9639:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1530, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9639:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9638:6:2" - }, - "scope": 2657, - "src": "9511:422:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1638, - "nodeType": "Block", - "src": "10121:371:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1583, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10139:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1585, - "indexExpression": { - "argumentTypes": null, - "id": 1584, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10145:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10139:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1586, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 920, - "src": "10139:20:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1587, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10163:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "10139:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5461736b20616c72656164792065786973742e", - "id": 1589, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10168:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bc6ba0dbf698c73239ebe06639f1000e8b0940a7d6a986a655fda518ab50ea8f", - "typeString": "literal_string \"Task already exist.\"" - }, - "value": "Task already exist." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bc6ba0dbf698c73239ebe06639f1000e8b0940a7d6a986a655fda518ab50ea8f", - "typeString": "literal_string \"Task already exist.\"" - } - ], - "id": 1582, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "10131:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10131:59:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1591, - "nodeType": "ExpressionStatement", - "src": "10131:59:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1592, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10201:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1594, - "indexExpression": { - "argumentTypes": null, - "id": 1593, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10207:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10201:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1595, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "fee", - "nodeType": "MemberAccess", - "referencedDeclaration": 912, - "src": "10201:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1596, - "name": "fee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1575, - "src": "10221:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10201:23:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1598, - "nodeType": "ExpressionStatement", - "src": "10201:23:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1599, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10234:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1601, - "indexExpression": { - "argumentTypes": null, - "id": 1600, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10240:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10234:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1602, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "token", - "nodeType": "MemberAccess", - "referencedDeclaration": 914, - "src": "10234:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1603, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1577, - "src": "10256:5:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10234:27:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1605, - "nodeType": "ExpressionStatement", - "src": "10234:27:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1606, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10271:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1608, - "indexExpression": { - "argumentTypes": null, - "id": 1607, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10277:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10271:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1609, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "tokenValue", - "nodeType": "MemberAccess", - "referencedDeclaration": 916, - "src": "10271:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1610, - "name": "tokenValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1579, - "src": "10298:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10271:37:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1612, - "nodeType": "ExpressionStatement", - "src": "10271:37:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1613, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10318:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1615, - "indexExpression": { - "argumentTypes": null, - "id": 1614, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10324:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10318:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1616, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 920, - "src": "10318:20:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1617, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "10341:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10341:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10318:33:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1620, - "nodeType": "ExpressionStatement", - "src": "10318:33:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1621, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10361:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1623, - "indexExpression": { - "argumentTypes": null, - "id": 1622, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10367:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10361:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1624, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "10361:20:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1625, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "10384:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1626, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "RecordCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10384:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "10361:47:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "id": 1628, - "nodeType": "ExpressionStatement", - "src": "10361:47:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1630, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10442:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1631, - "name": "fee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1575, - "src": "10450:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1632, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1577, - "src": "10455:5:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1633, - "name": "tokenValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1579, - "src": "10462:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1634, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "10474:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1635, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10474:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1629, - "name": "TaskRecordCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "10424:17:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$_t_address_$returns$__$", - "typeString": "function (bytes32,uint256,address,uint256,address)" - } - }, - "id": 1636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10424:61:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1637, - "nodeType": "EmitStatement", - "src": "10419:66:2" - } - ] - }, - "documentation": "Store task record\n ", - "id": 1639, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "createTaskRecord", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1580, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1573, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1639, - "src": "10019:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1572, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10019:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1575, - "name": "fee", - "nodeType": "VariableDeclaration", - "scope": 1639, - "src": "10043:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1574, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10043:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1577, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 1639, - "src": "10061:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1576, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10061:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1579, - "name": "tokenValue", - "nodeType": "VariableDeclaration", - "scope": 1639, - "src": "10084:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1578, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10084:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10009:96:2" - }, - "payable": false, - "returnParameters": { - "id": 1581, - "nodeType": "ParameterList", - "parameters": [], - "src": "10121:0:2" - }, - "scope": 2657, - "src": "9984:508:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1741, - "nodeType": "Block", - "src": "10648:497:2", - "statements": [ - { - "body": { - "id": 1730, - "nodeType": "Block", - "src": "10700:358:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1666, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10722:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1670, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1667, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10728:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1669, - "indexExpression": { - "argumentTypes": null, - "id": 1668, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10736:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10728:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10722:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1671, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 920, - "src": "10722:24:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1672, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10750:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "10722:31:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5461736b20616c72656164792065786973742e", - "id": 1674, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10755:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bc6ba0dbf698c73239ebe06639f1000e8b0940a7d6a986a655fda518ab50ea8f", - "typeString": "literal_string \"Task already exist.\"" - }, - "value": "Task already exist." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bc6ba0dbf698c73239ebe06639f1000e8b0940a7d6a986a655fda518ab50ea8f", - "typeString": "literal_string \"Task already exist.\"" - } - ], - "id": 1665, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "10714:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10714:63:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1676, - "nodeType": "ExpressionStatement", - "src": "10714:63:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1677, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10792:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1681, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1678, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10798:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1680, - "indexExpression": { - "argumentTypes": null, - "id": 1679, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10806:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10798:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10792:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1682, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "fee", - "nodeType": "MemberAccess", - "referencedDeclaration": 912, - "src": "10792:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1683, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1645, - "src": "10816:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1685, - "indexExpression": { - "argumentTypes": null, - "id": 1684, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10821:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10816:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10792:31:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1687, - "nodeType": "ExpressionStatement", - "src": "10792:31:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1688, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10837:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1692, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1689, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10843:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1691, - "indexExpression": { - "argumentTypes": null, - "id": 1690, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10851:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10843:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10837:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1693, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "token", - "nodeType": "MemberAccess", - "referencedDeclaration": 914, - "src": "10837:23:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1694, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1648, - "src": "10863:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 1696, - "indexExpression": { - "argumentTypes": null, - "id": 1695, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10870:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10863:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10837:35:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1698, - "nodeType": "ExpressionStatement", - "src": "10837:35:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1699, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10886:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1703, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1700, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10892:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1702, - "indexExpression": { - "argumentTypes": null, - "id": 1701, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10900:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10892:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10886:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1704, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "tokenValue", - "nodeType": "MemberAccess", - "referencedDeclaration": 916, - "src": "10886:28:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1705, - "name": "tokenValues", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1651, - "src": "10917:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1707, - "indexExpression": { - "argumentTypes": null, - "id": 1706, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10929:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10917:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10886:45:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1709, - "nodeType": "ExpressionStatement", - "src": "10886:45:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1710, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10945:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1714, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1711, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10951:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1713, - "indexExpression": { - "argumentTypes": null, - "id": 1712, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10959:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10951:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10945:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1715, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 920, - "src": "10945:24:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1716, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "10972:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10972:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10945:37:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1719, - "nodeType": "ExpressionStatement", - "src": "10945:37:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1728, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1720, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10996:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1724, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1721, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "11002:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1723, - "indexExpression": { - "argumentTypes": null, - "id": 1722, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "11010:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11002:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10996:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1725, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "10996:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1726, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "11023:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1727, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "RecordCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11023:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "10996:51:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "id": 1729, - "nodeType": "ExpressionStatement", - "src": "10996:51:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1658, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10675:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1659, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10679:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10679:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10675:18:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1731, - "initializationExpression": { - "assignments": [ - 1655 - ], - "declarations": [ - { - "constant": false, - "id": 1655, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10663:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1654, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10663:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1657, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1656, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10672:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10663:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10695:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1662, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10695:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1664, - "nodeType": "ExpressionStatement", - "src": "10695:3:2" - }, - "nodeType": "ForStatement", - "src": "10658:400:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1733, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "11091:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - { - "argumentTypes": null, - "id": 1734, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1645, - "src": "11100:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1735, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1648, - "src": "11106:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 1736, - "name": "tokenValues", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1651, - "src": "11114:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1737, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "11127:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11127:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1732, - "name": "TaskRecordsCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1041, - "src": "11072:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (bytes32[] memory,uint256[] memory,address[] memory,uint256[] memory,address)" - } - }, - "id": 1739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11072:66:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1740, - "nodeType": "EmitStatement", - "src": "11067:71:2" - } - ] - }, - "documentation": null, - "id": 1742, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "createTaskRecords", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1652, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1642, - "name": "taskIds", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10534:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1640, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10534:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1641, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10534:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1645, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10561:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1643, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10561:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1644, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10561:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1648, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10582:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1646, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10582:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1647, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10582:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1651, - "name": "tokenValues", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10608:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1649, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10608:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1650, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10608:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10524:108:2" - }, - "payable": false, - "returnParameters": { - "id": 1653, - "nodeType": "ParameterList", - "parameters": [], - "src": "10648:0:2" - }, - "scope": 2657, - "src": "10498:647:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1754, - "nodeType": "Block", - "src": "11317:116:2", - "statements": [ - { - "externalReferences": [ - { - "data": { - "declaration": 1748, - "isOffset": false, - "isSlot": false, - "src": "11405:4:2", - "valueSize": 1 - } - }, - { - "data": { - "declaration": 1748, - "isOffset": false, - "isSlot": false, - "src": "11386:4:2", - "valueSize": 1 - } - }, - { - "success": { - "declaration": 1751, - "isOffset": false, - "isSlot": false, - "src": "11350:7:2", - "valueSize": 1 - } - }, - { - "to": { - "declaration": 1744, - "isOffset": false, - "isSlot": false, - "src": "11371:2:2", - "valueSize": 1 - } - }, - { - "value": { - "declaration": 1746, - "isOffset": false, - "isSlot": false, - "src": "11375:5:2", - "valueSize": 1 - } - } - ], - "id": 1753, - "nodeType": "InlineAssembly", - "operations": "{\n success := call(gas(), to, value, add(data, 0x20), mload(data), 0, 0)\n}", - "src": "11327:106:2" - } - ] - }, - "documentation": null, - "id": 1755, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "executeCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1749, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1744, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1755, - "src": "11234:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1743, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11234:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1746, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1755, - "src": "11246:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1745, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11246:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1748, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 1755, - "src": "11261:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1747, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11261:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11233:39:2" - }, - "payable": false, - "returnParameters": { - "id": 1752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1751, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1755, - "src": "11299:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1750, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11299:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11298:14:2" - }, - "scope": 2657, - "src": "11213:220:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1852, - "nodeType": "Block", - "src": "11644:932:2", - "statements": [ - { - "assignments": [ - 1771 - ], - "declarations": [ - { - "constant": false, - "id": 1771, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11654:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1770, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11654:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1777, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1772, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "11667:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1774, - "indexExpression": { - "argumentTypes": null, - "id": 1773, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1757, - "src": "11677:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11667:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1775, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "11667:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1776, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11667:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11654:54:2" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1780, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1778, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1771, - "src": "11722:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1779, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11731:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11722:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1804, - "nodeType": "Block", - "src": "11847:136:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1800, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1790, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1761, - "src": "11869:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1791, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "11889:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1793, - "indexExpression": { - "argumentTypes": null, - "id": 1792, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1757, - "src": "11899:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11889:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1794, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "11889:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1799, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 1797, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11934:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 1795, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1771, - "src": "11924:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1796, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "11924:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1798, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11924:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11889:48:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "11869:68:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c696420696e7075742073746174652064656c74612068617368", - "id": 1801, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11939:32:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3793359aced2caaea2b4a5e03abde718cd02badbe9ea3aab94582eebe44d2119", - "typeString": "literal_string \"Invalid input state delta hash\"" - }, - "value": "Invalid input state delta hash" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3793359aced2caaea2b4a5e03abde718cd02badbe9ea3aab94582eebe44d2119", - "typeString": "literal_string \"Invalid input state delta hash\"" - } - ], - "id": 1789, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "11861:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11861:111:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1803, - "nodeType": "ExpressionStatement", - "src": "11861:111:2" - } - ] - }, - "id": 1805, - "nodeType": "IfStatement", - "src": "11718:265:2", - "trueBody": { - "id": 1788, - "nodeType": "Block", - "src": "11734:107:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1784, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1782, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1761, - "src": "11756:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1783, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11776:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "11756:23:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c696420696e7075742073746174652064656c7461206861736820666f7220656d707479207374617465", - "id": 1785, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11781:48:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_836559a8e1e2ae055c4a308ad98bbb75d85f29059de7757b18c71085d2cd2872", - "typeString": "literal_string \"Invalid input state delta hash for empty state\"" - }, - "value": "Invalid input state delta hash for empty state" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_836559a8e1e2ae055c4a308ad98bbb75d85f29059de7757b18c71085d2cd2872", - "typeString": "literal_string \"Invalid input state delta hash for empty state\"" - } - ], - "id": 1781, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "11748:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1786, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11748:82:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1787, - "nodeType": "ExpressionStatement", - "src": "11748:82:2" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 1811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "11992:43:2", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1806, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "11992:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1808, - "indexExpression": { - "argumentTypes": null, - "id": 1807, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1757, - "src": "12002:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11992:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1809, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "11992:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1810, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11992:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1812, - "nodeType": "ExpressionStatement", - "src": "11992:43:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1813, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "12045:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1815, - "indexExpression": { - "argumentTypes": null, - "id": 1814, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1757, - "src": "12055:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12045:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1816, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "12045:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1818, - "indexExpression": { - "argumentTypes": null, - "id": 1817, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1771, - "src": "12080:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "12045:41:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1819, - "name": "outStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1763, - "src": "12089:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "12045:61:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1821, - "nodeType": "ExpressionStatement", - "src": "12045:61:2" - }, - { - "assignments": [ - 1823 - ], - "declarations": [ - { - "constant": false, - "id": 1823, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "12225:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1822, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12225:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1833, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1827, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1759, - "src": "12267:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1828, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1761, - "src": "12275:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1829, - "name": "outStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1763, - "src": "12293:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1830, - "name": "ethCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1765, - "src": "12312:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 1825, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3435, - "src": "12250:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1826, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12250:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12250:70:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1824, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3442, - "src": "12240:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12240:81:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12225:96:2" - }, - { - "assignments": [ - 1835 - ], - "declarations": [ - { - "constant": false, - "id": 1835, - "name": "workerAddr", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "12450:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1834, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12450:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1840, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1838, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1767, - "src": "12484:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 1836, - "name": "hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1823, - "src": "12471:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "recover", - "nodeType": "MemberAccess", - "referencedDeclaration": 2904, - "src": "12471:12:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_address_$bound_to$_t_bytes32_$", - "typeString": "function (bytes32,bytes memory) pure returns (address)" - } - }, - "id": 1839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12471:17:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12450:38:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1842, - "name": "workerAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1835, - "src": "12506:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1843, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "12520:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1846, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1844, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "12528:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12528:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12520:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1847, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "12520:26:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "12506:40:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c6964207369676e61747572652e", - "id": 1849, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12548:20:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_de618ca49ed109c14f243a6f72f71bc4082410d500e2fcf7ed6cc449e8b19481", - "typeString": "literal_string \"Invalid signature.\"" - }, - "value": "Invalid signature." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_de618ca49ed109c14f243a6f72f71bc4082410d500e2fcf7ed6cc449e8b19481", - "typeString": "literal_string \"Invalid signature.\"" - } - ], - "id": 1841, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "12498:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12498:71:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1851, - "nodeType": "ExpressionStatement", - "src": "12498:71:2" - } - ] - }, - "documentation": null, - "id": 1853, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "verifyReceipt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1757, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11471:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1756, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11471:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1759, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11495:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1758, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11495:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1761, - "name": "inStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11519:24:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1760, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11519:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1763, - "name": "outStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11553:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1762, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11553:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1765, - "name": "ethCall", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11588:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1764, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11588:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1767, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11611:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1766, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11611:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11461:165:2" - }, - "payable": false, - "returnParameters": { - "id": 1769, - "nodeType": "ParameterList", - "parameters": [], - "src": "11644:0:2" - }, - "scope": 2657, - "src": "11439:1137:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1918, - "nodeType": "Block", - "src": "12913:371:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - }, - "id": 1882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1876, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "12931:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1878, - "indexExpression": { - "argumentTypes": null, - "id": 1877, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "12937:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12931:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1879, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "12931:20:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1880, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "12955:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "RecordCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12955:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "12931:48:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c6964207461736b20737461747573", - "id": 1883, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12981:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_35c761622bcc8ab75f9adfaf21a4872a39cd06f2745d5488272d29f1f753f270", - "typeString": "literal_string \"Invalid task status\"" - }, - "value": "Invalid task status" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_35c761622bcc8ab75f9adfaf21a4872a39cd06f2745d5488272d29f1f753f270", - "typeString": "literal_string \"Invalid task status\"" - } - ], - "id": 1875, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "12923:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12923:80:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1885, - "nodeType": "ExpressionStatement", - "src": "12923:80:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1887, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1855, - "src": "13027:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1888, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "13035:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1889, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1859, - "src": "13043:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1890, - "name": "outStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1861, - "src": "13061:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1891, - "name": "ethCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1863, - "src": "13080:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 1892, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1865, - "src": "13089:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1886, - "name": "verifyReceipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1853, - "src": "13013:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,bytes32,bytes32,bytes32,bytes memory,bytes memory)" - } - }, - "id": 1893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13013:80:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1894, - "nodeType": "ExpressionStatement", - "src": "13013:80:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1895, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13104:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1897, - "indexExpression": { - "argumentTypes": null, - "id": 1896, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "13110:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13104:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1898, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "proof", - "nodeType": "MemberAccess", - "referencedDeclaration": 918, - "src": "13104:19:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1899, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1865, - "src": "13126:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "13104:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 1901, - "nodeType": "ExpressionStatement", - "src": "13104:25:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1908, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1902, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13139:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1904, - "indexExpression": { - "argumentTypes": null, - "id": 1903, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "13145:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13139:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1905, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "13139:20:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1906, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "13162:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1907, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "ReceiptVerified", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13162:26:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "13139:49:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "id": 1909, - "nodeType": "ExpressionStatement", - "src": "13139:49:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1911, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "13219:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1912, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1859, - "src": "13227:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1913, - "name": "outStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1861, - "src": "13245:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1914, - "name": "ethCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1863, - "src": "13264:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 1915, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1865, - "src": "13273:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1910, - "name": "ReceiptVerified", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1053, - "src": "13203:15:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (bytes32,bytes32,bytes32,bytes memory,bytes memory)" - } - }, - "id": 1916, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13203:74:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1917, - "nodeType": "EmitStatement", - "src": "13198:79:2" - } - ] - }, - "documentation": "Commit the computation task results on chain", - "id": 1919, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1868, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "12868:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12868:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1870, - "modifierName": { - "argumentTypes": null, - "id": 1867, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "12851:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "12851:28:2" - }, - { - "arguments": [ - { - "argumentTypes": null, - "id": 1872, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1855, - "src": "12901:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1873, - "modifierName": { - "argumentTypes": null, - "id": 1871, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "12884:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "12884:24:2" - } - ], - "name": "commitReceipt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1866, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1855, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12680:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1854, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12680:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1857, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12704:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1856, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12704:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1859, - "name": "inStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12728:24:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1858, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12728:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1861, - "name": "outStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12762:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1860, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12762:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1863, - "name": "ethCall", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12797:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1862, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12797:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1865, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12820:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1864, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12820:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12670:165:2" - }, - "payable": false, - "returnParameters": { - "id": 1874, - "nodeType": "ParameterList", - "parameters": [], - "src": "12913:0:2" - }, - "scope": 2657, - "src": "12648:636:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2020, - "nodeType": "Block", - "src": "13573:545:2", - "statements": [ - { - "body": { - "id": 2010, - "nodeType": "Block", - "src": "13625:390:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - }, - "id": 1966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1958, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13697:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1962, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1959, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13703:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1961, - "indexExpression": { - "argumentTypes": null, - "id": 1960, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13711:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13703:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13697:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1963, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "13697:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1964, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "13725:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "RecordCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13725:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "13697:52:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c6964207461736b20737461747573", - "id": 1967, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13751:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_35c761622bcc8ab75f9adfaf21a4872a39cd06f2745d5488272d29f1f753f270", - "typeString": "literal_string \"Invalid task status\"" - }, - "value": "Invalid task status" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_35c761622bcc8ab75f9adfaf21a4872a39cd06f2745d5488272d29f1f753f270", - "typeString": "literal_string \"Invalid task status\"" - } - ], - "id": 1957, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "13689:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13689:84:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1969, - "nodeType": "ExpressionStatement", - "src": "13689:84:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1971, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1921, - "src": "13801:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1972, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13809:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1974, - "indexExpression": { - "argumentTypes": null, - "id": 1973, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13817:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13809:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1975, - "name": "inStateDeltaHashes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1927, - "src": "13821:18:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1977, - "indexExpression": { - "argumentTypes": null, - "id": 1976, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13840:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13821:21:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1978, - "name": "outStateDeltaHashes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1930, - "src": "13844:19:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1980, - "indexExpression": { - "argumentTypes": null, - "id": 1979, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13864:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13844:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1981, - "name": "ethCalls", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1933, - "src": "13868:8:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 1983, - "indexExpression": { - "argumentTypes": null, - "id": 1982, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13877:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13868:11:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1984, - "name": "sigs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1936, - "src": "13881:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 1986, - "indexExpression": { - "argumentTypes": null, - "id": 1985, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13886:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13881:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - ], - "id": 1970, - "name": "verifyReceipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1853, - "src": "13787:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,bytes32,bytes32,bytes32,bytes memory,bytes memory)" - } - }, - "id": 1987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13787:102:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1988, - "nodeType": "ExpressionStatement", - "src": "13787:102:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1989, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13904:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1993, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1990, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13910:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1992, - "indexExpression": { - "argumentTypes": null, - "id": 1991, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13918:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13910:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13904:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1994, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "proof", - "nodeType": "MemberAccess", - "referencedDeclaration": 918, - "src": "13904:23:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1995, - "name": "sigs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1936, - "src": "13930:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 1997, - "indexExpression": { - "argumentTypes": null, - "id": 1996, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13935:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13930:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - }, - "src": "13904:33:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 1999, - "nodeType": "ExpressionStatement", - "src": "13904:33:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2008, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2000, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13951:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 2004, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2001, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13957:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 2003, - "indexExpression": { - "argumentTypes": null, - "id": 2002, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13965:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13957:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13951:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 2005, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "13951:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2006, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "13978:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 2007, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "ReceiptVerified", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13978:26:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "13951:53:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "id": 2009, - "nodeType": "ExpressionStatement", - "src": "13951:53:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1950, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13600:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1951, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13604:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13604:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13600:18:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2011, - "initializationExpression": { - "assignments": [ - 1947 - ], - "declarations": [ - { - "constant": false, - "id": 1947, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13588:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1946, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "13588:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1949, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1948, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13597:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "13588:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "13620:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1954, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13620:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1956, - "nodeType": "ExpressionStatement", - "src": "13620:3:2" - }, - "nodeType": "ForStatement", - "src": "13583:432:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2013, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "14046:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - { - "argumentTypes": null, - "id": 2014, - "name": "inStateDeltaHashes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1927, - "src": "14055:18:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - { - "argumentTypes": null, - "id": 2015, - "name": "outStateDeltaHashes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1930, - "src": "14075:19:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - { - "argumentTypes": null, - "id": 2016, - "name": "ethCalls", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1933, - "src": "14096:8:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 2017, - "name": "sigs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1936, - "src": "14106:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - ], - "id": 2012, - "name": "ReceiptsVerified", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1070, - "src": "14029:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_bytes_memory_$dyn_memory_ptr_$_t_array$_t_bytes_memory_$dyn_memory_ptr_$returns$__$", - "typeString": "function (bytes32[] memory,bytes32[] memory,bytes32[] memory,bytes memory[] memory,bytes memory[] memory)" - } - }, - "id": 2018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14029:82:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2019, - "nodeType": "EmitStatement", - "src": "14024:87:2" - } - ] - }, - "documentation": null, - "id": 2021, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1939, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "13528:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13528:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1941, - "modifierName": { - "argumentTypes": null, - "id": 1938, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "13511:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "13511:28:2" - }, - { - "arguments": [ - { - "argumentTypes": null, - "id": 1943, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1921, - "src": "13561:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1944, - "modifierName": { - "argumentTypes": null, - "id": 1942, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "13544:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "13544:24:2" - } - ], - "name": "commitReceipts", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1937, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1921, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13323:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1920, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13323:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1924, - "name": "taskIds", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13347:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1922, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13347:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1923, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13347:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1927, - "name": "inStateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13374:28:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1925, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13374:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1926, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13374:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1930, - "name": "outStateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13412:29:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1928, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13412:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1929, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13412:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1933, - "name": "ethCalls", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13451:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 1931, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13451:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 1932, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13451:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1936, - "name": "sigs", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13477:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 1934, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13477:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 1935, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13477:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13313:182:2" - }, - "payable": false, - "returnParameters": { - "id": 1945, - "nodeType": "ParameterList", - "parameters": [], - "src": "13573:0:2" - }, - "scope": 2657, - "src": "13290:828:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2048, - "nodeType": "Block", - "src": "14291:132:2", - "statements": [ - { - "assignments": [ - 2031 - ], - "declarations": [ - { - "constant": false, - "id": 2031, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14301:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2030, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "14301:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2038, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2035, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2023, - "src": "14343:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2033, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3435, - "src": "14326:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2034, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14326:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14326:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2032, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3442, - "src": "14316:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14316:33:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14301:48:2" - }, - { - "assignments": [ - 2040 - ], - "declarations": [ - { - "constant": false, - "id": 2040, - "name": "signer", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14359:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2039, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14359:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2045, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2043, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2025, - "src": "14389:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2041, - "name": "hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2031, - "src": "14376:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 2042, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "recover", - "nodeType": "MemberAccess", - "referencedDeclaration": 2904, - "src": "14376:12:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_address_$bound_to$_t_bytes32_$", - "typeString": "function (bytes32,bytes memory) pure returns (address)" - } - }, - "id": 2044, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14376:17:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14359:34:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2046, - "name": "signer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2040, - "src": "14410:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2029, - "id": 2047, - "nodeType": "Return", - "src": "14403:13:2" - } - ] - }, - "documentation": null, - "id": 2049, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "verifyParamsSig", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2026, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2023, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14218:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2022, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14218:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2025, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14232:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2024, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "14232:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14217:25:2" - }, - "payable": false, - "returnParameters": { - "id": 2029, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2028, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14278:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2027, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14278:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14277:9:2" - }, - "scope": 2657, - "src": "14193:230:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2218, - "nodeType": "Block", - "src": "14799:1905:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2067, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2061, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "15016:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2064, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2062, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "15024:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15024:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15016:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2065, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "15016:26:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2066, - "name": "principal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 928, - "src": "15046:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15016:39:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f6e6c7920746865205072696e636970616c2063616e20757064617465207468652073656564", - "id": 2068, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15057:40:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bc5bcb5ed31af9f048e73c2cbe5de0569fa9bcd43014614ad5223290fd42066d", - "typeString": "literal_string \"Only the Principal can update the seed\"" - }, - "value": "Only the Principal can update the seed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bc5bcb5ed31af9f048e73c2cbe5de0569fa9bcd43014614ad5223290fd42066d", - "typeString": "literal_string \"Only the Principal can update the seed\"" - } - ], - "id": 2060, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "15008:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15008:90:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2070, - "nodeType": "ExpressionStatement", - "src": "15008:90:2" - }, - { - "assignments": [ - 2072 - ], - "declarations": [ - { - "constant": false, - "id": 2072, - "name": "paramIndex", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "15419:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2071, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "15419:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2074, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2073, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15437:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15419:19:2" - }, - { - "body": { - "id": 2114, - "nodeType": "Block", - "src": "15499:363:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2086, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15601:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2088, - "indexExpression": { - "argumentTypes": null, - "id": 2087, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15615:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15601:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2089, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "15601:34:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2090, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15639:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "15601:39:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2098, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15723:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2100, - "indexExpression": { - "argumentTypes": null, - "id": 2099, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15737:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15723:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2101, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "15723:34:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2102, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15760:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2104, - "indexExpression": { - "argumentTypes": null, - "id": 2103, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15774:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15760:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2105, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "15760:42:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15723:79:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2112, - "nodeType": "IfStatement", - "src": "15719:133:2", - "trueBody": { - "id": 2111, - "nodeType": "Block", - "src": "15804:48:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2107, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15822:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2108, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15835:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15822:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2110, - "nodeType": "ExpressionStatement", - "src": "15822:15:2" - } - ] - } - }, - "id": 2113, - "nodeType": "IfStatement", - "src": "15597:255:2", - "trueBody": { - "id": 2097, - "nodeType": "Block", - "src": "15642:71:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2094, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2092, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15660:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2093, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15673:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15660:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2095, - "nodeType": "ExpressionStatement", - "src": "15660:15:2" - }, - { - "id": 2096, - "nodeType": "Break", - "src": "15693:5:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2079, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15466:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2080, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15471:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15471:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15466:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2115, - "initializationExpression": { - "assignments": [ - 2076 - ], - "declarations": [ - { - "constant": false, - "id": 2076, - "name": "pi", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "15453:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2075, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "15453:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2078, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2077, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15463:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15453:11:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "15493:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2083, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15493:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2085, - "nodeType": "ExpressionStatement", - "src": "15493:4:2" - }, - "nodeType": "ForStatement", - "src": "15448:414:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2116, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15871:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2118, - "indexExpression": { - "argumentTypes": null, - "id": 2117, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15885:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15871:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2119, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "15871:42:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2120, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3438, - "src": "15916:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15916:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15871:57:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2123, - "nodeType": "ExpressionStatement", - "src": "15871:57:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2124, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15938:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2126, - "indexExpression": { - "argumentTypes": null, - "id": 2125, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15952:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15938:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2127, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "seed", - "nodeType": "MemberAccess", - "referencedDeclaration": 947, - "src": "15938:30:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2128, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2051, - "src": "15971:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15938:37:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2130, - "nodeType": "ExpressionStatement", - "src": "15938:37:2" - }, - { - "assignments": [ - 2132 - ], - "declarations": [ - { - "constant": false, - "id": 2132, - "name": "workerIndex", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "16026:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2131, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16026:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2134, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2133, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16045:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "16026:20:2" - }, - { - "body": { - "id": 2202, - "nodeType": "Block", - "src": "16109:463:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2146, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "16127:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2150, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2147, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "16135:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2149, - "indexExpression": { - "argumentTypes": null, - "id": 2148, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16151:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16135:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16127:28:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2151, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "16127:36:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 2152, - "name": "stakingThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 985, - "src": "16166:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16127:55:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2201, - "nodeType": "IfStatement", - "src": "16123:439:2", - "trueBody": { - "id": 2200, - "nodeType": "Block", - "src": "16184:378:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "16202:42:2", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2154, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16202:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2156, - "indexExpression": { - "argumentTypes": null, - "id": 2155, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16216:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16202:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2157, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "16202:33:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2158, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16202:40:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2160, - "nodeType": "ExpressionStatement", - "src": "16202:42:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2161, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16262:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2163, - "indexExpression": { - "argumentTypes": null, - "id": 2162, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16276:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16262:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2164, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "16262:33:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2166, - "indexExpression": { - "argumentTypes": null, - "id": 2165, - "name": "workerIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "16296:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "16262:46:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2167, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "16311:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2169, - "indexExpression": { - "argumentTypes": null, - "id": 2168, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16327:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16311:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "16262:68:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2171, - "nodeType": "ExpressionStatement", - "src": "16262:68:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "16349:43:2", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2172, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16349:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2174, - "indexExpression": { - "argumentTypes": null, - "id": 2173, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16363:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16349:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2175, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "16349:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 2176, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16349:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2178, - "nodeType": "ExpressionStatement", - "src": "16349:43:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2179, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16410:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2181, - "indexExpression": { - "argumentTypes": null, - "id": 2180, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16424:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16410:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2182, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "16410:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 2184, - "indexExpression": { - "argumentTypes": null, - "id": 2183, - "name": "workerIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "16445:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "16410:47:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2185, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "16460:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2189, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2186, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "16468:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2188, - "indexExpression": { - "argumentTypes": null, - "id": 2187, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16484:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16468:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16460:28:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2190, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "16460:36:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16410:86:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2192, - "nodeType": "ExpressionStatement", - "src": "16410:86:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2193, - "name": "workerIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "16515:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 2196, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16545:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 2194, - "name": "workerIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "16529:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "16529:15:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16529:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16515:32:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2199, - "nodeType": "ExpressionStatement", - "src": "16515:32:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2139, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16074:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2140, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "16079:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2141, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16079:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16074:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2203, - "initializationExpression": { - "assignments": [ - 2136 - ], - "declarations": [ - { - "constant": false, - "id": 2136, - "name": "wi", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "16061:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2135, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16061:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2138, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16071:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "16061:11:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2144, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "16103:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2143, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16103:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2145, - "nodeType": "ExpressionStatement", - "src": "16103:4:2" - }, - "nodeType": "ForStatement", - "src": "16056:516:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2205, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2051, - "src": "16607:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2206, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3438, - "src": "16613:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16613:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2208, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16627:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2210, - "indexExpression": { - "argumentTypes": null, - "id": 2209, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16641:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16627:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2211, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "16627:33:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2212, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16662:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2214, - "indexExpression": { - "argumentTypes": null, - "id": 2213, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16676:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16662:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2215, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "16662:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - ], - "id": 2204, - "name": "WorkersParameterized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1013, - "src": "16586:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address[] memory,uint256[] memory)" - } - }, - "id": 2216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16586:111:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2217, - "nodeType": "EmitStatement", - "src": "16581:116:2" - } - ] - }, - "documentation": "Reparameterizing workers with a new seed\nThis should be called for each epoch by the Principal node\n * @param seed The random integer generated by the enclave\n@param sig The random integer signed by the the principal node's enclave", - "id": 2219, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2056, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "14783:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2057, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14783:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 2058, - "modifierName": { - "argumentTypes": null, - "id": 2055, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "14766:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "14766:28:2" - } - ], - "name": "setWorkersParams", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2054, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2051, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "14729:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2050, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "14729:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2053, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "14740:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2052, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "14740:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14728:22:2" - }, - "payable": false, - "returnParameters": { - "id": 2059, - "nodeType": "ParameterList", - "parameters": [], - "src": "14799:0:2" - }, - "scope": 2657, - "src": "14703:2001:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2288, - "nodeType": "Block", - "src": "16803:493:2", - "statements": [ - { - "assignments": [ - 2227 - ], - "declarations": [ - { - "constant": false, - "id": 2227, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 2289, - "src": "16872:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": { - "id": 2226, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "16872:4:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2230, - "initialValue": { - "argumentTypes": null, - "id": 2229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "16885:3:2", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2228, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16887:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_-1_by_1", - "typeString": "int_const -1" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16872:16:2" - }, - { - "body": { - "id": 2274, - "nodeType": "Block", - "src": "16946:227:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 2265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2242, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16964:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2244, - "indexExpression": { - "argumentTypes": null, - "id": 2243, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "16978:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16964:16:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2245, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "16964:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 2246, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2221, - "src": "17001:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16964:48:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 2263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 2251, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2248, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17017:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2250, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "17026:3:2", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2249, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17028:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_-1_by_1", - "typeString": "int_const -1" - } - }, - "src": "17017:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2252, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "17033:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2254, - "indexExpression": { - "argumentTypes": null, - "id": 2253, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "17047:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17033:16:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2255, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "17033:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2256, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "17069:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2260, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2258, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17088:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - ], - "id": 2257, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "17083:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 2259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17083:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17069:26:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2261, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "17069:43:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17033:79:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "17017:95:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 2264, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "17016:97:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "16964:149:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2273, - "nodeType": "IfStatement", - "src": "16960:203:2", - "trueBody": { - "id": 2272, - "nodeType": "Block", - "src": "17115:48:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2266, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17133:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2268, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "17146:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "17141:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int8_$", - "typeString": "type(int8)" - }, - "typeName": "int8" - }, - "id": 2269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:7:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "17133:15:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "id": 2271, - "nodeType": "ExpressionStatement", - "src": "17133:15:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2235, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "16915:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2236, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16919:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16919:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16915:24:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2275, - "initializationExpression": { - "assignments": [ - 2232 - ], - "declarations": [ - { - "constant": false, - "id": 2232, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 2289, - "src": "16903:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2231, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16903:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2234, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2233, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16912:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "16903:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "16941:3:2", - "subExpression": { - "argumentTypes": null, - "id": 2239, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "16941:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2241, - "nodeType": "ExpressionStatement", - "src": "16941:3:2" - }, - "nodeType": "ForStatement", - "src": "16898:275:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 2280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2277, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17190:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 2279, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "17199:3:2", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17201:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_-1_by_1", - "typeString": "int_const -1" - } - }, - "src": "17190:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f20776f726b65727320706172616d657465727320656e74727920666f722073706563696669656420626c6f636b206e756d626572", - "id": 2281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17204:56:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e9fab335fbd58bdc8f1aa0d5f38123bc711e5112f8f3f95c75615d3d06674c6d", - "typeString": "literal_string \"No workers parameters entry for specified block number\"" - }, - "value": "No workers parameters entry for specified block number" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e9fab335fbd58bdc8f1aa0d5f38123bc711e5112f8f3f95c75615d3d06674c6d", - "typeString": "literal_string \"No workers parameters entry for specified block number\"" - } - ], - "id": 2276, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "17182:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17182:79:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2283, - "nodeType": "ExpressionStatement", - "src": "17182:79:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2285, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17283:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - ], - "id": 2284, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "17278:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 2286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17278:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2225, - "id": 2287, - "nodeType": "Return", - "src": "17271:18:2" - } - ] - }, - "documentation": null, - "id": 2289, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getWorkerParamsIndex", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2222, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2221, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 2289, - "src": "16740:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2220, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16740:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16739:18:2" - }, - "payable": false, - "returnParameters": { - "id": 2225, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2224, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2289, - "src": "16793:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2223, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16793:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16792:6:2" - }, - "scope": 2657, - "src": "16710:586:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2326, - "nodeType": "Block", - "src": "17409:211:2", - "statements": [ - { - "assignments": [ - 2305 - ], - "declarations": [ - { - "constant": false, - "id": 2305, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17419:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2304, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17419:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2309, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2307, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2291, - "src": "17453:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2306, - "name": "getWorkerParamsIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2289, - "src": "17432:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 2308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17432:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17419:46:2" - }, - { - "assignments": [ - 2311 - ], - "declarations": [ - { - "constant": false, - "id": 2311, - "name": "params", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17475:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams" - }, - "typeName": { - "contractScope": null, - "id": 2310, - "name": "WorkersParams", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 948, - "src": "17475:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage_ptr", - "typeString": "struct Enigma.WorkersParams" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2315, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2312, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "17505:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2314, - "indexExpression": { - "argumentTypes": null, - "id": 2313, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2305, - "src": "17519:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17505:20:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17475:50:2" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2316, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "17543:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2317, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "17543:23:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2318, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "17568:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2319, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "seed", - "nodeType": "MemberAccess", - "referencedDeclaration": 947, - "src": "17568:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2320, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "17581:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2321, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "17581:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2322, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "17597:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2323, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "17597:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - } - ], - "id": 2324, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "17542:71:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_array$_t_address_$dyn_memory_$_t_array$_t_uint256_$dyn_memory_$", - "typeString": "tuple(uint256,uint256,address[] memory,uint256[] memory)" - } - }, - "functionReturnParameters": 2303, - "id": 2325, - "nodeType": "Return", - "src": "17535:78:2" - } - ] - }, - "documentation": null, - "id": 2327, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getWorkerParams", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2292, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2291, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17327:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2290, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17327:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17326:18:2" - }, - "payable": false, - "returnParameters": { - "id": 2303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2294, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17378:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2293, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17378:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2296, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17384:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2295, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17384:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2299, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17390:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2297, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17390:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2298, - "length": null, - "nodeType": "ArrayTypeName", - "src": "17390:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2302, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17401:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 2300, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17401:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2301, - "length": null, - "nodeType": "ArrayTypeName", - "src": "17401:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17377:31:2" - }, - "scope": 2657, - "src": "17302:318:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2446, - "nodeType": "Block", - "src": "17716:728:2", - "statements": [ - { - "assignments": [ - 2336 - ], - "declarations": [ - { - "constant": false, - "id": 2336, - "name": "params", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17726:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams" - }, - "typeName": { - "contractScope": null, - "id": 2335, - "name": "WorkersParams", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 948, - "src": "17726:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage_ptr", - "typeString": "struct Enigma.WorkersParams" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2340, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2337, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "17756:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2339, - "indexExpression": { - "argumentTypes": null, - "id": 2338, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2329, - "src": "17770:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17756:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17726:55:2" - }, - { - "assignments": [ - 2342 - ], - "declarations": [ - { - "constant": false, - "id": 2342, - "name": "tokenCpt", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17791:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2341, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17791:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2344, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2343, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17807:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "17791:17:2" - }, - { - "body": { - "id": 2375, - "nodeType": "Block", - "src": "17867:130:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2357, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "17885:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2358, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "17885:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2360, - "indexExpression": { - "argumentTypes": null, - "id": 2359, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "17900:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17885:17:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2361, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17906:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "17885:24:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2374, - "nodeType": "IfStatement", - "src": "17881:106:2", - "trueBody": { - "id": 2373, - "nodeType": "Block", - "src": "17911:76:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2363, - "name": "tokenCpt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2342, - "src": "17929:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2366, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "17953:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2367, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "17953:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - }, - "id": 2369, - "indexExpression": { - "argumentTypes": null, - "id": 2368, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "17969:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17953:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2364, - "name": "tokenCpt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2342, - "src": "17940:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "17940:12:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17940:32:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17929:43:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2372, - "nodeType": "ExpressionStatement", - "src": "17929:43:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2349, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "17835:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2350, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "17839:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2351, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "17839:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2352, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17839:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17835:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2376, - "initializationExpression": { - "assignments": [ - 2346 - ], - "declarations": [ - { - "constant": false, - "id": 2346, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17823:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2345, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17823:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2348, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2347, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17832:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "17823:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "17862:3:2", - "subExpression": { - "argumentTypes": null, - "id": 2354, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "17862:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2356, - "nodeType": "ExpressionStatement", - "src": "17862:3:2" - }, - "nodeType": "ForStatement", - "src": "17818:179:2" - }, - { - "assignments": [ - 2380 - ], - "declarations": [ - { - "constant": false, - "id": 2380, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "18006:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2378, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18006:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2379, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18006:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2386, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2384, - "name": "tokenCpt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2342, - "src": "18046:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2383, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "18032:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 2381, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18036:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2382, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18036:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 2385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18032:23:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18006:49:2" - }, - { - "assignments": [ - 2388 - ], - "declarations": [ - { - "constant": false, - "id": 2388, - "name": "tokenIndex", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "18065:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2387, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18065:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2390, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2389, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18083:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18065:19:2" - }, - { - "body": { - "id": 2442, - "nodeType": "Block", - "src": "18146:269:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2403, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "18164:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2404, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "18164:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2406, - "indexExpression": { - "argumentTypes": null, - "id": 2405, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18179:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18164:18:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2407, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18186:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "18164:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2441, - "nodeType": "IfStatement", - "src": "18160:245:2", - "trueBody": { - "id": 2440, - "nodeType": "Block", - "src": "18191:214:2", - "statements": [ - { - "body": { - "id": 2438, - "nodeType": "Block", - "src": "18259:132:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2422, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2380, - "src": "18281:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2424, - "indexExpression": { - "argumentTypes": null, - "id": 2423, - "name": "tokenIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2388, - "src": "18288:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "18281:18:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2425, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "18302:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2426, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "18302:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2428, - "indexExpression": { - "argumentTypes": null, - "id": 2427, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18317:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18302:18:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "18281:39:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2430, - "nodeType": "ExpressionStatement", - "src": "18281:39:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2436, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2431, - "name": "tokenIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2388, - "src": "18342:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 2434, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18370:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 2432, - "name": "tokenIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2388, - "src": "18355:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2433, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "18355:14:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2435, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18355:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18342:30:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2437, - "nodeType": "ExpressionStatement", - "src": "18342:30:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2413, - "name": "ib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2410, - "src": "18227:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2414, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "18232:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2415, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "18232:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - }, - "id": 2417, - "indexExpression": { - "argumentTypes": null, - "id": 2416, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18248:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18232:19:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18227:24:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2439, - "initializationExpression": { - "assignments": [ - 2410 - ], - "declarations": [ - { - "constant": false, - "id": 2410, - "name": "ib", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "18214:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2409, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18214:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2412, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2411, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18224:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18214:11:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18253:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2419, - "name": "ib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2410, - "src": "18253:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2421, - "nodeType": "ExpressionStatement", - "src": "18253:4:2" - }, - "nodeType": "ForStatement", - "src": "18209:182:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2395, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18112:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2396, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "18117:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2397, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "18117:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18117:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18112:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2443, - "initializationExpression": { - "assignments": [ - 2392 - ], - "declarations": [ - { - "constant": false, - "id": 2392, - "name": "ia", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "18099:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2391, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18099:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2394, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2393, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18109:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18099:11:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18140:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2400, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18140:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2402, - "nodeType": "ExpressionStatement", - "src": "18140:4:2" - }, - "nodeType": "ForStatement", - "src": "18094:321:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2444, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2380, - "src": "18431:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 2334, - "id": 2445, - "nodeType": "Return", - "src": "18424:13:2" - } - ] - }, - "documentation": null, - "id": 2447, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "compileTokens", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2330, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2329, - "name": "paramIndex", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17649:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2328, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17649:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17648:17:2" - }, - "payable": false, - "returnParameters": { - "id": 2334, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2333, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17701:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2331, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17701:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2332, - "length": null, - "nodeType": "ArrayTypeName", - "src": "17701:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17700:11:2" - }, - "scope": 2657, - "src": "17626:818:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2582, - "nodeType": "Block", - "src": "18532:1194:2", - "statements": [ - { - "assignments": [ - 2455 - ], - "declarations": [ - { - "constant": false, - "id": 2455, - "name": "paramIndex", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18641:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2454, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18641:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2459, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2457, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2449, - "src": "18680:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2456, - "name": "getWorkerParamsIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2289, - "src": "18659:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 2458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18659:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18641:51:2" - }, - { - "assignments": [ - 2463 - ], - "declarations": [ - { - "constant": false, - "id": 2463, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18702:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2461, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18702:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2462, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18702:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2467, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2465, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2455, - "src": "18742:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2464, - "name": "compileTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2447, - "src": "18728:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) view returns (address[] memory)" - } - }, - "id": 2466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18728:25:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18702:51:2" - }, - { - "assignments": [ - 2469 - ], - "declarations": [ - { - "constant": false, - "id": 2469, - "name": "params", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18763:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams" - }, - "typeName": { - "contractScope": null, - "id": 2468, - "name": "WorkersParams", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 948, - "src": "18763:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage_ptr", - "typeString": "struct Enigma.WorkersParams" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2473, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2470, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "18793:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2472, - "indexExpression": { - "argumentTypes": null, - "id": 2471, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2455, - "src": "18807:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18793:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18763:55:2" - }, - { - "assignments": [ - 2477 - ], - "declarations": [ - { - "constant": false, - "id": 2477, - "name": "selectedWorkers", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18829:32:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2475, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18829:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2476, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18829:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2483, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2481, - "name": "workerGroupSize", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 987, - "src": "18878:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "18864:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 2478, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18868:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2479, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18868:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 2482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18864:30:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18829:65:2" - }, - { - "body": { - "id": 2580, - "nodeType": "Block", - "src": "18953:767:2", - "statements": [ - { - "body": { - "id": 2573, - "nodeType": "Block", - "src": "18970:692:2", - "statements": [ - { - "assignments": [ - 2495 - ], - "declarations": [ - { - "constant": false, - "id": 2495, - "name": "nonce", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18988:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2494, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18988:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2497, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2496, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19001:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18988:14:2" - }, - { - "assignments": [ - 2499 - ], - "declarations": [ - { - "constant": false, - "id": 2499, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19020:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2498, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "19020:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2510, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2503, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2495, - "src": "19062:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2504, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2469, - "src": "19069:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2505, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "seed", - "nodeType": "MemberAccess", - "referencedDeclaration": 947, - "src": "19069:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2506, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2449, - "src": "19082:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2507, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2451, - "src": "19095:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2501, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3435, - "src": "19045:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2502, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19045:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2508, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19045:57:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2500, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3442, - "src": "19035:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19035:68:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19020:83:2" - }, - { - "assignments": [ - 2512 - ], - "declarations": [ - { - "constant": false, - "id": 2512, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19121:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2511, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19121:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2519, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2514, - "name": "hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2499, - "src": "19142:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 2513, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19134:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 2515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19134:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2516, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2463, - "src": "19150:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19150:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19134:29:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19121:42:2" - }, - { - "assignments": [ - 2521 - ], - "declarations": [ - { - "constant": false, - "id": 2521, - "name": "worker", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19181:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2520, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19181:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2525, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2522, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2463, - "src": "19198:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2524, - "indexExpression": { - "argumentTypes": null, - "id": 2523, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2512, - "src": "19205:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19198:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19181:30:2" - }, - { - "assignments": [ - 2527 - ], - "declarations": [ - { - "constant": false, - "id": 2527, - "name": "dup", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19229:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2526, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "19229:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2529, - "initialValue": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 2528, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19240:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "nodeType": "VariableDeclarationStatement", - "src": "19229:16:2" - }, - { - "body": { - "id": 2552, - "nodeType": "Block", - "src": "19312:165:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2544, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2540, - "name": "worker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2521, - "src": "19338:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2541, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "19348:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2543, - "indexExpression": { - "argumentTypes": null, - "id": 2542, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2531, - "src": "19364:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19348:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "19338:29:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2551, - "nodeType": "IfStatement", - "src": "19334:125:2", - "trueBody": { - "id": 2550, - "nodeType": "Block", - "src": "19369:90:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2545, - "name": "dup", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2527, - "src": "19395:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2546, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19401:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "19395:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2548, - "nodeType": "ExpressionStatement", - "src": "19395:10:2" - }, - { - "id": 2549, - "nodeType": "Break", - "src": "19431:5:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2533, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2531, - "src": "19277:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2534, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "19282:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19282:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19277:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2553, - "initializationExpression": { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2531, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19268:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2530, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19268:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2532, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "19268:7:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2538, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "19306:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2537, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2531, - "src": "19306:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2539, - "nodeType": "ExpressionStatement", - "src": "19306:4:2" - }, - "nodeType": "ForStatement", - "src": "19263:214:2" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 2556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2554, - "name": "dup", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2527, - "src": "19498:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 2555, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19505:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "19498:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2571, - "nodeType": "Block", - "src": "19587:61:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2564, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2495, - "src": "19609:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 2567, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19627:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 2565, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2495, - "src": "19617:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "19617:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19617:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19609:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2570, - "nodeType": "ExpressionStatement", - "src": "19609:20:2" - } - ] - }, - "id": 2572, - "nodeType": "IfStatement", - "src": "19494:154:2", - "trueBody": { - "id": 2563, - "nodeType": "Block", - "src": "19512:69:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2557, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "19534:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2559, - "indexExpression": { - "argumentTypes": null, - "id": 2558, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "19550:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "19534:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2560, - "name": "worker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2521, - "src": "19556:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "19534:28:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2562, - "nodeType": "ExpressionStatement", - "src": "19534:28:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2574, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "19682:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2576, - "indexExpression": { - "argumentTypes": null, - "id": 2575, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "19698:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19682:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2577, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19705:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "19682:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2579, - "nodeType": "DoWhileStatement", - "src": "18967:743:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2487, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "18918:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2488, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "18923:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18923:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18918:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2581, - "initializationExpression": { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2485, - "name": "it", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18909:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2484, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18909:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2486, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "18909:7:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18947:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2491, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "18947:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2493, - "nodeType": "ExpressionStatement", - "src": "18947:4:2" - }, - "nodeType": "ForStatement", - "src": "18904:816:2" - } - ] - }, - "documentation": null, - "id": 2583, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getWorkerGroup", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2452, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2449, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18474:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2448, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18474:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2451, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18492:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2450, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18492:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18473:34:2" - }, - "payable": false, - "returnParameters": { - "id": 2453, - "nodeType": "ParameterList", - "parameters": [], - "src": "18532:0:2" - }, - "scope": 2657, - "src": "18450:1276:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2622, - "nodeType": "Block", - "src": "19992:261:2", - "statements": [ - { - "assignments": [ - 2599 - ], - "declarations": [ - { - "constant": false, - "id": 2599, - "name": "firstBlockNumber", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "20043:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2598, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "20043:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2601, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2600, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20067:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "20043:25:2" - }, - { - "assignments": [ - 2603 - ], - "declarations": [ - { - "constant": false, - "id": 2603, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "20078:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2602, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "20078:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2605, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2604, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20090:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "20078:13:2" - }, - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2609, - "name": "activeWorkers", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "20101:30:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2607, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20101:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2608, - "length": null, - "nodeType": "ArrayTypeName", - "src": "20101:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2610, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "20101:30:2" - }, - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2614, - "name": "activeContracts", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "20141:32:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2612, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20141:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2613, - "length": null, - "nodeType": "ArrayTypeName", - "src": "20141:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2615, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "20141:32:2" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 2616, - "name": "firstBlockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2599, - "src": "20191:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2617, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2603, - "src": "20209:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2618, - "name": "activeWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2609, - "src": "20215:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 2619, - "name": "activeContracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2614, - "src": "20230:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - } - ], - "id": 2620, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20190:56:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "tuple(uint256,uint256,address[] memory,address[] memory)" - } - }, - "functionReturnParameters": 2597, - "id": 2621, - "nodeType": "Return", - "src": "20183:63:2" - } - ] - }, - "documentation": "The worker parameters corresponding to the specified block number\n * @param blockNumber The reference block number", - "id": 2623, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getWorkersParams", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2586, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2585, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19903:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2584, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19903:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19902:18:2" - }, - "payable": false, - "returnParameters": { - "id": 2597, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2588, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19954:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2587, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19954:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2590, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19960:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2589, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19960:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2593, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19966:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2591, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19966:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2592, - "length": null, - "nodeType": "ArrayTypeName", - "src": "19966:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2596, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19977:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2594, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19977:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2595, - "length": null, - "nodeType": "ArrayTypeName", - "src": "19977:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19953:34:2" - }, - "scope": 2657, - "src": "19877:376:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2655, - "nodeType": "Block", - "src": "20513:234:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2641, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2636, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "20611:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2638, - "indexExpression": { - "argumentTypes": null, - "id": 2637, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20619:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20611:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2639, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "20611:25:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2640, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20640:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "20611:32:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "576f726b6572206e6f742072656769737465726564", - "id": 2642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20645:23:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ad68aef7a0c9f95c0e940996fbd009b216d0a6ca729c2f480732643f59319eb1", - "typeString": "literal_string \"Worker not registered\"" - }, - "value": "Worker not registered" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ad68aef7a0c9f95c0e940996fbd009b216d0a6ca729c2f480732643f59319eb1", - "typeString": "literal_string \"Worker not registered\"" - } - ], - "id": 2635, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "20603:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20603:66:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2644, - "nodeType": "ExpressionStatement", - "src": "20603:66:2" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2645, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "20687:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2647, - "indexExpression": { - "argumentTypes": null, - "id": 2646, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20695:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20687:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2648, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "20687:25:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2649, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "20714:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2651, - "indexExpression": { - "argumentTypes": null, - "id": 2650, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20722:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20714:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2652, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "report", - "nodeType": "MemberAccess", - "referencedDeclaration": 934, - "src": "20714:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - } - ], - "id": 2653, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20686:54:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_bytes_storage_$", - "typeString": "tuple(address,bytes storage ref)" - } - }, - "functionReturnParameters": 2634, - "id": 2654, - "nodeType": "Return", - "src": "20679:61:2" - } - ] - }, - "documentation": "The RLP encoded report returned by the IAS server\n * @param custodian The worker's custodian address", - "id": 2656, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 2628, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20469:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 2629, - "modifierName": { - "argumentTypes": null, - "id": 2627, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "20452:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "20452:27:2" - } - ], - "name": "getReport", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2626, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2625, - "name": "custodian", - "nodeType": "VariableDeclaration", - "scope": 2656, - "src": "20409:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2624, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20409:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20408:19:2" - }, - "payable": false, - "returnParameters": { - "id": 2634, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2631, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2656, - "src": "20493:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2630, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20493:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2633, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2656, - "src": "20502:5:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2632, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20502:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20492:16:2" - }, - "scope": 2657, - "src": "20390:357:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 2658, - "src": "808:19941:2" - } - ], - "src": "0:20750:2" - }, - "legacyAST": { - "absolutePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/Enigma.sol", - "exportedSymbols": { - "ERC20": [ - 902 - ], - "Enigma": [ - 2657 - ] - }, - "id": 2658, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 832, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:2" - }, - { - "id": 833, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "25:33:2" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "id": 834, - "nodeType": "ImportDirective", - "scope": 2658, - "sourceUnit": 3016, - "src": "60:59:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/ECRecovery.sol", - "file": "openzeppelin-solidity/contracts/ECRecovery.sol", - "id": 835, - "nodeType": "ImportDirective", - "scope": 2658, - "sourceUnit": 2922, - "src": "120:56:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": false, - "id": 902, - "linearizedBaseContracts": [ - 902 - ], - "name": "ERC20", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "id": 844, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 840, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 837, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 844, - "src": "218:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 836, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "218:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 839, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 844, - "src": "233:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 838, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "233:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "217:32:2" - }, - "payable": false, - "returnParameters": { - "id": 843, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 842, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 844, - "src": "271:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 841, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "271:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "270:9:2" - }, - "scope": 902, - "src": "199:81:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 855, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 851, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 846, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 855, - "src": "307:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 845, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "307:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 848, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 855, - "src": "321:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 847, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "321:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 850, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 855, - "src": "333:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 849, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "333:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "306:41:2" - }, - "payable": false, - "returnParameters": { - "id": 854, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 853, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 855, - "src": "364:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 852, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "364:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "363:6:2" - }, - "scope": 902, - "src": "285:85:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 864, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 860, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 857, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 864, - "src": "392:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 856, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "392:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 859, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 864, - "src": "409:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 858, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "409:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "391:32:2" - }, - "payable": false, - "returnParameters": { - "id": 863, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 862, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 864, - "src": "440:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 861, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "440:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "439:6:2" - }, - "scope": 902, - "src": "375:71:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 869, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "totalSupply", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 865, - "nodeType": "ParameterList", - "parameters": [], - "src": "471:2:2" - }, - "payable": false, - "returnParameters": { - "id": 868, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 867, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 869, - "src": "495:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 866, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "495:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "494:9:2" - }, - "scope": 902, - "src": "451:53:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 876, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "balanceOf", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 872, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 871, - "name": "who", - "nodeType": "VariableDeclaration", - "scope": 876, - "src": "528:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 870, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "528:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "527:13:2" - }, - "payable": false, - "returnParameters": { - "id": 875, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 874, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 876, - "src": "562:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 873, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "562:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "561:9:2" - }, - "scope": 902, - "src": "509:62:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": null, - "documentation": null, - "id": 885, - "implemented": false, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 881, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 878, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 885, - "src": "594:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 877, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "594:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 880, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 885, - "src": "606:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 879, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "606:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "593:27:2" - }, - "payable": false, - "returnParameters": { - "id": 884, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 883, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 885, - "src": "637:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 882, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "637:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "636:6:2" - }, - "scope": 902, - "src": "576:67:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 893, - "name": "Transfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 892, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 887, - "indexed": true, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 893, - "src": "664:20:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 886, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 889, - "indexed": true, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 893, - "src": "686:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 888, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "686:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 891, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 893, - "src": "706:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 890, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "706:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "663:57:2" - }, - "src": "649:72:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 901, - "name": "Approval", - "nodeType": "EventDefinition", - "parameters": { - "id": 900, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 895, - "indexed": true, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 901, - "src": "741:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 894, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "741:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 897, - "indexed": true, - "name": "spender", - "nodeType": "VariableDeclaration", - "scope": 901, - "src": "764:23:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 896, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "764:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 899, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 901, - "src": "789:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 898, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "789:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "740:63:2" - }, - "src": "726:78:2" - } - ], - "scope": 2658, - "src": "178:628:2" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 2657, - "linearizedBaseContracts": [ - 2657 - ], - "name": "Enigma", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 905, - "libraryName": { - "contractScope": null, - "id": 903, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3015, - "src": "836:8:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$3015", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "830:27:2", - "typeName": { - "id": 904, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "849:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "id": 908, - "libraryName": { - "contractScope": null, - "id": 906, - "name": "ECRecovery", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2921, - "src": "868:10:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ECRecovery_$2921", - "typeString": "library ECRecovery" - } - }, - "nodeType": "UsingForDirective", - "src": "862:29:2", - "typeName": { - "id": 907, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "883:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - }, - { - "constant": false, - "id": 910, - "name": "engToken", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "959:21:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - }, - "typeName": { - "contractScope": null, - "id": 909, - "name": "ERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 902, - "src": "959:5:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - } - }, - "value": null, - "visibility": "public" - }, - { - "canonicalName": "Enigma.Task", - "id": 923, - "members": [ - { - "constant": false, - "id": 912, - "name": "fee", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1009:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 911, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1009:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 914, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1027:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 913, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1027:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 916, - "name": "tokenValue", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1050:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 915, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1050:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 918, - "name": "proof", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1075:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 917, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1075:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 920, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1167:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 919, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1167:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 922, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 923, - "src": "1191:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - }, - "typeName": { - "contractScope": null, - "id": 921, - "name": "TaskStatus", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 926, - "src": "1191:10:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Task", - "nodeType": "StructDefinition", - "scope": 2657, - "src": "987:228:2", - "visibility": "public" - }, - { - "canonicalName": "Enigma.TaskStatus", - "id": 926, - "members": [ - { - "id": 924, - "name": "RecordCreated", - "nodeType": "EnumValue", - "src": "1237:13:2" - }, - { - "id": 925, - "name": "ReceiptVerified", - "nodeType": "EnumValue", - "src": "1252:15:2" - } - ], - "name": "TaskStatus", - "nodeType": "EnumDefinition", - "src": "1220:48:2" - }, - { - "constant": false, - "id": 928, - "name": "principal", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "1576:17:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 927, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1576:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "canonicalName": "Enigma.Worker", - "id": 937, - "members": [ - { - "constant": false, - "id": 930, - "name": "signer", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "1677:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 929, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1677:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 932, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "1701:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 931, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1701:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 934, - "name": "report", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "1767:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 933, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "1767:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 936, - "name": "balance", - "nodeType": "VariableDeclaration", - "scope": 937, - "src": "1886:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 935, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1886:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Worker", - "nodeType": "StructDefinition", - "scope": 2657, - "src": "1653:255:2", - "visibility": "public" - }, - { - "canonicalName": "Enigma.WorkersParams", - "id": 948, - "members": [ - { - "constant": false, - "id": 939, - "name": "firstBlockNumber", - "nodeType": "VariableDeclaration", - "scope": 948, - "src": "2070:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 938, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2070:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 942, - "name": "workers", - "nodeType": "VariableDeclaration", - "scope": 948, - "src": "2101:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 940, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2101:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 941, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2101:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 945, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 948, - "src": "2128:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 943, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2128:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 944, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2128:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 947, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 948, - "src": "2153:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 946, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2153:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "WorkersParams", - "nodeType": "StructDefinition", - "scope": 2657, - "src": "2039:130:2", - "visibility": "public" - }, - { - "canonicalName": "Enigma.SecretContract", - "id": 958, - "members": [ - { - "constant": false, - "id": 950, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 958, - "src": "2207:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 949, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2207:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 952, - "name": "codeHash", - "nodeType": "VariableDeclaration", - "scope": 958, - "src": "2230:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 951, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2230:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 955, - "name": "stateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 958, - "src": "2256:26:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 953, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2256:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 954, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2256:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 957, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 958, - "src": "2292:27:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - }, - "typeName": { - "contractScope": null, - "id": 956, - "name": "SecretContractStatus", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 961, - "src": "2292:20:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "SecretContract", - "nodeType": "StructDefinition", - "scope": 2657, - "src": "2175:205:2", - "visibility": "public" - }, - { - "canonicalName": "Enigma.SecretContractStatus", - "id": 961, - "members": [ - { - "id": 959, - "name": "Undefined", - "nodeType": "EnumValue", - "src": "2466:9:2" - }, - { - "id": 960, - "name": "Deployed", - "nodeType": "EnumValue", - "src": "2477:8:2" - } - ], - "name": "SecretContractStatus", - "nodeType": "EnumDefinition", - "src": "2439:47:2" - }, - { - "constant": false, - "id": 965, - "name": "workersParams", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3091:30:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams[5]" - }, - "typeName": { - "baseType": { - "contractScope": null, - "id": 962, - "name": "WorkersParams", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 948, - "src": "3091:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage_ptr", - "typeString": "struct Enigma.WorkersParams" - } - }, - "id": 964, - "length": { - "argumentTypes": null, - "hexValue": "35", - "id": 963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3105:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - }, - "value": "5" - }, - "nodeType": "ArrayTypeName", - "src": "3091:16:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage_ptr", - "typeString": "struct Enigma.WorkersParams[5]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 968, - "name": "workerAddresses", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3183:32:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 966, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3183:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 967, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3183:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 971, - "name": "scAddresses", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3275:28:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 969, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3275:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 970, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3275:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 975, - "name": "workers", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3376:41:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker)" - }, - "typeName": { - "id": 974, - "keyType": { - "id": 972, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3384:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3376:26:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker)" - }, - "valueType": { - "contractScope": null, - "id": 973, - "name": "Worker", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 937, - "src": "3395:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage_ptr", - "typeString": "struct Enigma.Worker" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 979, - "name": "tasks", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3423:37:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task)" - }, - "typeName": { - "id": 978, - "keyType": { - "id": 976, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3431:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "3423:24:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task)" - }, - "valueType": { - "contractScope": null, - "id": 977, - "name": "Task", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 923, - "src": "3442:4:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage_ptr", - "typeString": "struct Enigma.Task" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 983, - "name": "contracts", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3466:51:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract)" - }, - "typeName": { - "id": 982, - "keyType": { - "id": 980, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3474:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "3466:34:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract)" - }, - "valueType": { - "contractScope": null, - "id": 981, - "name": "SecretContract", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 958, - "src": "3485:14:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage_ptr", - "typeString": "struct Enigma.SecretContract" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 985, - "name": "stakingThreshold", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3595:21:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 984, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3595:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 987, - "name": "workerGroupSize", - "nodeType": "VariableDeclaration", - "scope": 2657, - "src": "3622:20:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 986, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3622:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "anonymous": false, - "documentation": null, - "id": 993, - "name": "Registered", - "nodeType": "EventDefinition", - "parameters": { - "id": 992, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 989, - "indexed": false, - "name": "custodian", - "nodeType": "VariableDeclaration", - "scope": 993, - "src": "3708:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 988, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3708:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 991, - "indexed": false, - "name": "signer", - "nodeType": "VariableDeclaration", - "scope": 993, - "src": "3727:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 990, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3727:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3707:35:2" - }, - "src": "3691:52:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1001, - "name": "ValidatedSig", - "nodeType": "EventDefinition", - "parameters": { - "id": 1000, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 995, - "indexed": false, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1001, - "src": "3767:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 994, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3767:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 997, - "indexed": false, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 1001, - "src": "3778:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 996, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3778:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 999, - "indexed": false, - "name": "workerAddr", - "nodeType": "VariableDeclaration", - "scope": 1001, - "src": "3792:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 998, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3792:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3766:45:2" - }, - "src": "3748:64:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1013, - "name": "WorkersParameterized", - "nodeType": "EventDefinition", - "parameters": { - "id": 1012, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1003, - "indexed": false, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 1013, - "src": "3844:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1002, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3844:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1005, - "indexed": false, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 1013, - "src": "3855:19:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1004, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3855:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1008, - "indexed": false, - "name": "workers", - "nodeType": "VariableDeclaration", - "scope": 1013, - "src": "3876:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1006, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3876:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1007, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3876:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1011, - "indexed": false, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 1013, - "src": "3895:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1009, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3895:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1010, - "length": null, - "nodeType": "ArrayTypeName", - "src": "3895:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3843:68:2" - }, - "src": "3817:95:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1025, - "name": "TaskRecordCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 1024, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1015, - "indexed": false, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3941:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1014, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3941:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1017, - "indexed": false, - "name": "fee", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3957:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1016, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3957:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1019, - "indexed": false, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3967:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1018, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3967:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1021, - "indexed": false, - "name": "tokenValue", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3982:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1020, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3982:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1023, - "indexed": false, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 1025, - "src": "3999:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1022, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3999:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3940:74:2" - }, - "src": "3917:98:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1041, - "name": "TaskRecordsCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 1040, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1028, - "indexed": false, - "name": "taskIds", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4045:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1026, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4045:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1027, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4045:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1031, - "indexed": false, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4064:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1029, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4064:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1030, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4064:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1034, - "indexed": false, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4077:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1032, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4077:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1033, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4077:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1037, - "indexed": false, - "name": "tokenValues", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4095:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1035, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4095:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1036, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4095:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1039, - "indexed": false, - "name": "sender", - "nodeType": "VariableDeclaration", - "scope": 1041, - "src": "4115:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1038, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4115:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4044:86:2" - }, - "src": "4020:111:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1053, - "name": "ReceiptVerified", - "nodeType": "EventDefinition", - "parameters": { - "id": 1052, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1043, - "indexed": false, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4158:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1042, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4158:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1045, - "indexed": false, - "name": "inStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4174:24:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1044, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4174:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1047, - "indexed": false, - "name": "outStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4200:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1046, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4200:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1049, - "indexed": false, - "name": "ethCall", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4227:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1048, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4227:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1051, - "indexed": false, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1053, - "src": "4242:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1050, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4242:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4157:95:2" - }, - "src": "4136:117:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1070, - "name": "ReceiptsVerified", - "nodeType": "EventDefinition", - "parameters": { - "id": 1069, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1056, - "indexed": false, - "name": "taskIds", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4281:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1054, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4281:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1055, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4281:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1059, - "indexed": false, - "name": "inStateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4300:28:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1057, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4300:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1058, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4300:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1062, - "indexed": false, - "name": "outStateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4330:29:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1060, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4330:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1061, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4330:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1065, - "indexed": false, - "name": "ethCalls", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4361:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 1063, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4361:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 1064, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4361:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1068, - "indexed": false, - "name": "sigs", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "4379:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 1066, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4379:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 1067, - "length": null, - "nodeType": "ArrayTypeName", - "src": "4379:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4280:112:2" - }, - "src": "4258:135:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1076, - "name": "DepositSuccessful", - "nodeType": "EventDefinition", - "parameters": { - "id": 1075, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1072, - "indexed": false, - "name": "from", - "nodeType": "VariableDeclaration", - "scope": 1076, - "src": "4422:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1071, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4422:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1074, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1076, - "src": "4436:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1073, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4436:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4421:26:2" - }, - "src": "4398:50:2" - }, - { - "anonymous": false, - "documentation": null, - "id": 1082, - "name": "SecretContractDeployed", - "nodeType": "EventDefinition", - "parameters": { - "id": 1081, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1078, - "indexed": false, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1082, - "src": "4482:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1077, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4482:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1080, - "indexed": false, - "name": "codeHash", - "nodeType": "VariableDeclaration", - "scope": 1082, - "src": "4498:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1079, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "4498:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4481:34:2" - }, - "src": "4453:63:2" - }, - { - "body": { - "id": 1107, - "nodeType": "Block", - "src": "4584:140:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1093, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1089, - "name": "engToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 910, - "src": "4594:8:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1091, - "name": "_tokenAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1084, - "src": "4611:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1090, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 902, - "src": "4605:5:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$902_$", - "typeString": "type(contract ERC20)" - } - }, - "id": 1092, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4605:20:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - } - }, - "src": "4594:31:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$902", - "typeString": "contract ERC20" - } - }, - "id": 1094, - "nodeType": "ExpressionStatement", - "src": "4594:31:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1097, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1095, - "name": "principal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 928, - "src": "4635:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1096, - "name": "_principal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1086, - "src": "4647:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4635:22:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1098, - "nodeType": "ExpressionStatement", - "src": "4635:22:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1099, - "name": "stakingThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 985, - "src": "4667:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 1100, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4686:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4667:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1102, - "nodeType": "ExpressionStatement", - "src": "4667:20:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1105, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1103, - "name": "workerGroupSize", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 987, - "src": "4697:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "3130", - "id": 1104, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4715:2:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "4697:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1106, - "nodeType": "ExpressionStatement", - "src": "4697:20:2" - } - ] - }, - "documentation": null, - "id": 1108, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1087, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1084, - "name": "_tokenAddress", - "nodeType": "VariableDeclaration", - "scope": 1108, - "src": "4534:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1083, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4534:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1086, - "name": "_principal", - "nodeType": "VariableDeclaration", - "scope": 1108, - "src": "4557:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1085, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4557:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4533:43:2" - }, - "payable": false, - "returnParameters": { - "id": 1088, - "nodeType": "ParameterList", - "parameters": [], - "src": "4584:0:2" - }, - "scope": 2657, - "src": "4522:202:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1127, - "nodeType": "Block", - "src": "4978:124:2", - "statements": [ - { - "assignments": [ - 1113 - ], - "declarations": [ - { - "constant": false, - "id": 1113, - "name": "worker", - "nodeType": "VariableDeclaration", - "scope": 1128, - "src": "4988:20:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_memory_ptr", - "typeString": "struct Enigma.Worker" - }, - "typeName": { - "contractScope": null, - "id": 1112, - "name": "Worker", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 937, - "src": "4988:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage_ptr", - "typeString": "struct Enigma.Worker" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1117, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1114, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "5011:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1116, - "indexExpression": { - "argumentTypes": null, - "id": 1115, - "name": "user", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1110, - "src": "5019:4:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5011:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4988:36:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 1122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1119, - "name": "worker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1113, - "src": "5042:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_memory_ptr", - "typeString": "struct Enigma.Worker memory" - } - }, - "id": 1120, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 932, - "src": "5042:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1121, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5058:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5042:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "556e7265676973746572656420776f726b65722e", - "id": 1123, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5061:22:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_015d526a09bff2dba6bddc24f9efb2c59ba42ae95d5f989298007e714aa8b419", - "typeString": "literal_string \"Unregistered worker.\"" - }, - "value": "Unregistered worker." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_015d526a09bff2dba6bddc24f9efb2c59ba42ae95d5f989298007e714aa8b419", - "typeString": "literal_string \"Unregistered worker.\"" - } - ], - "id": 1118, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "5034:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5034:50:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1125, - "nodeType": "ExpressionStatement", - "src": "5034:50:2" - }, - { - "id": 1126, - "nodeType": "PlaceholderStatement", - "src": "5094:1:2" - } - ] - }, - "documentation": "Checks if the custodian wallet is registered as a worker\n * @param user The custodian address of the worker", - "id": 1128, - "name": "workerRegistered", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 1111, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1110, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 1128, - "src": "4964:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1109, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4964:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4963:14:2" - }, - "src": "4938:164:2", - "visibility": "internal" - }, - { - "body": { - "id": 1144, - "nodeType": "Block", - "src": "5150:127:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - }, - "id": 1139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1133, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "5168:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1135, - "indexExpression": { - "argumentTypes": null, - "id": 1134, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1130, - "src": "5178:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5168:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1136, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 957, - "src": "5168:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1137, - "name": "SecretContractStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "5196:20:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_SecretContractStatus_$961_$", - "typeString": "type(enum Enigma.SecretContractStatus)" - } - }, - "id": 1138, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Deployed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5196:29:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "src": "5168:57:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "53656372657420636f6e7472616374206e6f74206465706c6f7965642e", - "id": 1140, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5227:31:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d75dc00527700c4b910eb9a01254b9dfa870fc7fe0e54f61053a0ea9455cc0d2", - "typeString": "literal_string \"Secret contract not deployed.\"" - }, - "value": "Secret contract not deployed." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d75dc00527700c4b910eb9a01254b9dfa870fc7fe0e54f61053a0ea9455cc0d2", - "typeString": "literal_string \"Secret contract not deployed.\"" - } - ], - "id": 1132, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "5160:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5160:99:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1142, - "nodeType": "ExpressionStatement", - "src": "5160:99:2" - }, - { - "id": 1143, - "nodeType": "PlaceholderStatement", - "src": "5269:1:2" - } - ] - }, - "documentation": null, - "id": 1145, - "name": "contractDeployed", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 1131, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1130, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1145, - "src": "5134:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1129, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5134:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5133:16:2" - }, - "src": "5108:169:2", - "visibility": "internal" - }, - { - "body": { - "id": 1216, - "nodeType": "Block", - "src": "5692:670:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1152, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "5853:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1155, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1153, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "5861:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5861:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5853:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1156, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "5853:26:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1157, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5883:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "5853:33:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1177, - "nodeType": "IfStatement", - "src": "5849:249:2", - "trueBody": { - "id": 1176, - "nodeType": "Block", - "src": "5888:210:2", - "statements": [ - { - "assignments": [ - 1160 - ], - "declarations": [ - { - "constant": false, - "id": 1160, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 1217, - "src": "5965:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1159, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5965:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1163, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1161, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "5978:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1162, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5978:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "5965:35:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "6014:24:2", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1164, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "6014:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1166, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6014:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1168, - "nodeType": "ExpressionStatement", - "src": "6014:24:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1169, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "6052:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1171, - "indexExpression": { - "argumentTypes": null, - "id": 1170, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1160, - "src": "6068:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6052:22:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1172, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6077:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6077:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6052:35:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1175, - "nodeType": "ExpressionStatement", - "src": "6052:35:2" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 1184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1178, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6148:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1181, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1179, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6156:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1180, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6156:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6148:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1182, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "6148:26:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1183, - "name": "signer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1147, - "src": "6177:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6148:35:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1185, - "nodeType": "ExpressionStatement", - "src": "6148:35:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1186, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6193:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1189, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1187, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6201:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6201:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6193:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1190, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "6193:27:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 1191, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6223:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6193:31:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1193, - "nodeType": "ExpressionStatement", - "src": "6193:31:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1200, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1194, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6234:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1197, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1195, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6242:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1196, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6242:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6234:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1198, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "report", - "nodeType": "MemberAccess", - "referencedDeclaration": 934, - "src": "6234:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1199, - "name": "report", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1149, - "src": "6263:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "6234:35:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 1201, - "nodeType": "ExpressionStatement", - "src": "6234:35:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1208, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1202, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6279:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1205, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1203, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6287:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6287:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6279:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1206, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 932, - "src": "6279:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 1207, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6308:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "6279:30:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 1209, - "nodeType": "ExpressionStatement", - "src": "6279:30:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1211, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "6336:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1212, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6336:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1213, - "name": "signer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1147, - "src": "6348:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1210, - "name": "Registered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 993, - "src": "6325:10:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 1214, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6325:30:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1215, - "nodeType": "EmitStatement", - "src": "6320:35:2" - } - ] - }, - "documentation": "Registers a new worker of change the signer parameters of an existing\nworker. This should be called by every worker (and the principal)\nnode in order to receive tasks.\n * @param signer The signer address, derived from the enclave public key\n@param report The RLP encoded report returned by the IAS", - "id": 1217, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "register", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1150, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1147, - "name": "signer", - "nodeType": "VariableDeclaration", - "scope": 1217, - "src": "5647:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1146, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5647:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1149, - "name": "report", - "nodeType": "VariableDeclaration", - "scope": 1217, - "src": "5663:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1148, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "5663:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5646:30:2" - }, - "payable": false, - "returnParameters": { - "id": 1151, - "nodeType": "ParameterList", - "parameters": [], - "src": "5692:0:2" - }, - "scope": 2657, - "src": "5629:733:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1245, - "nodeType": "Block", - "src": "6464:301:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1227, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6639:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1229, - "indexExpression": { - "argumentTypes": null, - "id": 1228, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1219, - "src": "6647:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6639:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1230, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "6639:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1236, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1221, - "src": "6699:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1231, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "6668:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1233, - "indexExpression": { - "argumentTypes": null, - "id": 1232, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1219, - "src": "6676:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6668:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1234, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "6668:26:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "6668:30:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6668:38:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6639:67:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1239, - "nodeType": "ExpressionStatement", - "src": "6639:67:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1241, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1219, - "src": "6740:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1242, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1221, - "src": "6751:6:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1240, - "name": "DepositSuccessful", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1076, - "src": "6722:17:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 1243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6722:36:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1244, - "nodeType": "EmitStatement", - "src": "6717:41:2" - } - ] - }, - "documentation": null, - "id": 1246, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1224, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1219, - "src": "6449:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1225, - "modifierName": { - "argumentTypes": null, - "id": 1223, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "6432:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "6432:27:2" - } - ], - "name": "deposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1222, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1219, - "name": "custodian", - "nodeType": "VariableDeclaration", - "scope": 1246, - "src": "6385:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1218, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6385:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1221, - "name": "amount", - "nodeType": "VariableDeclaration", - "scope": 1246, - "src": "6404:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1220, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6404:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6384:32:2" - }, - "payable": false, - "returnParameters": { - "id": 1226, - "nodeType": "ParameterList", - "parameters": [], - "src": "6464:0:2" - }, - "scope": 2657, - "src": "6368:397:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1305, - "nodeType": "Block", - "src": "7078:428:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - }, - "id": 1268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1262, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7096:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1264, - "indexExpression": { - "argumentTypes": null, - "id": 1263, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7106:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7096:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1265, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 957, - "src": "7096:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1266, - "name": "SecretContractStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "7124:20:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_SecretContractStatus_$961_$", - "typeString": "type(enum Enigma.SecretContractStatus)" - } - }, - "id": 1267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Undefined", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7124:30:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "src": "7096:58:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "53656372657420636f6e747261637420616c7265616479206465706c6f7965642e", - "id": 1269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7156:35:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2e032a85504939142c24900a8270f54bd3f5061914a7a38008c3f763afaca760", - "typeString": "literal_string \"Secret contract already deployed.\"" - }, - "value": "Secret contract already deployed." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2e032a85504939142c24900a8270f54bd3f5061914a7a38008c3f763afaca760", - "typeString": "literal_string \"Secret contract already deployed.\"" - } - ], - "id": 1261, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "7088:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7088:104:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1271, - "nodeType": "ExpressionStatement", - "src": "7088:104:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1272, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7265:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1274, - "indexExpression": { - "argumentTypes": null, - "id": 1273, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7275:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7265:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1275, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "owner", - "nodeType": "MemberAccess", - "referencedDeclaration": 950, - "src": "7265:23:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1276, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1252, - "src": "7291:5:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "7265:31:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1278, - "nodeType": "ExpressionStatement", - "src": "7265:31:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1279, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7306:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1281, - "indexExpression": { - "argumentTypes": null, - "id": 1280, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7316:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7306:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1282, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "codeHash", - "nodeType": "MemberAccess", - "referencedDeclaration": 952, - "src": "7306:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1283, - "name": "codeHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1250, - "src": "7335:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "7306:37:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1285, - "nodeType": "ExpressionStatement", - "src": "7306:37:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1292, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1286, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7353:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1288, - "indexExpression": { - "argumentTypes": null, - "id": 1287, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7363:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7353:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1289, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 957, - "src": "7353:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1290, - "name": "SecretContractStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "7380:20:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_SecretContractStatus_$961_$", - "typeString": "type(enum Enigma.SecretContractStatus)" - } - }, - "id": 1291, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Deployed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7380:29:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "src": "7353:56:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "id": 1293, - "nodeType": "ExpressionStatement", - "src": "7353:56:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1297, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7436:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1294, - "name": "scAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "7419:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7419:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) returns (uint256)" - } - }, - "id": 1298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7419:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1299, - "nodeType": "ExpressionStatement", - "src": "7419:24:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1301, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1248, - "src": "7482:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1302, - "name": "codeHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1250, - "src": "7490:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1300, - "name": "SecretContractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1082, - "src": "7459:22:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$returns$__$", - "typeString": "function (address,bytes32)" - } - }, - "id": 1303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7459:40:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1304, - "nodeType": "EmitStatement", - "src": "7454:45:2" - } - ] - }, - "documentation": null, - "id": 1306, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1257, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "7062:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7062:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1259, - "modifierName": { - "argumentTypes": null, - "id": 1256, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "7045:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "7045:28:2" - } - ], - "name": "deploySecretContract", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1255, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1248, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "6970:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1247, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6970:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1250, - "name": "codeHash", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "6986:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1249, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "6986:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1252, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "7004:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1251, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7004:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1254, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1306, - "src": "7019:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1253, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "7019:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6969:60:2" - }, - "payable": false, - "returnParameters": { - "id": 1260, - "nodeType": "ParameterList", - "parameters": [], - "src": "7078:0:2" - }, - "scope": 2657, - "src": "6940:566:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1327, - "nodeType": "Block", - "src": "7591:153:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - }, - "id": 1319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1313, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7604:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1315, - "indexExpression": { - "argumentTypes": null, - "id": 1314, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "7614:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7604:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1316, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 957, - "src": "7604:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1317, - "name": "SecretContractStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 961, - "src": "7632:20:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_SecretContractStatus_$961_$", - "typeString": "type(enum Enigma.SecretContractStatus)" - } - }, - "id": 1318, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "Deployed", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7632:29:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_SecretContractStatus_$961", - "typeString": "enum Enigma.SecretContractStatus" - } - }, - "src": "7604:57:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1325, - "nodeType": "Block", - "src": "7703:35:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 1323, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7723:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 1312, - "id": 1324, - "nodeType": "Return", - "src": "7716:12:2" - } - ] - }, - "id": 1326, - "nodeType": "IfStatement", - "src": "7600:138:2", - "trueBody": { - "id": 1322, - "nodeType": "Block", - "src": "7663:34:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1320, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7683:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1312, - "id": 1321, - "nodeType": "Return", - "src": "7676:11:2" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1328, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "isDeployed", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1309, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1308, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1328, - "src": "7532:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1307, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7532:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7531:16:2" - }, - "payable": false, - "returnParameters": { - "id": 1312, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1311, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1328, - "src": "7581:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1310, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "7581:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7580:6:2" - }, - "scope": 2657, - "src": "7512:232:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1343, - "nodeType": "Block", - "src": "7862:49:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1338, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "7878:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1340, - "indexExpression": { - "argumentTypes": null, - "id": 1339, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1330, - "src": "7888:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7878:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1341, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "codeHash", - "nodeType": "MemberAccess", - "referencedDeclaration": 952, - "src": "7878:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 1337, - "id": 1342, - "nodeType": "Return", - "src": "7871:33:2" - } - ] - }, - "documentation": null, - "id": 1344, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1333, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1330, - "src": "7828:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1334, - "modifierName": { - "argumentTypes": null, - "id": 1332, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "7811:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "7811:24:2" - } - ], - "name": "getCodeHash", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1331, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1330, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1344, - "src": "7771:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1329, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7771:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7770:16:2" - }, - "payable": false, - "returnParameters": { - "id": 1337, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1336, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1344, - "src": "7849:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1335, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "7849:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7848:9:2" - }, - "scope": 2657, - "src": "7750:161:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1352, - "nodeType": "Block", - "src": "7992:42:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1349, - "name": "scAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "8009:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1350, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8009:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1348, - "id": 1351, - "nodeType": "Return", - "src": "8002:25:2" - } - ] - }, - "documentation": null, - "id": 1353, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "countSecretContracts", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1345, - "nodeType": "ParameterList", - "parameters": [], - "src": "7946:2:2" - }, - "payable": false, - "returnParameters": { - "id": 1348, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1347, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1353, - "src": "7982:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1346, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7982:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7981:6:2" - }, - "scope": 2657, - "src": "7917:117:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1412, - "nodeType": "Block", - "src": "8238:298:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1363, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1357, - "src": "8252:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1364, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8260:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8252:9:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1372, - "nodeType": "IfStatement", - "src": "8248:65:2", - "trueBody": { - "id": 1371, - "nodeType": "Block", - "src": "8263:50:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1366, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1357, - "src": "8277:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1367, - "name": "scAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "8284:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1368, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8284:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8277:25:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1370, - "nodeType": "ExpressionStatement", - "src": "8277:25:2" - } - ] - } - }, - { - "assignments": [ - 1376 - ], - "declarations": [ - { - "constant": false, - "id": 1376, - "name": "addresses", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8322:26:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1374, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8322:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1375, - "length": null, - "nodeType": "ArrayTypeName", - "src": "8322:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1385, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1382, - "name": "start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1355, - "src": "8374:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1380, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1357, - "src": "8365:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1381, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "8365:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8365:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1379, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "8351:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 1377, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8355:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1378, - "length": null, - "nodeType": "ArrayTypeName", - "src": "8355:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 1384, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8351:30:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8322:59:2" - }, - { - "assignments": [ - 1387 - ], - "declarations": [ - { - "constant": false, - "id": 1387, - "name": "pos", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8391:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1386, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8391:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1389, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8402:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "8391:12:2" - }, - { - "body": { - "id": 1408, - "nodeType": "Block", - "src": "8449:55:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1406, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1400, - "name": "addresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1376, - "src": "8462:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 1402, - "indexExpression": { - "argumentTypes": null, - "id": 1401, - "name": "pos", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1387, - "src": "8472:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8462:14:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1403, - "name": "scAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 971, - "src": "8479:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 1405, - "indexExpression": { - "argumentTypes": null, - "id": 1404, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1391, - "src": "8491:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8479:14:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8462:31:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1407, - "nodeType": "ExpressionStatement", - "src": "8462:31:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1394, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1391, - "src": "8434:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1395, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1357, - "src": "8438:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8434:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1409, - "initializationExpression": { - "assignments": [ - 1391 - ], - "declarations": [ - { - "constant": false, - "id": 1391, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8418:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1390, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8418:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1393, - "initialValue": { - "argumentTypes": null, - "id": 1392, - "name": "start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1355, - "src": "8427:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8418:14:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "8444:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1397, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1391, - "src": "8444:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1399, - "nodeType": "ExpressionStatement", - "src": "8444:3:2" - }, - "nodeType": "ForStatement", - "src": "8413:91:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1410, - "name": "addresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1376, - "src": "8520:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 1362, - "id": 1411, - "nodeType": "Return", - "src": "8513:16:2" - } - ] - }, - "documentation": "Selects address from start up to, but not including, the stop number*", - "id": 1413, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getSecretContractAddresses", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1358, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1355, - "name": "start", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8167:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1354, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8167:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1357, - "name": "stop", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8179:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1356, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8179:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8166:23:2" - }, - "payable": false, - "returnParameters": { - "id": 1362, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1361, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1413, - "src": "8223:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1359, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8223:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1360, - "length": null, - "nodeType": "ArrayTypeName", - "src": "8223:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8222:11:2" - }, - "scope": 2657, - "src": "8131:405:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1429, - "nodeType": "Block", - "src": "8656:65:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1423, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "8673:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1425, - "indexExpression": { - "argumentTypes": null, - "id": 1424, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1415, - "src": "8683:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8673:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1426, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "8673:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1427, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8673:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 1422, - "id": 1428, - "nodeType": "Return", - "src": "8666:48:2" - } - ] - }, - "documentation": null, - "id": 1430, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1418, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1415, - "src": "8625:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1419, - "modifierName": { - "argumentTypes": null, - "id": 1417, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "8608:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "8608:24:2" - } - ], - "name": "countStateDeltas", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1416, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1415, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1430, - "src": "8568:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1414, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8568:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8567:16:2" - }, - "payable": false, - "returnParameters": { - "id": 1422, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1421, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1430, - "src": "8646:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1420, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8646:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8645:6:2" - }, - "scope": 2657, - "src": "8542:179:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1449, - "nodeType": "Block", - "src": "8857:65:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1442, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "8874:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1444, - "indexExpression": { - "argumentTypes": null, - "id": 1443, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1432, - "src": "8884:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8874:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1445, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "8874:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1447, - "indexExpression": { - "argumentTypes": null, - "id": 1446, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1434, - "src": "8909:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8874:41:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 1441, - "id": 1448, - "nodeType": "Return", - "src": "8867:48:2" - } - ] - }, - "documentation": null, - "id": 1450, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1437, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1432, - "src": "8823:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1438, - "modifierName": { - "argumentTypes": null, - "id": 1436, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "8806:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "8806:24:2" - } - ], - "name": "getStateDeltaHash", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1435, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1432, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1450, - "src": "8754:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1431, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8754:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1434, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 1450, - "src": "8770:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1433, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8770:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8753:28:2" - }, - "payable": false, - "returnParameters": { - "id": 1441, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1440, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1450, - "src": "8844:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1439, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8844:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8843:9:2" - }, - "scope": 2657, - "src": "8727:195:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1520, - "nodeType": "Block", - "src": "9169:336:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1465, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "9183:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1466, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9191:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "9183:9:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1477, - "nodeType": "IfStatement", - "src": "9179:88:2", - "trueBody": { - "id": 1476, - "nodeType": "Block", - "src": "9194:73:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1468, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "9208:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1469, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "9215:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1471, - "indexExpression": { - "argumentTypes": null, - "id": 1470, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1452, - "src": "9225:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9215:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1472, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "9215:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1473, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9215:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9208:48:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1475, - "nodeType": "ExpressionStatement", - "src": "9208:48:2" - } - ] - } - }, - { - "assignments": [ - 1481 - ], - "declarations": [ - { - "constant": false, - "id": 1481, - "name": "deltas", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9276:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1479, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9276:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1480, - "length": null, - "nodeType": "ArrayTypeName", - "src": "9276:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1490, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1487, - "name": "start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1454, - "src": "9325:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1485, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "9316:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "9316:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9316:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "9302:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bytes32_$dyn_memory_$", - "typeString": "function (uint256) pure returns (bytes32[] memory)" - }, - "typeName": { - "baseType": { - "id": 1482, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9306:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1483, - "length": null, - "nodeType": "ArrayTypeName", - "src": "9306:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - } - }, - "id": 1489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9302:30:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory", - "typeString": "bytes32[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9276:56:2" - }, - { - "assignments": [ - 1492 - ], - "declarations": [ - { - "constant": false, - "id": 1492, - "name": "pos", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9342:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1491, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9342:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1494, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1493, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9353:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "9342:12:2" - }, - { - "body": { - "id": 1516, - "nodeType": "Block", - "src": "9400:76:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1514, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1505, - "name": "deltas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1481, - "src": "9414:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1507, - "indexExpression": { - "argumentTypes": null, - "id": 1506, - "name": "pos", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1492, - "src": "9421:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9414:11:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1508, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "9428:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1510, - "indexExpression": { - "argumentTypes": null, - "id": 1509, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1452, - "src": "9438:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9428:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1511, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "9428:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1513, - "indexExpression": { - "argumentTypes": null, - "id": 1512, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1496, - "src": "9463:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9428:37:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "9414:51:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1515, - "nodeType": "ExpressionStatement", - "src": "9414:51:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1499, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1496, - "src": "9385:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 1500, - "name": "stop", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1456, - "src": "9389:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9385:8:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1517, - "initializationExpression": { - "assignments": [ - 1496 - ], - "declarations": [ - { - "constant": false, - "id": 1496, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9369:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1495, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9369:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1498, - "initialValue": { - "argumentTypes": null, - "id": 1497, - "name": "start", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1454, - "src": "9378:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9369:14:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "9395:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1502, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1496, - "src": "9395:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1504, - "nodeType": "ExpressionStatement", - "src": "9395:3:2" - }, - "nodeType": "ForStatement", - "src": "9364:112:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1518, - "name": "deltas", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1481, - "src": "9492:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "functionReturnParameters": 1464, - "id": 1519, - "nodeType": "Return", - "src": "9485:13:2" - } - ] - }, - "documentation": "Selects state deltas from start up to, but not including, the stop number*", - "id": 1521, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1459, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1452, - "src": "9133:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1460, - "modifierName": { - "argumentTypes": null, - "id": 1458, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "9116:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "9116:24:2" - } - ], - "name": "getStateDeltaHashes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1457, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1452, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9053:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1451, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9053:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1454, - "name": "start", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9069:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1453, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9069:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1456, - "name": "stop", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9081:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1455, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9081:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9052:39:2" - }, - "payable": false, - "returnParameters": { - "id": 1464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1463, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1521, - "src": "9154:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1461, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9154:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1462, - "length": null, - "nodeType": "ArrayTypeName", - "src": "9154:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9153:11:2" - }, - "scope": 2657, - "src": "9024:481:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1570, - "nodeType": "Block", - "src": "9649:284:2", - "statements": [ - { - "assignments": [ - 1534 - ], - "declarations": [ - { - "constant": false, - "id": 1534, - "name": "valid", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9659:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1533, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9659:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1536, - "initialValue": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 1535, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9672:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "nodeType": "VariableDeclarationStatement", - "src": "9659:18:2" - }, - { - "body": { - "id": 1566, - "nodeType": "Block", - "src": "9756:149:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1551, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "9773:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1553, - "indexExpression": { - "argumentTypes": null, - "id": 1552, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1523, - "src": "9783:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9773:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1554, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "9773:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1556, - "indexExpression": { - "argumentTypes": null, - "id": 1555, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1538, - "src": "9808:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9773:37:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 1557, - "name": "stateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1525, - "src": "9814:14:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "9773:55:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1565, - "nodeType": "IfStatement", - "src": "9769:126:2", - "trueBody": { - "id": 1564, - "nodeType": "Block", - "src": "9830:65:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1559, - "name": "valid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1534, - "src": "9847:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1560, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9855:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "9847:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1562, - "nodeType": "ExpressionStatement", - "src": "9847:12:2" - }, - { - "id": 1563, - "nodeType": "Break", - "src": "9876:5:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1541, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1538, - "src": "9704:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1542, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "9708:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1544, - "indexExpression": { - "argumentTypes": null, - "id": 1543, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1523, - "src": "9718:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9708:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1545, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "9708:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1546, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9708:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9704:45:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1567, - "initializationExpression": { - "assignments": [ - 1538 - ], - "declarations": [ - { - "constant": false, - "id": 1538, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9692:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1537, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9692:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1540, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1539, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9701:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "9692:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "9751:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1548, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1538, - "src": "9751:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1550, - "nodeType": "ExpressionStatement", - "src": "9751:3:2" - }, - "nodeType": "ForStatement", - "src": "9687:218:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1568, - "name": "valid", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1534, - "src": "9921:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1532, - "id": 1569, - "nodeType": "Return", - "src": "9914:12:2" - } - ] - }, - "documentation": null, - "id": 1571, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 1528, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1523, - "src": "9618:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1529, - "modifierName": { - "argumentTypes": null, - "id": 1527, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "9601:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "9601:24:2" - } - ], - "name": "isValidDeltaHash", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1526, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1523, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9537:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1522, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9537:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1525, - "name": "stateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9553:22:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1524, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9553:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9536:40:2" - }, - "payable": false, - "returnParameters": { - "id": 1532, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1531, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1571, - "src": "9639:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1530, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9639:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9638:6:2" - }, - "scope": 2657, - "src": "9511:422:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1638, - "nodeType": "Block", - "src": "10121:371:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1583, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10139:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1585, - "indexExpression": { - "argumentTypes": null, - "id": 1584, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10145:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10139:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1586, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 920, - "src": "10139:20:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1587, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10163:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "10139:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5461736b20616c72656164792065786973742e", - "id": 1589, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10168:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bc6ba0dbf698c73239ebe06639f1000e8b0940a7d6a986a655fda518ab50ea8f", - "typeString": "literal_string \"Task already exist.\"" - }, - "value": "Task already exist." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bc6ba0dbf698c73239ebe06639f1000e8b0940a7d6a986a655fda518ab50ea8f", - "typeString": "literal_string \"Task already exist.\"" - } - ], - "id": 1582, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "10131:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10131:59:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1591, - "nodeType": "ExpressionStatement", - "src": "10131:59:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1592, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10201:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1594, - "indexExpression": { - "argumentTypes": null, - "id": 1593, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10207:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10201:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1595, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "fee", - "nodeType": "MemberAccess", - "referencedDeclaration": 912, - "src": "10201:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1596, - "name": "fee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1575, - "src": "10221:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10201:23:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1598, - "nodeType": "ExpressionStatement", - "src": "10201:23:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1599, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10234:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1601, - "indexExpression": { - "argumentTypes": null, - "id": 1600, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10240:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10234:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1602, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "token", - "nodeType": "MemberAccess", - "referencedDeclaration": 914, - "src": "10234:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1603, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1577, - "src": "10256:5:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10234:27:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1605, - "nodeType": "ExpressionStatement", - "src": "10234:27:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1606, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10271:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1608, - "indexExpression": { - "argumentTypes": null, - "id": 1607, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10277:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10271:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1609, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "tokenValue", - "nodeType": "MemberAccess", - "referencedDeclaration": 916, - "src": "10271:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1610, - "name": "tokenValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1579, - "src": "10298:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10271:37:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1612, - "nodeType": "ExpressionStatement", - "src": "10271:37:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1613, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10318:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1615, - "indexExpression": { - "argumentTypes": null, - "id": 1614, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10324:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10318:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1616, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 920, - "src": "10318:20:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1617, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "10341:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10341:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10318:33:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1620, - "nodeType": "ExpressionStatement", - "src": "10318:33:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1621, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10361:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1623, - "indexExpression": { - "argumentTypes": null, - "id": 1622, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10367:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10361:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1624, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "10361:20:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1625, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "10384:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1626, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "RecordCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10384:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "10361:47:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "id": 1628, - "nodeType": "ExpressionStatement", - "src": "10361:47:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1630, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1573, - "src": "10442:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1631, - "name": "fee", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1575, - "src": "10450:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1632, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1577, - "src": "10455:5:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1633, - "name": "tokenValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1579, - "src": "10462:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1634, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "10474:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1635, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10474:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1629, - "name": "TaskRecordCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1025, - "src": "10424:17:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$_t_address_$returns$__$", - "typeString": "function (bytes32,uint256,address,uint256,address)" - } - }, - "id": 1636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10424:61:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1637, - "nodeType": "EmitStatement", - "src": "10419:66:2" - } - ] - }, - "documentation": "Store task record\n ", - "id": 1639, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "createTaskRecord", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1580, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1573, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1639, - "src": "10019:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1572, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10019:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1575, - "name": "fee", - "nodeType": "VariableDeclaration", - "scope": 1639, - "src": "10043:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1574, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10043:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1577, - "name": "token", - "nodeType": "VariableDeclaration", - "scope": 1639, - "src": "10061:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1576, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10061:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1579, - "name": "tokenValue", - "nodeType": "VariableDeclaration", - "scope": 1639, - "src": "10084:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1578, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10084:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10009:96:2" - }, - "payable": false, - "returnParameters": { - "id": 1581, - "nodeType": "ParameterList", - "parameters": [], - "src": "10121:0:2" - }, - "scope": 2657, - "src": "9984:508:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1741, - "nodeType": "Block", - "src": "10648:497:2", - "statements": [ - { - "body": { - "id": 1730, - "nodeType": "Block", - "src": "10700:358:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1666, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10722:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1670, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1667, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10728:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1669, - "indexExpression": { - "argumentTypes": null, - "id": 1668, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10736:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10728:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10722:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1671, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 920, - "src": "10722:24:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1672, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10750:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "10722:31:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5461736b20616c72656164792065786973742e", - "id": 1674, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10755:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bc6ba0dbf698c73239ebe06639f1000e8b0940a7d6a986a655fda518ab50ea8f", - "typeString": "literal_string \"Task already exist.\"" - }, - "value": "Task already exist." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bc6ba0dbf698c73239ebe06639f1000e8b0940a7d6a986a655fda518ab50ea8f", - "typeString": "literal_string \"Task already exist.\"" - } - ], - "id": 1665, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "10714:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10714:63:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1676, - "nodeType": "ExpressionStatement", - "src": "10714:63:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1677, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10792:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1681, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1678, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10798:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1680, - "indexExpression": { - "argumentTypes": null, - "id": 1679, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10806:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10798:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10792:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1682, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "fee", - "nodeType": "MemberAccess", - "referencedDeclaration": 912, - "src": "10792:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1683, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1645, - "src": "10816:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1685, - "indexExpression": { - "argumentTypes": null, - "id": 1684, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10821:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10816:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10792:31:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1687, - "nodeType": "ExpressionStatement", - "src": "10792:31:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1688, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10837:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1692, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1689, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10843:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1691, - "indexExpression": { - "argumentTypes": null, - "id": 1690, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10851:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10843:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10837:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1693, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "token", - "nodeType": "MemberAccess", - "referencedDeclaration": 914, - "src": "10837:23:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1694, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1648, - "src": "10863:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 1696, - "indexExpression": { - "argumentTypes": null, - "id": 1695, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10870:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10863:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10837:35:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1698, - "nodeType": "ExpressionStatement", - "src": "10837:35:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1699, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10886:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1703, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1700, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10892:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1702, - "indexExpression": { - "argumentTypes": null, - "id": 1701, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10900:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10892:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10886:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1704, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "tokenValue", - "nodeType": "MemberAccess", - "referencedDeclaration": 916, - "src": "10886:28:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1705, - "name": "tokenValues", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1651, - "src": "10917:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 1707, - "indexExpression": { - "argumentTypes": null, - "id": 1706, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10929:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10917:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10886:45:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1709, - "nodeType": "ExpressionStatement", - "src": "10886:45:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1710, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10945:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1714, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1711, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10951:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1713, - "indexExpression": { - "argumentTypes": null, - "id": 1712, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10959:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10951:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10945:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1715, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": 920, - "src": "10945:24:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1716, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "10972:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10972:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10945:37:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1719, - "nodeType": "ExpressionStatement", - "src": "10945:37:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1728, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1720, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "10996:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1724, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1721, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "11002:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1723, - "indexExpression": { - "argumentTypes": null, - "id": 1722, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "11010:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11002:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10996:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1725, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "10996:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1726, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "11023:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1727, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "RecordCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11023:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "10996:51:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "id": 1729, - "nodeType": "ExpressionStatement", - "src": "10996:51:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1658, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10675:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1659, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "10679:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10679:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10675:18:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1731, - "initializationExpression": { - "assignments": [ - 1655 - ], - "declarations": [ - { - "constant": false, - "id": 1655, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10663:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1654, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10663:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1657, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1656, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10672:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "10663:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10695:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1662, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1655, - "src": "10695:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1664, - "nodeType": "ExpressionStatement", - "src": "10695:3:2" - }, - "nodeType": "ForStatement", - "src": "10658:400:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1733, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1642, - "src": "11091:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - { - "argumentTypes": null, - "id": 1734, - "name": "fees", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1645, - "src": "11100:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "id": 1735, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1648, - "src": "11106:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 1736, - "name": "tokenValues", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1651, - "src": "11114:11:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1737, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "11127:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1738, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11127:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 1732, - "name": "TaskRecordsCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1041, - "src": "11072:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (bytes32[] memory,uint256[] memory,address[] memory,uint256[] memory,address)" - } - }, - "id": 1739, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11072:66:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1740, - "nodeType": "EmitStatement", - "src": "11067:71:2" - } - ] - }, - "documentation": null, - "id": 1742, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "createTaskRecords", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1652, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1642, - "name": "taskIds", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10534:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1640, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10534:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1641, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10534:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1645, - "name": "fees", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10561:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1643, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10561:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1644, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10561:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1648, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10582:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1646, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10582:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1647, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10582:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1651, - "name": "tokenValues", - "nodeType": "VariableDeclaration", - "scope": 1742, - "src": "10608:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 1649, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10608:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1650, - "length": null, - "nodeType": "ArrayTypeName", - "src": "10608:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10524:108:2" - }, - "payable": false, - "returnParameters": { - "id": 1653, - "nodeType": "ParameterList", - "parameters": [], - "src": "10648:0:2" - }, - "scope": 2657, - "src": "10498:647:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1754, - "nodeType": "Block", - "src": "11317:116:2", - "statements": [ - { - "externalReferences": [ - { - "data": { - "declaration": 1748, - "isOffset": false, - "isSlot": false, - "src": "11405:4:2", - "valueSize": 1 - } - }, - { - "data": { - "declaration": 1748, - "isOffset": false, - "isSlot": false, - "src": "11386:4:2", - "valueSize": 1 - } - }, - { - "success": { - "declaration": 1751, - "isOffset": false, - "isSlot": false, - "src": "11350:7:2", - "valueSize": 1 - } - }, - { - "to": { - "declaration": 1744, - "isOffset": false, - "isSlot": false, - "src": "11371:2:2", - "valueSize": 1 - } - }, - { - "value": { - "declaration": 1746, - "isOffset": false, - "isSlot": false, - "src": "11375:5:2", - "valueSize": 1 - } - } - ], - "id": 1753, - "nodeType": "InlineAssembly", - "operations": "{\n success := call(gas(), to, value, add(data, 0x20), mload(data), 0, 0)\n}", - "src": "11327:106:2" - } - ] - }, - "documentation": null, - "id": 1755, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "executeCall", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1749, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1744, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1755, - "src": "11234:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1743, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11234:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1746, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1755, - "src": "11246:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1745, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11246:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1748, - "name": "data", - "nodeType": "VariableDeclaration", - "scope": 1755, - "src": "11261:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1747, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11261:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11233:39:2" - }, - "payable": false, - "returnParameters": { - "id": 1752, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1751, - "name": "success", - "nodeType": "VariableDeclaration", - "scope": 1755, - "src": "11299:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1750, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11299:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11298:14:2" - }, - "scope": 2657, - "src": "11213:220:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1852, - "nodeType": "Block", - "src": "11644:932:2", - "statements": [ - { - "assignments": [ - 1771 - ], - "declarations": [ - { - "constant": false, - "id": 1771, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11654:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1770, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11654:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1777, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1772, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "11667:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1774, - "indexExpression": { - "argumentTypes": null, - "id": 1773, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1757, - "src": "11677:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11667:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1775, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "11667:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1776, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11667:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11654:54:2" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1780, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1778, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1771, - "src": "11722:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 1779, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11731:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11722:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1804, - "nodeType": "Block", - "src": "11847:136:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1800, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1790, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1761, - "src": "11869:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1791, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "11889:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1793, - "indexExpression": { - "argumentTypes": null, - "id": 1792, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1757, - "src": "11899:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11889:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1794, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "11889:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1799, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 1797, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11934:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 1795, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1771, - "src": "11924:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1796, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "11924:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 1798, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11924:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11889:48:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "11869:68:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c696420696e7075742073746174652064656c74612068617368", - "id": 1801, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11939:32:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3793359aced2caaea2b4a5e03abde718cd02badbe9ea3aab94582eebe44d2119", - "typeString": "literal_string \"Invalid input state delta hash\"" - }, - "value": "Invalid input state delta hash" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3793359aced2caaea2b4a5e03abde718cd02badbe9ea3aab94582eebe44d2119", - "typeString": "literal_string \"Invalid input state delta hash\"" - } - ], - "id": 1789, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "11861:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11861:111:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1803, - "nodeType": "ExpressionStatement", - "src": "11861:111:2" - } - ] - }, - "id": 1805, - "nodeType": "IfStatement", - "src": "11718:265:2", - "trueBody": { - "id": 1788, - "nodeType": "Block", - "src": "11734:107:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1784, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1782, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1761, - "src": "11756:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1783, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11776:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "11756:23:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c696420696e7075742073746174652064656c7461206861736820666f7220656d707479207374617465", - "id": 1785, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11781:48:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_836559a8e1e2ae055c4a308ad98bbb75d85f29059de7757b18c71085d2cd2872", - "typeString": "literal_string \"Invalid input state delta hash for empty state\"" - }, - "value": "Invalid input state delta hash for empty state" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_836559a8e1e2ae055c4a308ad98bbb75d85f29059de7757b18c71085d2cd2872", - "typeString": "literal_string \"Invalid input state delta hash for empty state\"" - } - ], - "id": 1781, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "11748:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1786, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11748:82:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1787, - "nodeType": "ExpressionStatement", - "src": "11748:82:2" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 1811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "11992:43:2", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1806, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "11992:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1808, - "indexExpression": { - "argumentTypes": null, - "id": 1807, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1757, - "src": "12002:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11992:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1809, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "11992:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1810, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11992:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1812, - "nodeType": "ExpressionStatement", - "src": "11992:43:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1813, - "name": "contracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 983, - "src": "12045:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_SecretContract_$958_storage_$", - "typeString": "mapping(address => struct Enigma.SecretContract storage ref)" - } - }, - "id": 1815, - "indexExpression": { - "argumentTypes": null, - "id": 1814, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1757, - "src": "12055:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12045:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_SecretContract_$958_storage", - "typeString": "struct Enigma.SecretContract storage ref" - } - }, - "id": 1816, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "stateDeltaHashes", - "nodeType": "MemberAccess", - "referencedDeclaration": 955, - "src": "12045:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 1818, - "indexExpression": { - "argumentTypes": null, - "id": 1817, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1771, - "src": "12080:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "12045:41:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1819, - "name": "outStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1763, - "src": "12089:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "12045:61:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1821, - "nodeType": "ExpressionStatement", - "src": "12045:61:2" - }, - { - "assignments": [ - 1823 - ], - "declarations": [ - { - "constant": false, - "id": 1823, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "12225:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1822, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12225:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1833, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1827, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1759, - "src": "12267:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1828, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1761, - "src": "12275:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1829, - "name": "outStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1763, - "src": "12293:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1830, - "name": "ethCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1765, - "src": "12312:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 1825, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3435, - "src": "12250:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1826, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12250:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12250:70:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1824, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3442, - "src": "12240:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 1832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12240:81:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12225:96:2" - }, - { - "assignments": [ - 1835 - ], - "declarations": [ - { - "constant": false, - "id": 1835, - "name": "workerAddr", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "12450:18:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1834, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12450:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1840, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1838, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1767, - "src": "12484:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 1836, - "name": "hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1823, - "src": "12471:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1837, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "recover", - "nodeType": "MemberAccess", - "referencedDeclaration": 2904, - "src": "12471:12:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_address_$bound_to$_t_bytes32_$", - "typeString": "function (bytes32,bytes memory) pure returns (address)" - } - }, - "id": 1839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12471:17:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12450:38:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 1848, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1842, - "name": "workerAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1835, - "src": "12506:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1843, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "12520:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 1846, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1844, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "12528:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12528:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12520:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 1847, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "12520:26:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "12506:40:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c6964207369676e61747572652e", - "id": 1849, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12548:20:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_de618ca49ed109c14f243a6f72f71bc4082410d500e2fcf7ed6cc449e8b19481", - "typeString": "literal_string \"Invalid signature.\"" - }, - "value": "Invalid signature." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_de618ca49ed109c14f243a6f72f71bc4082410d500e2fcf7ed6cc449e8b19481", - "typeString": "literal_string \"Invalid signature.\"" - } - ], - "id": 1841, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "12498:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12498:71:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1851, - "nodeType": "ExpressionStatement", - "src": "12498:71:2" - } - ] - }, - "documentation": null, - "id": 1853, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "verifyReceipt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1768, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1757, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11471:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1756, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11471:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1759, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11495:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1758, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11495:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1761, - "name": "inStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11519:24:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1760, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11519:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1763, - "name": "outStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11553:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1762, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11553:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1765, - "name": "ethCall", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11588:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1764, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11588:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1767, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1853, - "src": "11611:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1766, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "11611:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11461:165:2" - }, - "payable": false, - "returnParameters": { - "id": 1769, - "nodeType": "ParameterList", - "parameters": [], - "src": "11644:0:2" - }, - "scope": 2657, - "src": "11439:1137:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 1918, - "nodeType": "Block", - "src": "12913:371:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - }, - "id": 1882, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1876, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "12931:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1878, - "indexExpression": { - "argumentTypes": null, - "id": 1877, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "12937:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12931:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1879, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "12931:20:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1880, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "12955:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1881, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "RecordCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12955:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "12931:48:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c6964207461736b20737461747573", - "id": 1883, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12981:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_35c761622bcc8ab75f9adfaf21a4872a39cd06f2745d5488272d29f1f753f270", - "typeString": "literal_string \"Invalid task status\"" - }, - "value": "Invalid task status" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_35c761622bcc8ab75f9adfaf21a4872a39cd06f2745d5488272d29f1f753f270", - "typeString": "literal_string \"Invalid task status\"" - } - ], - "id": 1875, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "12923:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12923:80:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1885, - "nodeType": "ExpressionStatement", - "src": "12923:80:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1887, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1855, - "src": "13027:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1888, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "13035:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1889, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1859, - "src": "13043:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1890, - "name": "outStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1861, - "src": "13061:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1891, - "name": "ethCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1863, - "src": "13080:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 1892, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1865, - "src": "13089:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1886, - "name": "verifyReceipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1853, - "src": "13013:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,bytes32,bytes32,bytes32,bytes memory,bytes memory)" - } - }, - "id": 1893, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13013:80:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1894, - "nodeType": "ExpressionStatement", - "src": "13013:80:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1895, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13104:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1897, - "indexExpression": { - "argumentTypes": null, - "id": 1896, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "13110:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13104:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1898, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "proof", - "nodeType": "MemberAccess", - "referencedDeclaration": 918, - "src": "13104:19:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1899, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1865, - "src": "13126:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "13104:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 1901, - "nodeType": "ExpressionStatement", - "src": "13104:25:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1908, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1902, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13139:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1904, - "indexExpression": { - "argumentTypes": null, - "id": 1903, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "13145:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13139:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1905, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "13139:20:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1906, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "13162:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1907, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "ReceiptVerified", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13162:26:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "13139:49:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "id": 1909, - "nodeType": "ExpressionStatement", - "src": "13139:49:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1911, - "name": "taskId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1857, - "src": "13219:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1912, - "name": "inStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1859, - "src": "13227:16:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1913, - "name": "outStateDeltaHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1861, - "src": "13245:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1914, - "name": "ethCall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1863, - "src": "13264:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 1915, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1865, - "src": "13273:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1910, - "name": "ReceiptVerified", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1053, - "src": "13203:15:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (bytes32,bytes32,bytes32,bytes memory,bytes memory)" - } - }, - "id": 1916, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13203:74:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1917, - "nodeType": "EmitStatement", - "src": "13198:79:2" - } - ] - }, - "documentation": "Commit the computation task results on chain", - "id": 1919, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1868, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "12868:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1869, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12868:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1870, - "modifierName": { - "argumentTypes": null, - "id": 1867, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "12851:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "12851:28:2" - }, - { - "arguments": [ - { - "argumentTypes": null, - "id": 1872, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1855, - "src": "12901:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1873, - "modifierName": { - "argumentTypes": null, - "id": 1871, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "12884:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "12884:24:2" - } - ], - "name": "commitReceipt", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1866, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1855, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12680:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1854, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12680:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1857, - "name": "taskId", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12704:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1856, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12704:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1859, - "name": "inStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12728:24:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1858, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12728:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1861, - "name": "outStateDeltaHash", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12762:25:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1860, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12762:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1863, - "name": "ethCall", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12797:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1862, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12797:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1865, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 1919, - "src": "12820:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 1864, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "12820:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12670:165:2" - }, - "payable": false, - "returnParameters": { - "id": 1874, - "nodeType": "ParameterList", - "parameters": [], - "src": "12913:0:2" - }, - "scope": 2657, - "src": "12648:636:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2020, - "nodeType": "Block", - "src": "13573:545:2", - "statements": [ - { - "body": { - "id": 2010, - "nodeType": "Block", - "src": "13625:390:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - }, - "id": 1966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1958, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13697:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1962, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1959, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13703:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1961, - "indexExpression": { - "argumentTypes": null, - "id": 1960, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13711:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13703:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13697:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1963, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "13697:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1964, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "13725:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 1965, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "RecordCreated", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13725:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "13697:52:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c6964207461736b20737461747573", - "id": 1967, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13751:21:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_35c761622bcc8ab75f9adfaf21a4872a39cd06f2745d5488272d29f1f753f270", - "typeString": "literal_string \"Invalid task status\"" - }, - "value": "Invalid task status" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_35c761622bcc8ab75f9adfaf21a4872a39cd06f2745d5488272d29f1f753f270", - "typeString": "literal_string \"Invalid task status\"" - } - ], - "id": 1957, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "13689:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1968, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13689:84:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1969, - "nodeType": "ExpressionStatement", - "src": "13689:84:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1971, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1921, - "src": "13801:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1972, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13809:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1974, - "indexExpression": { - "argumentTypes": null, - "id": 1973, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13817:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13809:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1975, - "name": "inStateDeltaHashes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1927, - "src": "13821:18:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1977, - "indexExpression": { - "argumentTypes": null, - "id": 1976, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13840:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13821:21:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1978, - "name": "outStateDeltaHashes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1930, - "src": "13844:19:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1980, - "indexExpression": { - "argumentTypes": null, - "id": 1979, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13864:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13844:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1981, - "name": "ethCalls", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1933, - "src": "13868:8:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 1983, - "indexExpression": { - "argumentTypes": null, - "id": 1982, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13877:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13868:11:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1984, - "name": "sigs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1936, - "src": "13881:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 1986, - "indexExpression": { - "argumentTypes": null, - "id": 1985, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13886:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13881:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - ], - "id": 1970, - "name": "verifyReceipt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1853, - "src": "13787:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_bytes32_$_t_bytes32_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,bytes32,bytes32,bytes32,bytes memory,bytes memory)" - } - }, - "id": 1987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13787:102:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1988, - "nodeType": "ExpressionStatement", - "src": "13787:102:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 1998, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1989, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13904:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 1993, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1990, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13910:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1992, - "indexExpression": { - "argumentTypes": null, - "id": 1991, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13918:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13910:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13904:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 1994, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "proof", - "nodeType": "MemberAccess", - "referencedDeclaration": 918, - "src": "13904:23:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1995, - "name": "sigs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1936, - "src": "13930:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - "id": 1997, - "indexExpression": { - "argumentTypes": null, - "id": 1996, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13935:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13930:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory", - "typeString": "bytes memory" - } - }, - "src": "13904:33:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 1999, - "nodeType": "ExpressionStatement", - "src": "13904:33:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2008, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2000, - "name": "tasks", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 979, - "src": "13951:5:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Task_$923_storage_$", - "typeString": "mapping(bytes32 => struct Enigma.Task storage ref)" - } - }, - "id": 2004, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2001, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13957:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 2003, - "indexExpression": { - "argumentTypes": null, - "id": 2002, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13965:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13957:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13951:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Task_$923_storage", - "typeString": "struct Enigma.Task storage ref" - } - }, - "id": 2005, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 922, - "src": "13951:24:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2006, - "name": "TaskStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 926, - "src": "13978:10:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_TaskStatus_$926_$", - "typeString": "type(enum Enigma.TaskStatus)" - } - }, - "id": 2007, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "ReceiptVerified", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13978:26:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "src": "13951:53:2", - "typeDescriptions": { - "typeIdentifier": "t_enum$_TaskStatus_$926", - "typeString": "enum Enigma.TaskStatus" - } - }, - "id": 2009, - "nodeType": "ExpressionStatement", - "src": "13951:53:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1950, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13600:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1951, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "13604:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - "id": 1952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13604:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "13600:18:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2011, - "initializationExpression": { - "assignments": [ - 1947 - ], - "declarations": [ - { - "constant": false, - "id": 1947, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13588:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1946, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "13588:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1949, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 1948, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13597:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "13588:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 1955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "13620:3:2", - "subExpression": { - "argumentTypes": null, - "id": 1954, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1947, - "src": "13620:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1956, - "nodeType": "ExpressionStatement", - "src": "13620:3:2" - }, - "nodeType": "ForStatement", - "src": "13583:432:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2013, - "name": "taskIds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1924, - "src": "14046:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - { - "argumentTypes": null, - "id": 2014, - "name": "inStateDeltaHashes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1927, - "src": "14055:18:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - { - "argumentTypes": null, - "id": 2015, - "name": "outStateDeltaHashes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1930, - "src": "14075:19:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - } - }, - { - "argumentTypes": null, - "id": 2016, - "name": "ethCalls", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1933, - "src": "14096:8:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - }, - { - "argumentTypes": null, - "id": 2017, - "name": "sigs", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1936, - "src": "14106:4:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - }, - { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes memory[] memory" - } - ], - "id": 2012, - "name": "ReceiptsVerified", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1070, - "src": "14029:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_bytes_memory_$dyn_memory_ptr_$_t_array$_t_bytes_memory_$dyn_memory_ptr_$returns$__$", - "typeString": "function (bytes32[] memory,bytes32[] memory,bytes32[] memory,bytes memory[] memory,bytes memory[] memory)" - } - }, - "id": 2018, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14029:82:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2019, - "nodeType": "EmitStatement", - "src": "14024:87:2" - } - ] - }, - "documentation": null, - "id": 2021, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1939, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "13528:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13528:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1941, - "modifierName": { - "argumentTypes": null, - "id": 1938, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "13511:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "13511:28:2" - }, - { - "arguments": [ - { - "argumentTypes": null, - "id": 1943, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1921, - "src": "13561:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 1944, - "modifierName": { - "argumentTypes": null, - "id": 1942, - "name": "contractDeployed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1145, - "src": "13544:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "13544:24:2" - } - ], - "name": "commitReceipts", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1937, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1921, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13323:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1920, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13323:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1924, - "name": "taskIds", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13347:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1922, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13347:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1923, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13347:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1927, - "name": "inStateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13374:28:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1925, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13374:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1926, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13374:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1930, - "name": "outStateDeltaHashes", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13412:29:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 1928, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "13412:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1929, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13412:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1933, - "name": "ethCalls", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13451:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 1931, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13451:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 1932, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13451:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1936, - "name": "sigs", - "nodeType": "VariableDeclaration", - "scope": 2021, - "src": "13477:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_memory_$dyn_memory_ptr", - "typeString": "bytes[]" - }, - "typeName": { - "baseType": { - "id": 1934, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "13477:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "id": 1935, - "length": null, - "nodeType": "ArrayTypeName", - "src": "13477:7:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", - "typeString": "bytes[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13313:182:2" - }, - "payable": false, - "returnParameters": { - "id": 1945, - "nodeType": "ParameterList", - "parameters": [], - "src": "13573:0:2" - }, - "scope": 2657, - "src": "13290:828:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2048, - "nodeType": "Block", - "src": "14291:132:2", - "statements": [ - { - "assignments": [ - 2031 - ], - "declarations": [ - { - "constant": false, - "id": 2031, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14301:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2030, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "14301:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2038, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2035, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2023, - "src": "14343:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2033, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3435, - "src": "14326:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2034, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14326:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2036, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14326:22:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2032, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3442, - "src": "14316:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14316:33:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14301:48:2" - }, - { - "assignments": [ - 2040 - ], - "declarations": [ - { - "constant": false, - "id": 2040, - "name": "signer", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14359:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2039, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14359:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2045, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2043, - "name": "sig", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2025, - "src": "14389:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 2041, - "name": "hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2031, - "src": "14376:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 2042, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "recover", - "nodeType": "MemberAccess", - "referencedDeclaration": 2904, - "src": "14376:12:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_address_$bound_to$_t_bytes32_$", - "typeString": "function (bytes32,bytes memory) pure returns (address)" - } - }, - "id": 2044, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14376:17:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14359:34:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2046, - "name": "signer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2040, - "src": "14410:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 2029, - "id": 2047, - "nodeType": "Return", - "src": "14403:13:2" - } - ] - }, - "documentation": null, - "id": 2049, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "verifyParamsSig", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2026, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2023, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14218:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2022, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14218:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2025, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14232:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2024, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "14232:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14217:25:2" - }, - "payable": false, - "returnParameters": { - "id": 2029, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2028, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2049, - "src": "14278:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2027, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "14278:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14277:9:2" - }, - "scope": 2657, - "src": "14193:230:2", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2218, - "nodeType": "Block", - "src": "14799:1905:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2067, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2061, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "15016:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2064, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2062, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "15024:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2063, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15024:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15016:19:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2065, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "15016:26:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2066, - "name": "principal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 928, - "src": "15046:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "15016:39:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f6e6c7920746865205072696e636970616c2063616e20757064617465207468652073656564", - "id": 2068, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15057:40:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bc5bcb5ed31af9f048e73c2cbe5de0569fa9bcd43014614ad5223290fd42066d", - "typeString": "literal_string \"Only the Principal can update the seed\"" - }, - "value": "Only the Principal can update the seed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bc5bcb5ed31af9f048e73c2cbe5de0569fa9bcd43014614ad5223290fd42066d", - "typeString": "literal_string \"Only the Principal can update the seed\"" - } - ], - "id": 2060, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "15008:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15008:90:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2070, - "nodeType": "ExpressionStatement", - "src": "15008:90:2" - }, - { - "assignments": [ - 2072 - ], - "declarations": [ - { - "constant": false, - "id": 2072, - "name": "paramIndex", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "15419:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2071, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "15419:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2074, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2073, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15437:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15419:19:2" - }, - { - "body": { - "id": 2114, - "nodeType": "Block", - "src": "15499:363:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2091, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2086, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15601:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2088, - "indexExpression": { - "argumentTypes": null, - "id": 2087, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15615:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15601:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2089, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "15601:34:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2090, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15639:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "15601:39:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2098, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15723:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2100, - "indexExpression": { - "argumentTypes": null, - "id": 2099, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15737:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15723:17:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2101, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "15723:34:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2102, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15760:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2104, - "indexExpression": { - "argumentTypes": null, - "id": 2103, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15774:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15760:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2105, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "15760:42:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15723:79:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2112, - "nodeType": "IfStatement", - "src": "15719:133:2", - "trueBody": { - "id": 2111, - "nodeType": "Block", - "src": "15804:48:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2107, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15822:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2108, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15835:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15822:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2110, - "nodeType": "ExpressionStatement", - "src": "15822:15:2" - } - ] - } - }, - "id": 2113, - "nodeType": "IfStatement", - "src": "15597:255:2", - "trueBody": { - "id": 2097, - "nodeType": "Block", - "src": "15642:71:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2094, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2092, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15660:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2093, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15673:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15660:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2095, - "nodeType": "ExpressionStatement", - "src": "15660:15:2" - }, - { - "id": 2096, - "nodeType": "Break", - "src": "15693:5:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2079, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15466:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2080, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15471:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15471:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15466:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2115, - "initializationExpression": { - "assignments": [ - 2076 - ], - "declarations": [ - { - "constant": false, - "id": 2076, - "name": "pi", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "15453:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2075, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "15453:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2078, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2077, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15463:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "15453:11:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2084, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "15493:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2083, - "name": "pi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2076, - "src": "15493:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2085, - "nodeType": "ExpressionStatement", - "src": "15493:4:2" - }, - "nodeType": "ForStatement", - "src": "15448:414:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2116, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15871:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2118, - "indexExpression": { - "argumentTypes": null, - "id": 2117, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15885:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15871:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2119, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "15871:42:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2120, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3438, - "src": "15916:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2121, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "15916:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15871:57:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2123, - "nodeType": "ExpressionStatement", - "src": "15871:57:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2124, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "15938:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2126, - "indexExpression": { - "argumentTypes": null, - "id": 2125, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "15952:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15938:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2127, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "seed", - "nodeType": "MemberAccess", - "referencedDeclaration": 947, - "src": "15938:30:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2128, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2051, - "src": "15971:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15938:37:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2130, - "nodeType": "ExpressionStatement", - "src": "15938:37:2" - }, - { - "assignments": [ - 2132 - ], - "declarations": [ - { - "constant": false, - "id": 2132, - "name": "workerIndex", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "16026:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2131, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16026:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2134, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2133, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16045:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "16026:20:2" - }, - { - "body": { - "id": 2202, - "nodeType": "Block", - "src": "16109:463:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2146, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "16127:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2150, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2147, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "16135:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2149, - "indexExpression": { - "argumentTypes": null, - "id": 2148, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16151:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16135:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16127:28:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2151, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "16127:36:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 2152, - "name": "stakingThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 985, - "src": "16166:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16127:55:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2201, - "nodeType": "IfStatement", - "src": "16123:439:2", - "trueBody": { - "id": 2200, - "nodeType": "Block", - "src": "16184:378:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "16202:42:2", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2154, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16202:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2156, - "indexExpression": { - "argumentTypes": null, - "id": 2155, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16216:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16202:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2157, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "16202:33:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2158, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16202:40:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2160, - "nodeType": "ExpressionStatement", - "src": "16202:42:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2170, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2161, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16262:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2163, - "indexExpression": { - "argumentTypes": null, - "id": 2162, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16276:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16262:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2164, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "16262:33:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2166, - "indexExpression": { - "argumentTypes": null, - "id": 2165, - "name": "workerIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "16296:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "16262:46:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2167, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "16311:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2169, - "indexExpression": { - "argumentTypes": null, - "id": 2168, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16327:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16311:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "16262:68:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2171, - "nodeType": "ExpressionStatement", - "src": "16262:68:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "16349:43:2", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2172, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16349:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2174, - "indexExpression": { - "argumentTypes": null, - "id": 2173, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16363:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16349:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2175, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "16349:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 2176, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16349:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2178, - "nodeType": "ExpressionStatement", - "src": "16349:43:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2179, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16410:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2181, - "indexExpression": { - "argumentTypes": null, - "id": 2180, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16424:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16410:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2182, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "16410:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - }, - "id": 2184, - "indexExpression": { - "argumentTypes": null, - "id": 2183, - "name": "workerIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "16445:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "16410:47:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2185, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "16460:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2189, - "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2186, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "16468:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2188, - "indexExpression": { - "argumentTypes": null, - "id": 2187, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16484:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16468:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16460:28:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2190, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balance", - "nodeType": "MemberAccess", - "referencedDeclaration": 936, - "src": "16460:36:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16410:86:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2192, - "nodeType": "ExpressionStatement", - "src": "16410:86:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2193, - "name": "workerIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "16515:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 2196, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16545:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 2194, - "name": "workerIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2132, - "src": "16529:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2195, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "16529:15:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2197, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16529:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16515:32:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2199, - "nodeType": "ExpressionStatement", - "src": "16515:32:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2139, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16074:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2140, - "name": "workerAddresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 968, - "src": "16079:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 2141, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16079:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16074:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2203, - "initializationExpression": { - "assignments": [ - 2136 - ], - "declarations": [ - { - "constant": false, - "id": 2136, - "name": "wi", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "16061:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2135, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16061:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2138, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2137, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16071:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "16061:11:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2144, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "16103:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2143, - "name": "wi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2136, - "src": "16103:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2145, - "nodeType": "ExpressionStatement", - "src": "16103:4:2" - }, - "nodeType": "ForStatement", - "src": "16056:516:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2205, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2051, - "src": "16607:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2206, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3438, - "src": "16613:5:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16613:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2208, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16627:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2210, - "indexExpression": { - "argumentTypes": null, - "id": 2209, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16641:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16627:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2211, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "16627:33:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2212, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16662:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2214, - "indexExpression": { - "argumentTypes": null, - "id": 2213, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "16676:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16662:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2215, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "16662:34:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage", - "typeString": "uint256[] storage ref" - } - ], - "id": 2204, - "name": "WorkersParameterized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1013, - "src": "16586:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", - "typeString": "function (uint256,uint256,address[] memory,uint256[] memory)" - } - }, - "id": 2216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16586:111:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2217, - "nodeType": "EmitStatement", - "src": "16581:116:2" - } - ] - }, - "documentation": "Reparameterizing workers with a new seed\nThis should be called for each epoch by the Principal node\n * @param seed The random integer generated by the enclave\n@param sig The random integer signed by the the principal node's enclave", - "id": 2219, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2056, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "14783:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2057, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "14783:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 2058, - "modifierName": { - "argumentTypes": null, - "id": 2055, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "14766:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "14766:28:2" - } - ], - "name": "setWorkersParams", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2054, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2051, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "14729:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2050, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "14729:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2053, - "name": "sig", - "nodeType": "VariableDeclaration", - "scope": 2219, - "src": "14740:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2052, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "14740:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "14728:22:2" - }, - "payable": false, - "returnParameters": { - "id": 2059, - "nodeType": "ParameterList", - "parameters": [], - "src": "14799:0:2" - }, - "scope": 2657, - "src": "14703:2001:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2288, - "nodeType": "Block", - "src": "16803:493:2", - "statements": [ - { - "assignments": [ - 2227 - ], - "declarations": [ - { - "constant": false, - "id": 2227, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 2289, - "src": "16872:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": { - "id": 2226, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "16872:4:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2230, - "initialValue": { - "argumentTypes": null, - "id": 2229, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "16885:3:2", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2228, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16887:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_-1_by_1", - "typeString": "int_const -1" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16872:16:2" - }, - { - "body": { - "id": 2274, - "nodeType": "Block", - "src": "16946:227:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 2265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2242, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16964:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2244, - "indexExpression": { - "argumentTypes": null, - "id": 2243, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "16978:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16964:16:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2245, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "16964:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 2246, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2221, - "src": "17001:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16964:48:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 2263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 2251, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2248, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17017:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2250, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "17026:3:2", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2249, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17028:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_-1_by_1", - "typeString": "int_const -1" - } - }, - "src": "17017:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2252, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "17033:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2254, - "indexExpression": { - "argumentTypes": null, - "id": 2253, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "17047:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17033:16:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2255, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "17033:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2256, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "17069:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2260, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2258, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17088:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - ], - "id": 2257, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "17083:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 2259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17083:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17069:26:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "id": 2261, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "17069:43:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17033:79:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "17017:95:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 2264, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "17016:97:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "16964:149:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2273, - "nodeType": "IfStatement", - "src": "16960:203:2", - "trueBody": { - "id": 2272, - "nodeType": "Block", - "src": "17115:48:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2266, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17133:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2268, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "17146:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "17141:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_int8_$", - "typeString": "type(int8)" - }, - "typeName": "int8" - }, - "id": 2269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17141:7:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "17133:15:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "id": 2271, - "nodeType": "ExpressionStatement", - "src": "17133:15:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2235, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "16915:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2236, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "16919:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16919:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "16915:24:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2275, - "initializationExpression": { - "assignments": [ - 2232 - ], - "declarations": [ - { - "constant": false, - "id": 2232, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 2289, - "src": "16903:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2231, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16903:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2234, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2233, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "16912:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "16903:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "16941:3:2", - "subExpression": { - "argumentTypes": null, - "id": 2239, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2232, - "src": "16941:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2241, - "nodeType": "ExpressionStatement", - "src": "16941:3:2" - }, - "nodeType": "ForStatement", - "src": "16898:275:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 2280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2277, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17190:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 2279, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "17199:3:2", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2278, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17201:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_-1_by_1", - "typeString": "int_const -1" - } - }, - "src": "17190:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f20776f726b65727320706172616d657465727320656e74727920666f722073706563696669656420626c6f636b206e756d626572", - "id": 2281, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17204:56:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e9fab335fbd58bdc8f1aa0d5f38123bc711e5112f8f3f95c75615d3d06674c6d", - "typeString": "literal_string \"No workers parameters entry for specified block number\"" - }, - "value": "No workers parameters entry for specified block number" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e9fab335fbd58bdc8f1aa0d5f38123bc711e5112f8f3f95c75615d3d06674c6d", - "typeString": "literal_string \"No workers parameters entry for specified block number\"" - } - ], - "id": 2276, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "17182:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17182:79:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2283, - "nodeType": "ExpressionStatement", - "src": "17182:79:2" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2285, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2227, - "src": "17283:5:2", - "typeDescriptions": { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - ], - "id": 2284, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "17278:4:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 2286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17278:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2225, - "id": 2287, - "nodeType": "Return", - "src": "17271:18:2" - } - ] - }, - "documentation": null, - "id": 2289, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getWorkerParamsIndex", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2222, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2221, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 2289, - "src": "16740:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2220, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16740:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16739:18:2" - }, - "payable": false, - "returnParameters": { - "id": 2225, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2224, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2289, - "src": "16793:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2223, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "16793:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "16792:6:2" - }, - "scope": 2657, - "src": "16710:586:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2326, - "nodeType": "Block", - "src": "17409:211:2", - "statements": [ - { - "assignments": [ - 2305 - ], - "declarations": [ - { - "constant": false, - "id": 2305, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17419:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2304, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17419:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2309, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2307, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2291, - "src": "17453:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2306, - "name": "getWorkerParamsIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2289, - "src": "17432:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 2308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17432:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17419:46:2" - }, - { - "assignments": [ - 2311 - ], - "declarations": [ - { - "constant": false, - "id": 2311, - "name": "params", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17475:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams" - }, - "typeName": { - "contractScope": null, - "id": 2310, - "name": "WorkersParams", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 948, - "src": "17475:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage_ptr", - "typeString": "struct Enigma.WorkersParams" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2315, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2312, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "17505:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2314, - "indexExpression": { - "argumentTypes": null, - "id": 2313, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2305, - "src": "17519:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17505:20:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17475:50:2" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2316, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "17543:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2317, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "firstBlockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 939, - "src": "17543:23:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2318, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "17568:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2319, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "seed", - "nodeType": "MemberAccess", - "referencedDeclaration": 947, - "src": "17568:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2320, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "17581:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2321, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "17581:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2322, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2311, - "src": "17597:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2323, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "17597:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - } - ], - "id": 2324, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "17542:71:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_array$_t_address_$dyn_memory_$_t_array$_t_uint256_$dyn_memory_$", - "typeString": "tuple(uint256,uint256,address[] memory,uint256[] memory)" - } - }, - "functionReturnParameters": 2303, - "id": 2325, - "nodeType": "Return", - "src": "17535:78:2" - } - ] - }, - "documentation": null, - "id": 2327, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getWorkerParams", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2292, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2291, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17327:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2290, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17327:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17326:18:2" - }, - "payable": false, - "returnParameters": { - "id": 2303, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2294, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17378:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2293, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17378:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2296, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17384:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2295, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17384:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2299, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17390:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2297, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17390:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2298, - "length": null, - "nodeType": "ArrayTypeName", - "src": "17390:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2302, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2327, - "src": "17401:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 2300, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17401:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2301, - "length": null, - "nodeType": "ArrayTypeName", - "src": "17401:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17377:31:2" - }, - "scope": 2657, - "src": "17302:318:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2446, - "nodeType": "Block", - "src": "17716:728:2", - "statements": [ - { - "assignments": [ - 2336 - ], - "declarations": [ - { - "constant": false, - "id": 2336, - "name": "params", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17726:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams" - }, - "typeName": { - "contractScope": null, - "id": 2335, - "name": "WorkersParams", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 948, - "src": "17726:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage_ptr", - "typeString": "struct Enigma.WorkersParams" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2340, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2337, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "17756:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2339, - "indexExpression": { - "argumentTypes": null, - "id": 2338, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2329, - "src": "17770:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17756:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "17726:55:2" - }, - { - "assignments": [ - 2342 - ], - "declarations": [ - { - "constant": false, - "id": 2342, - "name": "tokenCpt", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17791:13:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2341, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17791:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2344, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2343, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17807:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "17791:17:2" - }, - { - "body": { - "id": 2375, - "nodeType": "Block", - "src": "17867:130:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2357, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "17885:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2358, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "17885:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2360, - "indexExpression": { - "argumentTypes": null, - "id": 2359, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "17900:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17885:17:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2361, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17906:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "17885:24:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2374, - "nodeType": "IfStatement", - "src": "17881:106:2", - "trueBody": { - "id": 2373, - "nodeType": "Block", - "src": "17911:76:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2371, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2363, - "name": "tokenCpt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2342, - "src": "17929:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2366, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "17953:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2367, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "17953:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - }, - "id": 2369, - "indexExpression": { - "argumentTypes": null, - "id": 2368, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "17969:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17953:18:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2364, - "name": "tokenCpt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2342, - "src": "17940:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "17940:12:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17940:32:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17929:43:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2372, - "nodeType": "ExpressionStatement", - "src": "17929:43:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2349, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "17835:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2350, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "17839:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2351, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "17839:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2352, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17839:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "17835:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2376, - "initializationExpression": { - "assignments": [ - 2346 - ], - "declarations": [ - { - "constant": false, - "id": 2346, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17823:6:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2345, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17823:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2348, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2347, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "17832:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "17823:10:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "17862:3:2", - "subExpression": { - "argumentTypes": null, - "id": 2354, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2346, - "src": "17862:1:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2356, - "nodeType": "ExpressionStatement", - "src": "17862:3:2" - }, - "nodeType": "ForStatement", - "src": "17818:179:2" - }, - { - "assignments": [ - 2380 - ], - "declarations": [ - { - "constant": false, - "id": 2380, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "18006:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2378, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18006:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2379, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18006:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2386, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2384, - "name": "tokenCpt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2342, - "src": "18046:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2383, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "18032:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 2381, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18036:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2382, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18036:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 2385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18032:23:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18006:49:2" - }, - { - "assignments": [ - 2388 - ], - "declarations": [ - { - "constant": false, - "id": 2388, - "name": "tokenIndex", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "18065:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2387, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18065:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2390, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2389, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18083:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18065:19:2" - }, - { - "body": { - "id": 2442, - "nodeType": "Block", - "src": "18146:269:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2408, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2403, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "18164:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2404, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "18164:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2406, - "indexExpression": { - "argumentTypes": null, - "id": 2405, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18179:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18164:18:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2407, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18186:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "18164:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2441, - "nodeType": "IfStatement", - "src": "18160:245:2", - "trueBody": { - "id": 2440, - "nodeType": "Block", - "src": "18191:214:2", - "statements": [ - { - "body": { - "id": 2438, - "nodeType": "Block", - "src": "18259:132:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2429, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2422, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2380, - "src": "18281:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2424, - "indexExpression": { - "argumentTypes": null, - "id": 2423, - "name": "tokenIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2388, - "src": "18288:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "18281:18:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2425, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "18302:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2426, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "18302:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2428, - "indexExpression": { - "argumentTypes": null, - "id": 2427, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18317:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18302:18:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "18281:39:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2430, - "nodeType": "ExpressionStatement", - "src": "18281:39:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2436, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2431, - "name": "tokenIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2388, - "src": "18342:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 2434, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18370:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 2432, - "name": "tokenIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2388, - "src": "18355:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2433, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "18355:14:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2435, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18355:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18342:30:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2437, - "nodeType": "ExpressionStatement", - "src": "18342:30:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2413, - "name": "ib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2410, - "src": "18227:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2414, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "18232:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2415, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "balances", - "nodeType": "MemberAccess", - "referencedDeclaration": 945, - "src": "18232:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - }, - "id": 2417, - "indexExpression": { - "argumentTypes": null, - "id": 2416, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18248:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18232:19:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18227:24:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2439, - "initializationExpression": { - "assignments": [ - 2410 - ], - "declarations": [ - { - "constant": false, - "id": 2410, - "name": "ib", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "18214:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2409, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18214:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2412, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2411, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18224:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18214:11:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18253:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2419, - "name": "ib", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2410, - "src": "18253:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2421, - "nodeType": "ExpressionStatement", - "src": "18253:4:2" - }, - "nodeType": "ForStatement", - "src": "18209:182:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2395, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18112:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2396, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2336, - "src": "18117:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2397, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "workers", - "nodeType": "MemberAccess", - "referencedDeclaration": 942, - "src": "18117:14:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "id": 2398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18117:21:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18112:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2443, - "initializationExpression": { - "assignments": [ - 2392 - ], - "declarations": [ - { - "constant": false, - "id": 2392, - "name": "ia", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "18099:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2391, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18099:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2394, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2393, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "18109:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18099:11:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18140:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2400, - "name": "ia", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2392, - "src": "18140:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2402, - "nodeType": "ExpressionStatement", - "src": "18140:4:2" - }, - "nodeType": "ForStatement", - "src": "18094:321:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 2444, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2380, - "src": "18431:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 2334, - "id": 2445, - "nodeType": "Return", - "src": "18424:13:2" - } - ] - }, - "documentation": null, - "id": 2447, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "compileTokens", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2330, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2329, - "name": "paramIndex", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17649:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2328, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "17649:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17648:17:2" - }, - "payable": false, - "returnParameters": { - "id": 2334, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2333, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2447, - "src": "17701:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2331, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "17701:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2332, - "length": null, - "nodeType": "ArrayTypeName", - "src": "17701:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "17700:11:2" - }, - "scope": 2657, - "src": "17626:818:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2582, - "nodeType": "Block", - "src": "18532:1194:2", - "statements": [ - { - "assignments": [ - 2455 - ], - "declarations": [ - { - "constant": false, - "id": 2455, - "name": "paramIndex", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18641:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2454, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18641:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2459, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2457, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2449, - "src": "18680:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2456, - "name": "getWorkerParamsIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2289, - "src": "18659:20:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 2458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18659:33:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18641:51:2" - }, - { - "assignments": [ - 2463 - ], - "declarations": [ - { - "constant": false, - "id": 2463, - "name": "tokens", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18702:23:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2461, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18702:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2462, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18702:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2467, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2465, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2455, - "src": "18742:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2464, - "name": "compileTokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2447, - "src": "18728:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) view returns (address[] memory)" - } - }, - "id": 2466, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18728:25:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18702:51:2" - }, - { - "assignments": [ - 2469 - ], - "declarations": [ - { - "constant": false, - "id": 2469, - "name": "params", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18763:27:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams" - }, - "typeName": { - "contractScope": null, - "id": 2468, - "name": "WorkersParams", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 948, - "src": "18763:13:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage_ptr", - "typeString": "struct Enigma.WorkersParams" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2473, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2470, - "name": "workersParams", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 965, - "src": "18793:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_WorkersParams_$948_storage_$5_storage", - "typeString": "struct Enigma.WorkersParams storage ref[5] storage ref" - } - }, - "id": 2472, - "indexExpression": { - "argumentTypes": null, - "id": 2471, - "name": "paramIndex", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2455, - "src": "18807:10:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18793:25:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_storage", - "typeString": "struct Enigma.WorkersParams storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18763:55:2" - }, - { - "assignments": [ - 2477 - ], - "declarations": [ - { - "constant": false, - "id": 2477, - "name": "selectedWorkers", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18829:32:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2475, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18829:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2476, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18829:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2483, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2481, - "name": "workerGroupSize", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 987, - "src": "18878:15:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2480, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "18864:13:2", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 2478, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18868:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2479, - "length": null, - "nodeType": "ArrayTypeName", - "src": "18868:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 2482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18864:30:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "18829:65:2" - }, - { - "body": { - "id": 2580, - "nodeType": "Block", - "src": "18953:767:2", - "statements": [ - { - "body": { - "id": 2573, - "nodeType": "Block", - "src": "18970:692:2", - "statements": [ - { - "assignments": [ - 2495 - ], - "declarations": [ - { - "constant": false, - "id": 2495, - "name": "nonce", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18988:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2494, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18988:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2497, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2496, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19001:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "18988:14:2" - }, - { - "assignments": [ - 2499 - ], - "declarations": [ - { - "constant": false, - "id": 2499, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19020:12:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2498, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "19020:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2510, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2503, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2495, - "src": "19062:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2504, - "name": "params", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2469, - "src": "19069:6:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_WorkersParams_$948_memory_ptr", - "typeString": "struct Enigma.WorkersParams memory" - } - }, - "id": 2505, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "seed", - "nodeType": "MemberAccess", - "referencedDeclaration": 947, - "src": "19069:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2506, - "name": "blockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2449, - "src": "19082:11:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2507, - "name": "scAddr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2451, - "src": "19095:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2501, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3435, - "src": "19045:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2502, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19045:16:2", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2508, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19045:57:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2500, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3442, - "src": "19035:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", - "typeString": "function () pure returns (bytes32)" - } - }, - "id": 2509, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19035:68:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19020:83:2" - }, - { - "assignments": [ - 2512 - ], - "declarations": [ - { - "constant": false, - "id": 2512, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19121:10:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2511, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19121:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2519, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2518, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2514, - "name": "hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2499, - "src": "19142:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 2513, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "19134:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint256" - }, - "id": 2515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19134:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2516, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2463, - "src": "19150:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19150:13:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19134:29:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19121:42:2" - }, - { - "assignments": [ - 2521 - ], - "declarations": [ - { - "constant": false, - "id": 2521, - "name": "worker", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19181:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2520, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19181:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2525, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2522, - "name": "tokens", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2463, - "src": "19198:6:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2524, - "indexExpression": { - "argumentTypes": null, - "id": 2523, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2512, - "src": "19205:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19198:13:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "19181:30:2" - }, - { - "assignments": [ - 2527 - ], - "declarations": [ - { - "constant": false, - "id": 2527, - "name": "dup", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19229:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2526, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "19229:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2529, - "initialValue": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 2528, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19240:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "nodeType": "VariableDeclarationStatement", - "src": "19229:16:2" - }, - { - "body": { - "id": 2552, - "nodeType": "Block", - "src": "19312:165:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2544, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2540, - "name": "worker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2521, - "src": "19338:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2541, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "19348:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2543, - "indexExpression": { - "argumentTypes": null, - "id": 2542, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2531, - "src": "19364:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19348:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "19338:29:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2551, - "nodeType": "IfStatement", - "src": "19334:125:2", - "trueBody": { - "id": 2550, - "nodeType": "Block", - "src": "19369:90:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2547, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2545, - "name": "dup", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2527, - "src": "19395:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2546, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19401:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "19395:10:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2548, - "nodeType": "ExpressionStatement", - "src": "19395:10:2" - }, - { - "id": 2549, - "nodeType": "Break", - "src": "19431:5:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2533, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2531, - "src": "19277:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2534, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "19282:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19282:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19277:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2553, - "initializationExpression": { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2531, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "19268:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2530, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19268:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2532, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "19268:7:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2538, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "19306:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2537, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2531, - "src": "19306:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2539, - "nodeType": "ExpressionStatement", - "src": "19306:4:2" - }, - "nodeType": "ForStatement", - "src": "19263:214:2" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 2556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2554, - "name": "dup", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2527, - "src": "19498:3:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 2555, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19505:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "19498:12:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 2571, - "nodeType": "Block", - "src": "19587:61:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2564, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2495, - "src": "19609:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "31", - "id": 2567, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19627:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 2565, - "name": "nonce", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2495, - "src": "19617:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "19617:9:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19617:12:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19609:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2570, - "nodeType": "ExpressionStatement", - "src": "19609:20:2" - } - ] - }, - "id": 2572, - "nodeType": "IfStatement", - "src": "19494:154:2", - "trueBody": { - "id": 2563, - "nodeType": "Block", - "src": "19512:69:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2561, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2557, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "19534:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2559, - "indexExpression": { - "argumentTypes": null, - "id": 2558, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "19550:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "19534:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2560, - "name": "worker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2521, - "src": "19556:6:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "19534:28:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2562, - "nodeType": "ExpressionStatement", - "src": "19534:28:2" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2578, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2574, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "19682:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2576, - "indexExpression": { - "argumentTypes": null, - "id": 2575, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "19698:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19682:19:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2577, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19705:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "19682:26:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2579, - "nodeType": "DoWhileStatement", - "src": "18967:743:2" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2487, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "18918:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2488, - "name": "selectedWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2477, - "src": "18923:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 2489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18923:22:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18918:27:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 2581, - "initializationExpression": { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2485, - "name": "it", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18909:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2484, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18909:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2486, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "18909:7:2" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 2492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "18947:4:2", - "subExpression": { - "argumentTypes": null, - "id": 2491, - "name": "it", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2485, - "src": "18947:2:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2493, - "nodeType": "ExpressionStatement", - "src": "18947:4:2" - }, - "nodeType": "ForStatement", - "src": "18904:816:2" - } - ] - }, - "documentation": null, - "id": 2583, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getWorkerGroup", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2452, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2449, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18474:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2448, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "18474:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2451, - "name": "scAddr", - "nodeType": "VariableDeclaration", - "scope": 2583, - "src": "18492:14:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2450, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "18492:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "18473:34:2" - }, - "payable": false, - "returnParameters": { - "id": 2453, - "nodeType": "ParameterList", - "parameters": [], - "src": "18532:0:2" - }, - "scope": 2657, - "src": "18450:1276:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2622, - "nodeType": "Block", - "src": "19992:261:2", - "statements": [ - { - "assignments": [ - 2599 - ], - "declarations": [ - { - "constant": false, - "id": 2599, - "name": "firstBlockNumber", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "20043:21:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2598, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "20043:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2601, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2600, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20067:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "20043:25:2" - }, - { - "assignments": [ - 2603 - ], - "declarations": [ - { - "constant": false, - "id": 2603, - "name": "seed", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "20078:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2602, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "20078:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2605, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 2604, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20090:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "20078:13:2" - }, - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2609, - "name": "activeWorkers", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "20101:30:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2607, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20101:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2608, - "length": null, - "nodeType": "ArrayTypeName", - "src": "20101:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2610, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "20101:30:2" - }, - { - "assignments": [], - "declarations": [ - { - "constant": false, - "id": 2614, - "name": "activeContracts", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "20141:32:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2612, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20141:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2613, - "length": null, - "nodeType": "ArrayTypeName", - "src": "20141:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2615, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "20141:32:2" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 2616, - "name": "firstBlockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2599, - "src": "20191:16:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2617, - "name": "seed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2603, - "src": "20209:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2618, - "name": "activeWorkers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2609, - "src": "20215:13:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 2619, - "name": "activeContracts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2614, - "src": "20230:15:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - } - ], - "id": 2620, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20190:56:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "tuple(uint256,uint256,address[] memory,address[] memory)" - } - }, - "functionReturnParameters": 2597, - "id": 2621, - "nodeType": "Return", - "src": "20183:63:2" - } - ] - }, - "documentation": "The worker parameters corresponding to the specified block number\n * @param blockNumber The reference block number", - "id": 2623, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getWorkersParams", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2586, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2585, - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19903:16:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2584, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19903:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19902:18:2" - }, - "payable": false, - "returnParameters": { - "id": 2597, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2588, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19954:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2587, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19954:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2590, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19960:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2589, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "19960:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2593, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19966:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2591, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19966:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2592, - "length": null, - "nodeType": "ArrayTypeName", - "src": "19966:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2596, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2623, - "src": "19977:9:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2594, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "19977:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2595, - "length": null, - "nodeType": "ArrayTypeName", - "src": "19977:9:2", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "19953:34:2" - }, - "scope": 2657, - "src": "19877:376:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2655, - "nodeType": "Block", - "src": "20513:234:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2641, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2636, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "20611:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2638, - "indexExpression": { - "argumentTypes": null, - "id": 2637, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20619:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20611:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2639, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "20611:25:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 2640, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20640:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "20611:32:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "576f726b6572206e6f742072656769737465726564", - "id": 2642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20645:23:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ad68aef7a0c9f95c0e940996fbd009b216d0a6ca729c2f480732643f59319eb1", - "typeString": "literal_string \"Worker not registered\"" - }, - "value": "Worker not registered" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ad68aef7a0c9f95c0e940996fbd009b216d0a6ca729c2f480732643f59319eb1", - "typeString": "literal_string \"Worker not registered\"" - } - ], - "id": 2635, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3452, - "src": "20603:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20603:66:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2644, - "nodeType": "ExpressionStatement", - "src": "20603:66:2" - }, - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2645, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "20687:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2647, - "indexExpression": { - "argumentTypes": null, - "id": 2646, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20695:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20687:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2648, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "signer", - "nodeType": "MemberAccess", - "referencedDeclaration": 930, - "src": "20687:25:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2649, - "name": "workers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "20714:7:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Worker_$937_storage_$", - "typeString": "mapping(address => struct Enigma.Worker storage ref)" - } - }, - "id": 2651, - "indexExpression": { - "argumentTypes": null, - "id": 2650, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20722:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20714:18:2", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Worker_$937_storage", - "typeString": "struct Enigma.Worker storage ref" - } - }, - "id": 2652, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "report", - "nodeType": "MemberAccess", - "referencedDeclaration": 934, - "src": "20714:25:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - } - ], - "id": 2653, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "20686:54:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_address_$_t_bytes_storage_$", - "typeString": "tuple(address,bytes storage ref)" - } - }, - "functionReturnParameters": 2634, - "id": 2654, - "nodeType": "Return", - "src": "20679:61:2" - } - ] - }, - "documentation": "The RLP encoded report returned by the IAS server\n * @param custodian The worker's custodian address", - "id": 2656, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 2628, - "name": "custodian", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20469:9:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "id": 2629, - "modifierName": { - "argumentTypes": null, - "id": 2627, - "name": "workerRegistered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1128, - "src": "20452:16:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_address_$", - "typeString": "modifier (address)" - } - }, - "nodeType": "ModifierInvocation", - "src": "20452:27:2" - } - ], - "name": "getReport", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2626, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2625, - "name": "custodian", - "nodeType": "VariableDeclaration", - "scope": 2656, - "src": "20409:17:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2624, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20409:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20408:19:2" - }, - "payable": false, - "returnParameters": { - "id": 2634, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2631, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2656, - "src": "20493:7:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2630, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "20493:7:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2633, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2656, - "src": "20502:5:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2632, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "20502:5:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "20492:16:2" - }, - "scope": 2657, - "src": "20390:357:2", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 2658, - "src": "808:19941:2" - } - ], - "src": "0:20750:2" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": { - "4447": { - "events": {}, - "links": {}, - "address": "0x345cA3e014Aaf5dcA488057592ee47305D9B3e10", - "transactionHash": "0x397fe343d89116b72bbb6b5b1395550686426de92d0e9e1957433fd679d911c5" - } - }, - "schemaVersion": "2.0.0", - "updatedAt": "2018-10-14T09:15:28.163Z" -} \ No newline at end of file diff --git a/test/ethereum/scripts/includes/build/EnigmaToken.json b/test/ethereum/scripts/includes/build/EnigmaToken.json deleted file mode 100644 index ec8458ef..00000000 --- a/test/ethereum/scripts/includes/build/EnigmaToken.json +++ /dev/null @@ -1,3344 +0,0 @@ -{ - "contractName": "EnigmaToken", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x06fdde03" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x18160ddd" - }, - { - "constant": true, - "inputs": [], - "name": "INITIAL_SUPPLY", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x2ff2e9dc" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x313ce567" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseApproval", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x66188463" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x70a08231" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x95d89b41" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_addedValue", - "type": "uint256" - } - ], - "name": "increaseApproval", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xd73dd623" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor", - "signature": "constructor" - }, - { - "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", - "signature": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" - }, - { - "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", - "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xa9059cbb" - }, - { - "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", - "signature": "0x23b872dd" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x095ea7b3" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xdd62ed3e" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b5066354a6ba7a18000600381905533600081815260208181526040808320859055805194855251929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3610877806100746000396000f3006080604052600436106100b95763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100be578063095ea7b31461014857806318160ddd1461018057806323b872dd146101a75780632ff2e9dc146101d1578063313ce567146101e6578063661884631461021157806370a082311461023557806395d89b4114610256578063a9059cbb1461026b578063d73dd6231461028f578063dd62ed3e146102b3575b600080fd5b3480156100ca57600080fd5b506100d36102da565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561010d5781810151838201526020016100f5565b50505050905090810190601f16801561013a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015457600080fd5b5061016c600160a060020a0360043516602435610311565b604080519115158252519081900360200190f35b34801561018c57600080fd5b50610195610324565b60408051918252519081900360200190f35b3480156101b357600080fd5b5061016c600160a060020a036004358116906024351660443561032a565b3480156101dd57600080fd5b5061019561033f565b3480156101f257600080fd5b506101fb61034a565b6040805160ff9092168252519081900360200190f35b34801561021d57600080fd5b5061016c600160a060020a036004351660243561034f565b34801561024157600080fd5b50610195600160a060020a036004351661043e565b34801561026257600080fd5b506100d3610459565b34801561027757600080fd5b5061016c600160a060020a0360043516602435610490565b34801561029b57600080fd5b5061016c600160a060020a036004351660243561049c565b3480156102bf57600080fd5b50610195600160a060020a0360043581169060243516610535565b60408051808201909152600681527f456e69676d610000000000000000000000000000000000000000000000000000602082015281565b600061031d8383610541565b9392505050565b60035481565b60006103378484846105a7565b949350505050565b66354a6ba7a1800081565b600881565b336000908152600260209081526040808320600160a060020a03861684529091528120548083106103a357336000908152600260209081526040808320600160a060020a03881684529091528120556103d8565b6103b3818463ffffffff61071c16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60408051808201909152600381527f454e470000000000000000000000000000000000000000000000000000000000602082015281565b600061031d838361072e565b336000908152600260209081526040808320600160a060020a03861684529091528120546104d0908363ffffffff61080d16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600061031d8383610820565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600160a060020a0383166000908152602081905260408120548211156105cc57600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156105fc57600080fd5b600160a060020a038316151561061157600080fd5b600160a060020a03841660009081526020819052604090205461063a908363ffffffff61071c16565b600160a060020a03808616600090815260208190526040808220939093559085168152205461066f908363ffffffff61080d16565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546106b1908363ffffffff61071c16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60008282111561072857fe5b50900390565b3360009081526020819052604081205482111561074a57600080fd5b600160a060020a038316151561075f57600080fd5b3360009081526020819052604090205461077f908363ffffffff61071c16565b3360009081526020819052604080822092909255600160a060020a038516815220546107b1908363ffffffff61080d16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b8181018281101561081a57fe5b92915050565b600160a060020a039182166000908152600260209081526040808320939094168252919091522054905600a165627a7a7230582098ac55f95251501c0af8e94d7eb32d762e157f59e2ce64deac91443dd3a134420029", - "deployedBytecode": "0x6080604052600436106100b95763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100be578063095ea7b31461014857806318160ddd1461018057806323b872dd146101a75780632ff2e9dc146101d1578063313ce567146101e6578063661884631461021157806370a082311461023557806395d89b4114610256578063a9059cbb1461026b578063d73dd6231461028f578063dd62ed3e146102b3575b600080fd5b3480156100ca57600080fd5b506100d36102da565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561010d5781810151838201526020016100f5565b50505050905090810190601f16801561013a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015457600080fd5b5061016c600160a060020a0360043516602435610311565b604080519115158252519081900360200190f35b34801561018c57600080fd5b50610195610324565b60408051918252519081900360200190f35b3480156101b357600080fd5b5061016c600160a060020a036004358116906024351660443561032a565b3480156101dd57600080fd5b5061019561033f565b3480156101f257600080fd5b506101fb61034a565b6040805160ff9092168252519081900360200190f35b34801561021d57600080fd5b5061016c600160a060020a036004351660243561034f565b34801561024157600080fd5b50610195600160a060020a036004351661043e565b34801561026257600080fd5b506100d3610459565b34801561027757600080fd5b5061016c600160a060020a0360043516602435610490565b34801561029b57600080fd5b5061016c600160a060020a036004351660243561049c565b3480156102bf57600080fd5b50610195600160a060020a0360043581169060243516610535565b60408051808201909152600681527f456e69676d610000000000000000000000000000000000000000000000000000602082015281565b600061031d8383610541565b9392505050565b60035481565b60006103378484846105a7565b949350505050565b66354a6ba7a1800081565b600881565b336000908152600260209081526040808320600160a060020a03861684529091528120548083106103a357336000908152600260209081526040808320600160a060020a03881684529091528120556103d8565b6103b3818463ffffffff61071c16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60408051808201909152600381527f454e470000000000000000000000000000000000000000000000000000000000602082015281565b600061031d838361072e565b336000908152600260209081526040808320600160a060020a03861684529091528120546104d0908363ffffffff61080d16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600061031d8383610820565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600160a060020a0383166000908152602081905260408120548211156105cc57600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156105fc57600080fd5b600160a060020a038316151561061157600080fd5b600160a060020a03841660009081526020819052604090205461063a908363ffffffff61071c16565b600160a060020a03808616600090815260208190526040808220939093559085168152205461066f908363ffffffff61080d16565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546106b1908363ffffffff61071c16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60008282111561072857fe5b50900390565b3360009081526020819052604081205482111561074a57600080fd5b600160a060020a038316151561075f57600080fd5b3360009081526020819052604090205461077f908363ffffffff61071c16565b3360009081526020819052604080822092909255600160a060020a038516815220546107b1908363ffffffff61080d16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b8181018281101561081a57fe5b92915050565b600160a060020a039182166000908152600260209081526040808320939094168252919091522054905600a165627a7a7230582098ac55f95251501c0af8e94d7eb32d762e157f59e2ce64deac91443dd3a134420029", - "sourceMap": "597:2195:3:-;;;1229:279;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1038:17:3;1260:11;:28;;;1361:10;1352:8;:20;;;;;;;;;;;:37;;;1460:41;;;;;;1361:10;;1352:8;;1460:41;;;;;;;;;;597:2195;;;;;;", - "deployedSourceMap": "597:2195:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;642:38;;8:9:-1;5:2;;;30:1;27;20:12;5:2;642:38:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;642:38:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2516:128;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2516:128:3;-1:-1:-1;;;;;2516:128:3;;;;;;;;;;;;;;;;;;;;;;;;;1101:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1101:26:3;;;;;;;;;;;;;;;;;;;;2110:150;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2110:150:3;-1:-1:-1;;;;;2110:150:3;;;;;;;;;;;;997:58;;8:9:-1;5:2;;;30:1;27;20:12;5:2;997:58:3;;;;874:34;;8:9:-1;5:2;;;30:1;27;20:12;5:2;874:34:3;;;;;;;;;;;;;;;;;;;;;;;3679:432:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3679:432:11;-1:-1:-1;;;;;3679:432:11;;;;;;;1149:99:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1149:99:8;-1:-1:-1;;;;;1149:99:8;;;;;757:37:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;757:37:3;;;;1690:120;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1690:120:3;-1:-1:-1;;;;;1690:120:3;;;;;;;2926:296:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2926:296:11;-1:-1:-1;;;;;2926:296:11;;;;;;;2650:139:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2650:139:3;-1:-1:-1;;;;;2650:139:3;;;;;;;;;;642:38;;;;;;;;;;;;;;;;;;;:::o;2516:128::-;2583:4;2606:31;2620:8;2630:6;2606:13;:31::i;:::-;2599:38;2516:128;-1:-1:-1;;;2516:128:3:o;1101:26::-;;;;:::o;2110:150::-;2192:4;2215:38;2234:5;2241:3;2246:6;2215:18;:38::i;:::-;2208:45;2110:150;-1:-1:-1;;;;2110:150:3:o;997:58::-;1038:17;997:58;:::o;874:34::-;907:1;874:34;:::o;3679:432:11:-;3826:10;3785:4;3818:19;;;:7;:19;;;;;;;;-1:-1:-1;;;;;3818:29:11;;;;;;;;;;3857:28;;;3853:165;;3903:10;3927:1;3895:19;;;:7;:19;;;;;;;;-1:-1:-1;;;;;3895:29:11;;;;;;;;;:33;3853:165;;;3981:30;:8;3994:16;3981:30;:12;:30;:::i;:::-;3957:10;3949:19;;;;:7;:19;;;;;;;;-1:-1:-1;;;;;3949:29:11;;;;;;;;;:62;3853:165;4037:10;4059:19;;;;:7;:19;;;;;;;;-1:-1:-1;;;;;4028:61:11;;4059:29;;;;;;;;;;;4028:61;;;;;;;;;4037:10;4028:61;;;;;;;;;;;-1:-1:-1;4102:4:11;;3679:432;-1:-1:-1;;;3679:432:11:o;1149:99:8:-;-1:-1:-1;;;;;1227:16:8;1205:7;1227:16;;;;;;;;;;;;1149:99::o;757:37:3:-;;;;;;;;;;;;;;;;;;;:::o;1690:120::-;1753:4;1776:27;1791:3;1796:6;1776:14;:27::i;2926:296:11:-;3089:10;3027:4;3081:19;;;:7;:19;;;;;;;;-1:-1:-1;;;;;3081:29:11;;;;;;;;;;:46;;3115:11;3081:46;:33;:46;:::i;:::-;3049:10;3041:19;;;;:7;:19;;;;;;;;-1:-1:-1;;;;;3041:29:11;;;;;;;;;;;;:87;;;3139:61;;;;;;3041:29;;3139:61;;;;;;;;;;;-1:-1:-1;3213:4:11;2926:296;;;;:::o;2650:139:3:-;2724:7;2750:32;2766:6;2773:8;2750:15;:32::i;1814:188:11:-;1901:10;1881:4;1893:19;;;:7;:19;;;;;;;;-1:-1:-1;;;;;1893:29:11;;;;;;;;;;;:38;;;1942;;;;;;;1881:4;;1893:29;;1901:10;;1942:38;;;;;;;;-1:-1:-1;1993:4:11;1814:188;;;;:::o;726:470::-;-1:-1:-1;;;;;864:15:11;;832:4;864:15;;;;;;;;;;;854:25;;;846:34;;;;;;-1:-1:-1;;;;;904:14:11;;;;;;:7;:14;;;;;;;;919:10;904:26;;;;;;;;894:36;;;886:45;;;;;;-1:-1:-1;;;;;945:17:11;;;;937:26;;;;;;-1:-1:-1;;;;;988:15:11;;:8;:15;;;;;;;;;;;:27;;1008:6;988:27;:19;:27;:::i;:::-;-1:-1:-1;;;;;970:15:11;;;:8;:15;;;;;;;;;;;:45;;;;1037:13;;;;;;;:25;;1055:6;1037:25;:17;:25;:::i;:::-;-1:-1:-1;;;;;1021:13:11;;;:8;:13;;;;;;;;;;;:41;;;;1097:14;;;;;:7;:14;;;;;1112:10;1097:26;;;;;;;:38;;1128:6;1097:38;:30;:38;:::i;:::-;-1:-1:-1;;;;;1068:14:11;;;;;;;:7;:14;;;;;;;;1083:10;1068:26;;;;;;;;:67;;;;1146:28;;;;;;;;;;;1068:14;;1146:28;;;;;;;;;;;-1:-1:-1;1187:4:11;726:470;;;;;:::o;1060:116:7:-;1120:7;1142:8;;;;1135:16;;;;-1:-1:-1;1164:7:7;;;1060:116::o;626:321:8:-;728:10;689:4;719:20;;;;;;;;;;;709:30;;;701:39;;;;;;-1:-1:-1;;;;;754:17:8;;;;746:26;;;;;;811:10;802:8;:20;;;;;;;;;;;:32;;827:6;802:32;:24;:32;:::i;:::-;788:10;779:8;:20;;;;;;;;;;;:55;;;;-1:-1:-1;;;;;856:13:8;;;;;;:25;;874:6;856:25;:17;:25;:::i;:::-;-1:-1:-1;;;;;840:13:8;;:8;:13;;;;;;;;;;;;:41;;;;892:33;;;;;;;840:13;;901:10;;892:33;;;;;;;;;;-1:-1:-1;938:4:8;626:321;;;;:::o;1238:128:7:-;1319:7;;;1339;;;;1332:15;;;;1238:128;;;;:::o;2321:153:11:-;-1:-1:-1;;;;;2444:15:11;;;2420:7;2444:15;;;:7;:15;;;;;;;;:25;;;;;;;;;;;;;2321:153::o", - "source": "pragma solidity ^0.4.24;\nimport \"openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol\";\n\n/**\n * @title Enigma Token\n * @dev ERC20 Enigma Token (ENG)\n *\n * ENG Tokens are divisible by 1e8 (100,000,000) base\n * units referred to as 'Grains'.\n *\n * ENG are displayed using 8 decimal places of precision.\n *\n * 1 ENG is equivalent to:\n * 100000000 == 1 * 10**8 == 1e8 == One Hundred Million Grains\n *\n * 150 million ENG (total supply) is equivalent to:\n * 15000000000000000 == 150000000 * 10**8 == 1e17\n *\n * All initial ENG Grains are assigned to the creator of\n * this contract.\n *\n */\ncontract EnigmaToken is StandardToken {\n\n string public constant name = \"Enigma\"; // Set the token name for display\n string public constant symbol = \"ENG\"; // Set the token symbol for display\n uint8 public constant decimals = 8; // Set the number of decimals for display\n uint256 public constant INITIAL_SUPPLY = 150000000 * 10**8; // 150 million ENG specified in Grains\n uint256 public totalSupply;\n /**\n * @dev SesnseToken Constructor\n * Runs only on initial contract creation.\n */\n constructor() public {\n totalSupply = INITIAL_SUPPLY; // Set the total supply\n balances[msg.sender] = INITIAL_SUPPLY; // Creator address is assigned all\n emit Transfer(0x0, msg.sender, INITIAL_SUPPLY);\n }\n\n /**\n * @dev Transfer token for a specified address when not paused\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n return super.transfer(_to, _value);\n }\n\n /**\n * @dev Transfer tokens from one address to another when not paused\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n return super.transferFrom(_from, _to, _value);\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender when not paused.\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n return super.approve(_spender, _value);\n }\n\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return super.allowance(_owner,_spender);\n }\n\n}", - "sourcePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/EnigmaToken.sol", - "ast": { - "absolutePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/EnigmaToken.sol", - "exportedSymbols": { - "EnigmaToken": [ - 2770 - ] - }, - "id": 2771, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2659, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:3" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol", - "file": "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol", - "id": 2660, - "nodeType": "ImportDirective", - "scope": 2771, - "sourceUnit": 3434, - "src": "25:71:3", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2661, - "name": "StandardToken", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3433, - "src": "621:13:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_StandardToken_$3433", - "typeString": "contract StandardToken" - } - }, - "id": 2662, - "nodeType": "InheritanceSpecifier", - "src": "621:13:3" - } - ], - "contractDependencies": [ - 3111, - 3154, - 3186, - 3433 - ], - "contractKind": "contract", - "documentation": "@title Enigma Token\n@dev ERC20 Enigma Token (ENG)\n * ENG Tokens are divisible by 1e8 (100,000,000) base\nunits referred to as 'Grains'.\n * ENG are displayed using 8 decimal places of precision.\n * 1 ENG is equivalent to:\n 100000000 == 1 * 10**8 == 1e8 == One Hundred Million Grains\n * 150 million ENG (total supply) is equivalent to:\n 15000000000000000 == 150000000 * 10**8 == 1e17\n * All initial ENG Grains are assigned to the creator of\nthis contract.\n ", - "fullyImplemented": true, - "id": 2770, - "linearizedBaseContracts": [ - 2770, - 3433, - 3111, - 3154, - 3186 - ], - "name": "EnigmaToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "id": 2665, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 2770, - "src": "642:38:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 2663, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "642:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "456e69676d61", - "id": 2664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "672:8:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ba83be9d4f169561f32dcb185273e3b59336406003211080ed463fe7723a7d3c", - "typeString": "literal_string \"Enigma\"" - }, - "value": "Enigma" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 2668, - "name": "symbol", - "nodeType": "VariableDeclaration", - "scope": 2770, - "src": "757:37:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 2666, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "757:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "454e47", - "id": 2667, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "789:5:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d79280fda08cc03aea482f66454ee9e69c82cdd5050db969689686719415114f", - "typeString": "literal_string \"ENG\"" - }, - "value": "ENG" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 2671, - "name": "decimals", - "nodeType": "VariableDeclaration", - "scope": 2770, - "src": "874:34:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 2669, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "874:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "38", - "id": 2670, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "907:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_8_by_1", - "typeString": "int_const 8" - }, - "value": "8" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 2678, - "name": "INITIAL_SUPPLY", - "nodeType": "VariableDeclaration", - "scope": 2770, - "src": "997:58:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2672, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "997:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_15000000000000000_by_1", - "typeString": "int_const 15000000000000000" - }, - "id": 2677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "313530303030303030", - "id": 2673, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1038:9:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_150000000_by_1", - "typeString": "int_const 150000000" - }, - "value": "150000000" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000000_by_1", - "typeString": "int_const 100000000" - }, - "id": 2676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 2674, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1050:2:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "38", - "id": 2675, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1054:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_8_by_1", - "typeString": "int_const 8" - }, - "value": "8" - }, - "src": "1050:5:3", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000000_by_1", - "typeString": "int_const 100000000" - } - }, - "src": "1038:17:3", - "typeDescriptions": { - "typeIdentifier": "t_rational_15000000000000000_by_1", - "typeString": "int_const 15000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 2680, - "name": "totalSupply", - "nodeType": "VariableDeclaration", - "scope": 2770, - "src": "1101:26:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2679, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1101:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 2701, - "nodeType": "Block", - "src": "1250:258:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2683, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2680 - ], - "referencedDeclaration": 2680, - "src": "1260:11:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2684, - "name": "INITIAL_SUPPLY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2678, - "src": "1274:14:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1260:28:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2686, - "nodeType": "ExpressionStatement", - "src": "1260:28:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 2692, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2687, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "1352:8:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2690, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2688, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "1361:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1361:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1352:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2691, - "name": "INITIAL_SUPPLY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2678, - "src": "1375:14:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1352:37:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2693, - "nodeType": "ExpressionStatement", - "src": "1352:37:3" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307830", - "id": 2695, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1469:3:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2696, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "1474:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1474:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2698, - "name": "INITIAL_SUPPLY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2678, - "src": "1486:14:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2694, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3185, - "src": "1460:8:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2699, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1460:41:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2700, - "nodeType": "EmitStatement", - "src": "1455:46:3" - } - ] - }, - "documentation": "@dev SesnseToken Constructor\nRuns only on initial contract creation.", - "id": 2702, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2681, - "nodeType": "ParameterList", - "parameters": [], - "src": "1240:2:3" - }, - "payable": false, - "returnParameters": { - "id": 2682, - "nodeType": "ParameterList", - "parameters": [], - "src": "1250:0:3" - }, - "scope": 2770, - "src": "1229:279:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2717, - "nodeType": "Block", - "src": "1759:51:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2713, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2704, - "src": "1791:3:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2714, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2706, - "src": "1796:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2711, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3482, - "src": "1776:5:3", - "typeDescriptions": { - "typeIdentifier": "t_super$_EnigmaToken_$2770", - "typeString": "contract super EnigmaToken" - } - }, - "id": 2712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 3098, - "src": "1776:14:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) returns (bool)" - } - }, - "id": 2715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1776:27:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2710, - "id": 2716, - "nodeType": "Return", - "src": "1769:34:3" - } - ] - }, - "documentation": "@dev Transfer token for a specified address when not paused\n@param _to The address to transfer to.\n@param _value The amount to be transferred.", - "id": 2718, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2707, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2704, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 2718, - "src": "1708:11:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2703, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1708:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2706, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 2718, - "src": "1721:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2705, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1721:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1707:29:3" - }, - "payable": false, - "returnParameters": { - "id": 2710, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2709, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2718, - "src": "1753:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2708, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1753:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1752:6:3" - }, - "scope": 2770, - "src": "1690:120:3", - "stateMutability": "nonpayable", - "superFunction": 3098, - "visibility": "public" - }, - { - "body": { - "id": 2736, - "nodeType": "Block", - "src": "2198:62:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2731, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2720, - "src": "2234:5:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2732, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2722, - "src": "2241:3:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2733, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2724, - "src": "2246:6:3", - "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": 2729, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3482, - "src": "2215:5:3", - "typeDescriptions": { - "typeIdentifier": "t_super$_EnigmaToken_$2770", - "typeString": "contract super EnigmaToken" - } - }, - "id": 2730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 3286, - "src": "2215:18:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) returns (bool)" - } - }, - "id": 2734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2215:38:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2728, - "id": 2735, - "nodeType": "Return", - "src": "2208:45:3" - } - ] - }, - "documentation": "@dev Transfer tokens from one address to another when not paused\n@param _from address The address which you want to send tokens from\n@param _to address The address which you want to transfer to\n@param _value uint256 the amount of tokens to be transferred", - "id": 2737, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2725, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2720, - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 2737, - "src": "2132:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2719, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2132:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2722, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 2737, - "src": "2147:11:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2721, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2147:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2724, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 2737, - "src": "2160:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2723, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2160:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2131:44:3" - }, - "payable": false, - "returnParameters": { - "id": 2728, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2727, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2737, - "src": "2192:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2726, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2192:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2191:6:3" - }, - "scope": 2770, - "src": "2110:150:3", - "stateMutability": "nonpayable", - "superFunction": 3286, - "visibility": "public" - }, - { - "body": { - "id": 2752, - "nodeType": "Block", - "src": "2589:55:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2748, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2739, - "src": "2620:8:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2749, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2741, - "src": "2630:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2746, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3482, - "src": "2606:5:3", - "typeDescriptions": { - "typeIdentifier": "t_super$_EnigmaToken_$2770", - "typeString": "contract super EnigmaToken" - } - }, - "id": 2747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 3314, - "src": "2606:13:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) returns (bool)" - } - }, - "id": 2750, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2606:31:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2745, - "id": 2751, - "nodeType": "Return", - "src": "2599:38:3" - } - ] - }, - "documentation": "@dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender when not paused.\n@param _spender The address which will spend the funds.\n@param _value The amount of tokens to be spent.", - "id": 2753, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2742, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2739, - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 2753, - "src": "2533:16:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2738, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2533:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2741, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 2753, - "src": "2551:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2740, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2551:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2532:34:3" - }, - "payable": false, - "returnParameters": { - "id": 2745, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2744, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2753, - "src": "2583:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2743, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2583:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2582:6:3" - }, - "scope": 2770, - "src": "2516:128:3", - "stateMutability": "nonpayable", - "superFunction": 3314, - "visibility": "public" - }, - { - "body": { - "id": 2768, - "nodeType": "Block", - "src": "2733:56:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2764, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2755, - "src": "2766:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2765, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2757, - "src": "2773:8:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2762, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3482, - "src": "2750:5:3", - "typeDescriptions": { - "typeIdentifier": "t_super$_EnigmaToken_$2770", - "typeString": "contract super EnigmaToken" - } - }, - "id": 2763, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 3330, - "src": "2750:15:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view returns (uint256)" - } - }, - "id": 2766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2750:32:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2761, - "id": 2767, - "nodeType": "Return", - "src": "2743:39:3" - } - ] - }, - "documentation": null, - "id": 2769, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2758, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2755, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 2769, - "src": "2669:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2754, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2669:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2757, - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 2769, - "src": "2685:16:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2756, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2685:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2668:34:3" - }, - "payable": false, - "returnParameters": { - "id": 2761, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2760, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2769, - "src": "2724:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2759, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2724:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2723:9:3" - }, - "scope": 2770, - "src": "2650:139:3", - "stateMutability": "view", - "superFunction": 3330, - "visibility": "public" - } - ], - "scope": 2771, - "src": "597:2195:3" - } - ], - "src": "0:2792:3" - }, - "legacyAST": { - "absolutePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/EnigmaToken.sol", - "exportedSymbols": { - "EnigmaToken": [ - 2770 - ] - }, - "id": 2771, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2659, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:3" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol", - "file": "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol", - "id": 2660, - "nodeType": "ImportDirective", - "scope": 2771, - "sourceUnit": 3434, - "src": "25:71:3", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2661, - "name": "StandardToken", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3433, - "src": "621:13:3", - "typeDescriptions": { - "typeIdentifier": "t_contract$_StandardToken_$3433", - "typeString": "contract StandardToken" - } - }, - "id": 2662, - "nodeType": "InheritanceSpecifier", - "src": "621:13:3" - } - ], - "contractDependencies": [ - 3111, - 3154, - 3186, - 3433 - ], - "contractKind": "contract", - "documentation": "@title Enigma Token\n@dev ERC20 Enigma Token (ENG)\n * ENG Tokens are divisible by 1e8 (100,000,000) base\nunits referred to as 'Grains'.\n * ENG are displayed using 8 decimal places of precision.\n * 1 ENG is equivalent to:\n 100000000 == 1 * 10**8 == 1e8 == One Hundred Million Grains\n * 150 million ENG (total supply) is equivalent to:\n 15000000000000000 == 150000000 * 10**8 == 1e17\n * All initial ENG Grains are assigned to the creator of\nthis contract.\n ", - "fullyImplemented": true, - "id": 2770, - "linearizedBaseContracts": [ - 2770, - 3433, - 3111, - 3154, - 3186 - ], - "name": "EnigmaToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": true, - "id": 2665, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 2770, - "src": "642:38:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 2663, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "642:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "456e69676d61", - "id": 2664, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "672:8:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ba83be9d4f169561f32dcb185273e3b59336406003211080ed463fe7723a7d3c", - "typeString": "literal_string \"Enigma\"" - }, - "value": "Enigma" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 2668, - "name": "symbol", - "nodeType": "VariableDeclaration", - "scope": 2770, - "src": "757:37:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory", - "typeString": "string" - }, - "typeName": { - "id": 2666, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "757:6:3", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "454e47", - "id": 2667, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "789:5:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d79280fda08cc03aea482f66454ee9e69c82cdd5050db969689686719415114f", - "typeString": "literal_string \"ENG\"" - }, - "value": "ENG" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 2671, - "name": "decimals", - "nodeType": "VariableDeclaration", - "scope": 2770, - "src": "874:34:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 2669, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "874:5:3", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "38", - "id": 2670, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "907:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_8_by_1", - "typeString": "int_const 8" - }, - "value": "8" - }, - "visibility": "public" - }, - { - "constant": true, - "id": 2678, - "name": "INITIAL_SUPPLY", - "nodeType": "VariableDeclaration", - "scope": 2770, - "src": "997:58:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2672, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "997:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_15000000000000000_by_1", - "typeString": "int_const 15000000000000000" - }, - "id": 2677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "313530303030303030", - "id": 2673, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1038:9:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_150000000_by_1", - "typeString": "int_const 150000000" - }, - "value": "150000000" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_100000000_by_1", - "typeString": "int_const 100000000" - }, - "id": 2676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 2674, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1050:2:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "38", - "id": 2675, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1054:1:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_8_by_1", - "typeString": "int_const 8" - }, - "value": "8" - }, - "src": "1050:5:3", - "typeDescriptions": { - "typeIdentifier": "t_rational_100000000_by_1", - "typeString": "int_const 100000000" - } - }, - "src": "1038:17:3", - "typeDescriptions": { - "typeIdentifier": "t_rational_15000000000000000_by_1", - "typeString": "int_const 15000000000000000" - } - }, - "visibility": "public" - }, - { - "constant": false, - "id": 2680, - "name": "totalSupply", - "nodeType": "VariableDeclaration", - "scope": 2770, - "src": "1101:26:3", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2679, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1101:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 2701, - "nodeType": "Block", - "src": "1250:258:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2683, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2680 - ], - "referencedDeclaration": 2680, - "src": "1260:11:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2684, - "name": "INITIAL_SUPPLY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2678, - "src": "1274:14:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1260:28:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2686, - "nodeType": "ExpressionStatement", - "src": "1260:28:3" - }, - { - "expression": { - "argumentTypes": null, - "id": 2692, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2687, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "1352:8:3", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2690, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2688, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "1361:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1361:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1352:20:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2691, - "name": "INITIAL_SUPPLY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2678, - "src": "1375:14:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1352:37:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2693, - "nodeType": "ExpressionStatement", - "src": "1352:37:3" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307830", - "id": 2695, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1469:3:3", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2696, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "1474:3:3", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1474:10:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2698, - "name": "INITIAL_SUPPLY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2678, - "src": "1486:14:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2694, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3185, - "src": "1460:8:3", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 2699, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1460:41:3", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2700, - "nodeType": "EmitStatement", - "src": "1455:46:3" - } - ] - }, - "documentation": "@dev SesnseToken Constructor\nRuns only on initial contract creation.", - "id": 2702, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2681, - "nodeType": "ParameterList", - "parameters": [], - "src": "1240:2:3" - }, - "payable": false, - "returnParameters": { - "id": 2682, - "nodeType": "ParameterList", - "parameters": [], - "src": "1250:0:3" - }, - "scope": 2770, - "src": "1229:279:3", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2717, - "nodeType": "Block", - "src": "1759:51:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2713, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2704, - "src": "1791:3:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2714, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2706, - "src": "1796:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2711, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3482, - "src": "1776:5:3", - "typeDescriptions": { - "typeIdentifier": "t_super$_EnigmaToken_$2770", - "typeString": "contract super EnigmaToken" - } - }, - "id": 2712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 3098, - "src": "1776:14:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) returns (bool)" - } - }, - "id": 2715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1776:27:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2710, - "id": 2716, - "nodeType": "Return", - "src": "1769:34:3" - } - ] - }, - "documentation": "@dev Transfer token for a specified address when not paused\n@param _to The address to transfer to.\n@param _value The amount to be transferred.", - "id": 2718, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2707, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2704, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 2718, - "src": "1708:11:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2703, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1708:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2706, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 2718, - "src": "1721:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2705, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1721:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1707:29:3" - }, - "payable": false, - "returnParameters": { - "id": 2710, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2709, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2718, - "src": "1753:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2708, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1753:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1752:6:3" - }, - "scope": 2770, - "src": "1690:120:3", - "stateMutability": "nonpayable", - "superFunction": 3098, - "visibility": "public" - }, - { - "body": { - "id": 2736, - "nodeType": "Block", - "src": "2198:62:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2731, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2720, - "src": "2234:5:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2732, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2722, - "src": "2241:3:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2733, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2724, - "src": "2246:6:3", - "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": 2729, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3482, - "src": "2215:5:3", - "typeDescriptions": { - "typeIdentifier": "t_super$_EnigmaToken_$2770", - "typeString": "contract super EnigmaToken" - } - }, - "id": 2730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 3286, - "src": "2215:18:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) returns (bool)" - } - }, - "id": 2734, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2215:38:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2728, - "id": 2735, - "nodeType": "Return", - "src": "2208:45:3" - } - ] - }, - "documentation": "@dev Transfer tokens from one address to another when not paused\n@param _from address The address which you want to send tokens from\n@param _to address The address which you want to transfer to\n@param _value uint256 the amount of tokens to be transferred", - "id": 2737, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2725, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2720, - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 2737, - "src": "2132:13:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2719, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2132:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2722, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 2737, - "src": "2147:11:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2721, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2147:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2724, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 2737, - "src": "2160:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2723, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2160:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2131:44:3" - }, - "payable": false, - "returnParameters": { - "id": 2728, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2727, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2737, - "src": "2192:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2726, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2192:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2191:6:3" - }, - "scope": 2770, - "src": "2110:150:3", - "stateMutability": "nonpayable", - "superFunction": 3286, - "visibility": "public" - }, - { - "body": { - "id": 2752, - "nodeType": "Block", - "src": "2589:55:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2748, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2739, - "src": "2620:8:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2749, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2741, - "src": "2630:6:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2746, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3482, - "src": "2606:5:3", - "typeDescriptions": { - "typeIdentifier": "t_super$_EnigmaToken_$2770", - "typeString": "contract super EnigmaToken" - } - }, - "id": 2747, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "approve", - "nodeType": "MemberAccess", - "referencedDeclaration": 3314, - "src": "2606:13:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) returns (bool)" - } - }, - "id": 2750, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2606:31:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2745, - "id": 2751, - "nodeType": "Return", - "src": "2599:38:3" - } - ] - }, - "documentation": "@dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender when not paused.\n@param _spender The address which will spend the funds.\n@param _value The amount of tokens to be spent.", - "id": 2753, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2742, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2739, - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 2753, - "src": "2533:16:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2738, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2533:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2741, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 2753, - "src": "2551:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2740, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2551:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2532:34:3" - }, - "payable": false, - "returnParameters": { - "id": 2745, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2744, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2753, - "src": "2583:4:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2743, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2583:4:3", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2582:6:3" - }, - "scope": 2770, - "src": "2516:128:3", - "stateMutability": "nonpayable", - "superFunction": 3314, - "visibility": "public" - }, - { - "body": { - "id": 2768, - "nodeType": "Block", - "src": "2733:56:3", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2764, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2755, - "src": "2766:6:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2765, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2757, - "src": "2773:8:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2762, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3482, - "src": "2750:5:3", - "typeDescriptions": { - "typeIdentifier": "t_super$_EnigmaToken_$2770", - "typeString": "contract super EnigmaToken" - } - }, - "id": 2763, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "allowance", - "nodeType": "MemberAccess", - "referencedDeclaration": 3330, - "src": "2750:15:3", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (address,address) view returns (uint256)" - } - }, - "id": 2766, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2750:32:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2761, - "id": 2767, - "nodeType": "Return", - "src": "2743:39:3" - } - ] - }, - "documentation": null, - "id": 2769, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2758, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2755, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 2769, - "src": "2669:14:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2754, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2669:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2757, - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 2769, - "src": "2685:16:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2756, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2685:7:3", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2668:34:3" - }, - "payable": false, - "returnParameters": { - "id": 2761, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2760, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2769, - "src": "2724:7:3", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2759, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2724:7:3", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2723:9:3" - }, - "scope": 2770, - "src": "2650:139:3", - "stateMutability": "view", - "superFunction": 3330, - "visibility": "public" - } - ], - "scope": 2771, - "src": "597:2195:3" - } - ], - "src": "0:2792:3" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": { - "4447": { - "events": { - "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { - "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", - "signature": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" - }, - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { - "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", - "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" - } - }, - "links": {}, - "address": "0xF12b5dd4EAD5F743C6BaA640B0216200e89B60Da", - "transactionHash": "0x1f0c2794ff7b32afd259d71f2b66a31356cc25cbf00a4d249cdbe27b9b3ff64c" - } - }, - "schemaVersion": "2.0.0", - "updatedAt": "2018-10-14T09:15:28.148Z" -} \ No newline at end of file diff --git a/test/ethereum/scripts/includes/build/GetCode2.json b/test/ethereum/scripts/includes/build/GetCode2.json deleted file mode 100644 index acadb48e..00000000 --- a/test/ethereum/scripts/includes/build/GetCode2.json +++ /dev/null @@ -1,401 +0,0 @@ -{ - "contractName": "GetCode2", - "abi": [], - "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582023a622686077dcd5de90b932fdec7c4ecd301ae29b5d48b69b4b7228cc05d8740029", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582023a622686077dcd5de90b932fdec7c4ecd301ae29b5d48b69b4b7228cc05d8740029", - "sourceMap": "26:727:5:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", - "deployedSourceMap": "26:727:5:-;;;;;;;;", - "source": "pragma solidity ^0.4.24;\n\nlibrary GetCode2 {\n function at(address _addr) internal view returns (bytes o_code) {\n assembly {\n // retrieve the size of the code, this needs assembly\n let size := extcodesize(_addr)\n // allocate output byte array - this could also be done without assembly\n // by using o_code = new bytes(size)\n o_code := mload(0x40)\n // new \"memory end\" including padding\n mstore(0x40, add(o_code, and(add(add(size, 0x20), 0x1f), not(0x1f))))\n // store length in memory\n mstore(o_code, size)\n // actually retrieve the code, this needs assembly\n extcodecopy(_addr, add(o_code, 0x20), 0, size)\n }\n }\n}\n", - "sourcePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/utils/GetCode2.sol", - "ast": { - "absolutePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/utils/GetCode2.sol", - "exportedSymbols": { - "GetCode2": [ - 2840 - ] - }, - "id": 2841, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2830, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": null, - "fullyImplemented": true, - "id": 2840, - "linearizedBaseContracts": [ - 2840 - ], - "name": "GetCode2", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 2838, - "nodeType": "Block", - "src": "113:638:5", - "statements": [ - { - "externalReferences": [ - { - "_addr": { - "declaration": 2832, - "isOffset": false, - "isSlot": false, - "src": "236:5:5", - "valueSize": 1 - } - }, - { - "o_code": { - "declaration": 2835, - "isOffset": false, - "isSlot": false, - "src": "389:6:5", - "valueSize": 1 - } - }, - { - "o_code": { - "declaration": 2835, - "isOffset": false, - "isSlot": false, - "src": "712:6:5", - "valueSize": 1 - } - }, - { - "o_code": { - "declaration": 2835, - "isOffset": false, - "isSlot": false, - "src": "600:6:5", - "valueSize": 1 - } - }, - { - "_addr": { - "declaration": 2832, - "isOffset": false, - "isSlot": false, - "src": "701:5:5", - "valueSize": 1 - } - }, - { - "o_code": { - "declaration": 2835, - "isOffset": false, - "isSlot": false, - "src": "490:6:5", - "valueSize": 1 - } - } - ], - "id": 2837, - "nodeType": "InlineAssembly", - "operations": "{\n let size := extcodesize(_addr)\n o_code := mload(0x40)\n mstore(0x40, add(o_code, and(add(add(size, 0x20), 0x1f), not(0x1f))))\n mstore(o_code, size)\n extcodecopy(_addr, add(o_code, 0x20), 0, size)\n}", - "src": "123:628:5" - } - ] - }, - "documentation": null, - "id": 2839, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "at", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2833, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2832, - "name": "_addr", - "nodeType": "VariableDeclaration", - "scope": 2839, - "src": "61:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2831, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "61:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "60:15:5" - }, - "payable": false, - "returnParameters": { - "id": 2836, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2835, - "name": "o_code", - "nodeType": "VariableDeclaration", - "scope": 2839, - "src": "99:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2834, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "99:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "98:14:5" - }, - "scope": 2840, - "src": "49:702:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 2841, - "src": "26:727:5" - } - ], - "src": "0:754:5" - }, - "legacyAST": { - "absolutePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/utils/GetCode2.sol", - "exportedSymbols": { - "GetCode2": [ - 2840 - ] - }, - "id": 2841, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2830, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:5" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": null, - "fullyImplemented": true, - "id": 2840, - "linearizedBaseContracts": [ - 2840 - ], - "name": "GetCode2", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 2838, - "nodeType": "Block", - "src": "113:638:5", - "statements": [ - { - "externalReferences": [ - { - "_addr": { - "declaration": 2832, - "isOffset": false, - "isSlot": false, - "src": "236:5:5", - "valueSize": 1 - } - }, - { - "o_code": { - "declaration": 2835, - "isOffset": false, - "isSlot": false, - "src": "389:6:5", - "valueSize": 1 - } - }, - { - "o_code": { - "declaration": 2835, - "isOffset": false, - "isSlot": false, - "src": "712:6:5", - "valueSize": 1 - } - }, - { - "o_code": { - "declaration": 2835, - "isOffset": false, - "isSlot": false, - "src": "600:6:5", - "valueSize": 1 - } - }, - { - "_addr": { - "declaration": 2832, - "isOffset": false, - "isSlot": false, - "src": "701:5:5", - "valueSize": 1 - } - }, - { - "o_code": { - "declaration": 2835, - "isOffset": false, - "isSlot": false, - "src": "490:6:5", - "valueSize": 1 - } - } - ], - "id": 2837, - "nodeType": "InlineAssembly", - "operations": "{\n let size := extcodesize(_addr)\n o_code := mload(0x40)\n mstore(0x40, add(o_code, and(add(add(size, 0x20), 0x1f), not(0x1f))))\n mstore(o_code, size)\n extcodecopy(_addr, add(o_code, 0x20), 0, size)\n}", - "src": "123:628:5" - } - ] - }, - "documentation": null, - "id": 2839, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "at", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2833, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2832, - "name": "_addr", - "nodeType": "VariableDeclaration", - "scope": 2839, - "src": "61:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2831, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "61:7:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "60:15:5" - }, - "payable": false, - "returnParameters": { - "id": 2836, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2835, - "name": "o_code", - "nodeType": "VariableDeclaration", - "scope": 2839, - "src": "99:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2834, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "99:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "98:14:5" - }, - "scope": 2840, - "src": "49:702:5", - "stateMutability": "view", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 2841, - "src": "26:727:5" - } - ], - "src": "0:754:5" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "2.0.0", - "updatedAt": "2018-10-10T12:57:03.069Z" -} \ No newline at end of file diff --git a/test/ethereum/scripts/includes/build/Migrations.json b/test/ethereum/scripts/includes/build/Migrations.json deleted file mode 100644 index df08489e..00000000 --- a/test/ethereum/scripts/includes/build/Migrations.json +++ /dev/null @@ -1,1394 +0,0 @@ -{ - "contractName": "Migrations", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "last_completed_migration", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "constant": false, - "inputs": [ - { - "name": "completed", - "type": "uint256" - } - ], - "name": "setCompleted", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "new_address", - "type": "address" - } - ], - "name": "upgrade", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b5060008054600160a060020a0319163317905561023c806100326000396000f3006080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100965780638da5cb5b146100bd578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b60408051918252519081900360200190f35b3480156100c957600080fd5b506100d26101cb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a723058209b1d60e9a0d9f878a30cdf5facacefbae856d6befce778835a140933909f04bc0029", - "deployedBytecode": "0x6080604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100965780638da5cb5b146100bd578063fdacd576146100fb575b600080fd5b34801561007257600080fd5b5061009473ffffffffffffffffffffffffffffffffffffffff60043516610113565b005b3480156100a257600080fd5b506100ab6101c5565b60408051918252519081900360200190f35b3480156100c957600080fd5b506100d26101cb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010757600080fd5b506100946004356101e7565b6000805473ffffffffffffffffffffffffffffffffffffffff163314156101c1578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101a857600080fd5b505af11580156101bc573d6000803e3d6000fd5b505050505b5050565b60015481565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633141561020d5760018190555b505600a165627a7a723058209b1d60e9a0d9f878a30cdf5facacefbae856d6befce778835a140933909f04bc0029", - "sourceMap": "26:544:4:-;;;216:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;247:5:4;:18;;-1:-1:-1;;;;;;247:18:4;255:10;247:18;;;26:544;;;;;;", - "deployedSourceMap": "26:544:4:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;393:175;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;393:175:4;;;;;;;;;78:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;78:36:4;;;;;;;;;;;;;;;;;;;;52:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;52:20:4;;;;;;;;;;;;;;;;;;;;;;;278:109;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;278:109:4;;;;;393:175;459:19;171:5;;;;157:10;:19;153:51;;;492:11;459:45;;514:8;:21;;;536:24;;514:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;514:47:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;514:47:4;;;;153:51;393:175;;:::o;78:36::-;;;;:::o;52:20::-;;;;;;:::o;278:109::-;171:5;;;;157:10;:19;153:51;;;344:24;:36;;;153:51;278:109;:::o", - "source": "pragma solidity ^0.4.24;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) {\n _;\n }\n }\n\n constructor() public {\n owner = msg.sender;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) public restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n", - "sourcePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/Migrations.sol", - "ast": { - "absolutePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/Migrations.sol", - "exportedSymbols": { - "Migrations": [ - 2828 - ] - }, - "id": 2829, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2772, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 2828, - "linearizedBaseContracts": [ - 2828 - ], - "name": "Migrations", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 2774, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 2828, - "src": "52:20:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "52:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 2776, - "name": "last_completed_migration", - "nodeType": "VariableDeclaration", - "scope": 2828, - "src": "78:36:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2775, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "78:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 2785, - "nodeType": "Block", - "src": "143:67:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2778, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "157:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "157:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2780, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2774, - "src": "171:5:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "157:19:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2784, - "nodeType": "IfStatement", - "src": "153:51:4", - "trueBody": { - "id": 2783, - "nodeType": "Block", - "src": "178:26:4", - "statements": [ - { - "id": 2782, - "nodeType": "PlaceholderStatement", - "src": "192:1:4" - } - ] - } - } - ] - }, - "documentation": null, - "id": 2786, - "name": "restricted", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 2777, - "nodeType": "ParameterList", - "parameters": [], - "src": "140:2:4" - }, - "src": "121:89:4", - "visibility": "internal" - }, - { - "body": { - "id": 2794, - "nodeType": "Block", - "src": "237:35:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2792, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2789, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2774, - "src": "247:5:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2790, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "255:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "255:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "247:18:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2793, - "nodeType": "ExpressionStatement", - "src": "247:18:4" - } - ] - }, - "documentation": null, - "id": 2795, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2787, - "nodeType": "ParameterList", - "parameters": [], - "src": "227:2:4" - }, - "payable": false, - "returnParameters": { - "id": 2788, - "nodeType": "ParameterList", - "parameters": [], - "src": "237:0:4" - }, - "scope": 2828, - "src": "216:56:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2806, - "nodeType": "Block", - "src": "334:53:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2802, - "name": "last_completed_migration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2776, - "src": "344:24:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2803, - "name": "completed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2797, - "src": "371:9:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "344:36:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2805, - "nodeType": "ExpressionStatement", - "src": "344:36:4" - } - ] - }, - "documentation": null, - "id": 2807, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": null, - "id": 2800, - "modifierName": { - "argumentTypes": null, - "id": 2799, - "name": "restricted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2786, - "src": "323:10:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "323:10:4" - } - ], - "name": "setCompleted", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2798, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2797, - "name": "completed", - "nodeType": "VariableDeclaration", - "scope": 2807, - "src": "300:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2796, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "300:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "299:16:4" - }, - "payable": false, - "returnParameters": { - "id": 2801, - "nodeType": "ParameterList", - "parameters": [], - "src": "334:0:4" - }, - "scope": 2828, - "src": "278:109:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2826, - "nodeType": "Block", - "src": "449:119:4", - "statements": [ - { - "assignments": [ - 2815 - ], - "declarations": [ - { - "constant": false, - "id": 2815, - "name": "upgraded", - "nodeType": "VariableDeclaration", - "scope": 2827, - "src": "459:19:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Migrations_$2828", - "typeString": "contract Migrations" - }, - "typeName": { - "contractScope": null, - "id": 2814, - "name": "Migrations", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2828, - "src": "459:10:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Migrations_$2828", - "typeString": "contract Migrations" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2819, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2817, - "name": "new_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2809, - "src": "492:11:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2816, - "name": "Migrations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2828, - "src": "481:10:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Migrations_$2828_$", - "typeString": "type(contract Migrations)" - } - }, - "id": 2818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "481:23:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Migrations_$2828", - "typeString": "contract Migrations" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "459:45:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2823, - "name": "last_completed_migration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2776, - "src": "536:24:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2820, - "name": "upgraded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2815, - "src": "514:8:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Migrations_$2828", - "typeString": "contract Migrations" - } - }, - "id": 2822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setCompleted", - "nodeType": "MemberAccess", - "referencedDeclaration": 2807, - "src": "514:21:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256) external" - } - }, - "id": 2824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "514:47:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2825, - "nodeType": "ExpressionStatement", - "src": "514:47:4" - } - ] - }, - "documentation": null, - "id": 2827, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": null, - "id": 2812, - "modifierName": { - "argumentTypes": null, - "id": 2811, - "name": "restricted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2786, - "src": "438:10:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "438:10:4" - } - ], - "name": "upgrade", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2810, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2809, - "name": "new_address", - "nodeType": "VariableDeclaration", - "scope": 2827, - "src": "410:19:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2808, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "410:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "409:21:4" - }, - "payable": false, - "returnParameters": { - "id": 2813, - "nodeType": "ParameterList", - "parameters": [], - "src": "449:0:4" - }, - "scope": 2828, - "src": "393:175:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 2829, - "src": "26:544:4" - } - ], - "src": "0:571:4" - }, - "legacyAST": { - "absolutePath": "/home/wildermind/WebstormProjects/enigma-contract-internal/contracts/Migrations.sol", - "exportedSymbols": { - "Migrations": [ - 2828 - ] - }, - "id": 2829, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2772, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:4" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 2828, - "linearizedBaseContracts": [ - 2828 - ], - "name": "Migrations", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 2774, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 2828, - "src": "52:20:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2773, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "52:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 2776, - "name": "last_completed_migration", - "nodeType": "VariableDeclaration", - "scope": 2828, - "src": "78:36:4", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2775, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "78:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 2785, - "nodeType": "Block", - "src": "143:67:4", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2781, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2778, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "157:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2779, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "157:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2780, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2774, - "src": "171:5:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "157:19:4", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2784, - "nodeType": "IfStatement", - "src": "153:51:4", - "trueBody": { - "id": 2783, - "nodeType": "Block", - "src": "178:26:4", - "statements": [ - { - "id": 2782, - "nodeType": "PlaceholderStatement", - "src": "192:1:4" - } - ] - } - } - ] - }, - "documentation": null, - "id": 2786, - "name": "restricted", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 2777, - "nodeType": "ParameterList", - "parameters": [], - "src": "140:2:4" - }, - "src": "121:89:4", - "visibility": "internal" - }, - { - "body": { - "id": 2794, - "nodeType": "Block", - "src": "237:35:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2792, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2789, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2774, - "src": "247:5:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2790, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "255:3:4", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "255:10:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "247:18:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2793, - "nodeType": "ExpressionStatement", - "src": "247:18:4" - } - ] - }, - "documentation": null, - "id": 2795, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2787, - "nodeType": "ParameterList", - "parameters": [], - "src": "227:2:4" - }, - "payable": false, - "returnParameters": { - "id": 2788, - "nodeType": "ParameterList", - "parameters": [], - "src": "237:0:4" - }, - "scope": 2828, - "src": "216:56:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2806, - "nodeType": "Block", - "src": "334:53:4", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2802, - "name": "last_completed_migration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2776, - "src": "344:24:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2803, - "name": "completed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2797, - "src": "371:9:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "344:36:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2805, - "nodeType": "ExpressionStatement", - "src": "344:36:4" - } - ] - }, - "documentation": null, - "id": 2807, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": null, - "id": 2800, - "modifierName": { - "argumentTypes": null, - "id": 2799, - "name": "restricted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2786, - "src": "323:10:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "323:10:4" - } - ], - "name": "setCompleted", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2798, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2797, - "name": "completed", - "nodeType": "VariableDeclaration", - "scope": 2807, - "src": "300:14:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2796, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "300:4:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "299:16:4" - }, - "payable": false, - "returnParameters": { - "id": 2801, - "nodeType": "ParameterList", - "parameters": [], - "src": "334:0:4" - }, - "scope": 2828, - "src": "278:109:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 2826, - "nodeType": "Block", - "src": "449:119:4", - "statements": [ - { - "assignments": [ - 2815 - ], - "declarations": [ - { - "constant": false, - "id": 2815, - "name": "upgraded", - "nodeType": "VariableDeclaration", - "scope": 2827, - "src": "459:19:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Migrations_$2828", - "typeString": "contract Migrations" - }, - "typeName": { - "contractScope": null, - "id": 2814, - "name": "Migrations", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2828, - "src": "459:10:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Migrations_$2828", - "typeString": "contract Migrations" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2819, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2817, - "name": "new_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2809, - "src": "492:11:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2816, - "name": "Migrations", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2828, - "src": "481:10:4", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_Migrations_$2828_$", - "typeString": "type(contract Migrations)" - } - }, - "id": 2818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "481:23:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Migrations_$2828", - "typeString": "contract Migrations" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "459:45:4" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2823, - "name": "last_completed_migration", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2776, - "src": "536:24:4", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2820, - "name": "upgraded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2815, - "src": "514:8:4", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Migrations_$2828", - "typeString": "contract Migrations" - } - }, - "id": 2822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setCompleted", - "nodeType": "MemberAccess", - "referencedDeclaration": 2807, - "src": "514:21:4", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256) external" - } - }, - "id": 2824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "514:47:4", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2825, - "nodeType": "ExpressionStatement", - "src": "514:47:4" - } - ] - }, - "documentation": null, - "id": 2827, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [ - { - "arguments": null, - "id": 2812, - "modifierName": { - "argumentTypes": null, - "id": 2811, - "name": "restricted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2786, - "src": "438:10:4", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "438:10:4" - } - ], - "name": "upgrade", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2810, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2809, - "name": "new_address", - "nodeType": "VariableDeclaration", - "scope": 2827, - "src": "410:19:4", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2808, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "410:7:4", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "409:21:4" - }, - "payable": false, - "returnParameters": { - "id": 2813, - "nodeType": "ParameterList", - "parameters": [], - "src": "449:0:4" - }, - "scope": 2828, - "src": "393:175:4", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 2829, - "src": "26:544:4" - } - ], - "src": "0:571:4" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "2.0.0", - "updatedAt": "2018-10-14T09:15:28.149Z" -} \ No newline at end of file diff --git a/test/ethereum/scripts/includes/build/SafeMath.json b/test/ethereum/scripts/includes/build/SafeMath.json deleted file mode 100644 index 7b1f2996..00000000 --- a/test/ethereum/scripts/includes/build/SafeMath.json +++ /dev/null @@ -1,2365 +0,0 @@ -{ - "contractName": "SafeMath", - "abi": [], - "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820bd385704a7cdeeee49ba5e7c584a3197d8d330e17874d1f7883d1a03624e51460029", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820bd385704a7cdeeee49ba5e7c584a3197d8d330e17874d1f7883d1a03624e51460029", - "sourceMap": "117:1251:7:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", - "deployedSourceMap": "117:1251:7:-;;;;;;;;", - "source": "pragma solidity ^0.4.24;\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {\n // Gas optimization: this is cheaper than asserting 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n if (_a == 0) {\n return 0;\n }\n\n c = _a * _b;\n assert(c / _a == _b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 _a, uint256 _b) internal pure returns (uint256) {\n // assert(_b > 0); // Solidity automatically throws when dividing by 0\n // uint256 c = _a / _b;\n // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold\n return _a / _b;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {\n assert(_b <= _a);\n return _a - _b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {\n c = _a + _b;\n assert(c >= _a);\n return c;\n }\n}\n", - "sourcePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "ast": { - "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "exportedSymbols": { - "SafeMath": [ - 3015 - ] - }, - "id": 3016, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2923, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error", - "fullyImplemented": true, - "id": 3015, - "linearizedBaseContracts": [ - 3015 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 2955, - "nodeType": "Block", - "src": "274:309:7", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2934, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2932, - "name": "_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2925, - "src": "489:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2933, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "495:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "489:7:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2938, - "nodeType": "IfStatement", - "src": "485:36:7", - "trueBody": { - "id": 2937, - "nodeType": "Block", - "src": "498:23:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2935, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "513:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 2931, - "id": 2936, - "nodeType": "Return", - "src": "506:8:7" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 2943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2939, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2930, - "src": "527:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2942, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2940, - "name": "_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2925, - "src": "531:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 2941, - "name": "_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2927, - "src": "536:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "531:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "527:11:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2944, - "nodeType": "ExpressionStatement", - "src": "527:11:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2946, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2930, - "src": "551:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 2947, - "name": "_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2925, - "src": "555:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "551:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2949, - "name": "_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2927, - "src": "561:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "551:12:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 2945, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3437, - "src": "544:6:7", - "typeDescriptions": { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 2951, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "544:20:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2952, - "nodeType": "ExpressionStatement", - "src": "544:20:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 2953, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2930, - "src": "577:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2931, - "id": 2954, - "nodeType": "Return", - "src": "570:8:7" - } - ] - }, - "documentation": "@dev Multiplies two numbers, throws on overflow.", - "id": 2956, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2928, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2925, - "name": "_a", - "nodeType": "VariableDeclaration", - "scope": 2956, - "src": "216:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2924, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "216:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2927, - "name": "_b", - "nodeType": "VariableDeclaration", - "scope": 2956, - "src": "228:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2926, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "228:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "215:24:7" - }, - "payable": false, - "returnParameters": { - "id": 2931, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2930, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 2956, - "src": "263:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2929, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "263:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "262:11:7" - }, - "scope": 3015, - "src": "203:380:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2969, - "nodeType": "Block", - "src": "734:214:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2965, - "name": "_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2958, - "src": "936:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 2966, - "name": "_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2960, - "src": "941:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "936:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2964, - "id": 2968, - "nodeType": "Return", - "src": "929:14:7" - } - ] - }, - "documentation": "@dev Integer division of two numbers, truncating the quotient.", - "id": 2970, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2961, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2958, - "name": "_a", - "nodeType": "VariableDeclaration", - "scope": 2970, - "src": "678:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2957, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "678:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2960, - "name": "_b", - "nodeType": "VariableDeclaration", - "scope": 2970, - "src": "690:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2959, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "690:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "677:24:7" - }, - "payable": false, - "returnParameters": { - "id": 2964, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2963, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2970, - "src": "725:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2962, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "725:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "724:9:7" - }, - "scope": 3015, - "src": "665:283:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2989, - "nodeType": "Block", - "src": "1129:47:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2980, - "name": "_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2974, - "src": "1142:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 2981, - "name": "_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2972, - "src": "1148:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1142:8:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 2979, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3437, - "src": "1135:6:7", - "typeDescriptions": { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 2983, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1135:16:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2984, - "nodeType": "ExpressionStatement", - "src": "1135:16:7" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2985, - "name": "_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2972, - "src": "1164:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 2986, - "name": "_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2974, - "src": "1169:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1164:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2978, - "id": 2988, - "nodeType": "Return", - "src": "1157:14:7" - } - ] - }, - "documentation": "@dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).", - "id": 2990, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2975, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2972, - "name": "_a", - "nodeType": "VariableDeclaration", - "scope": 2990, - "src": "1073:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2971, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1073:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2974, - "name": "_b", - "nodeType": "VariableDeclaration", - "scope": 2990, - "src": "1085:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2973, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1085:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1072:24:7" - }, - "payable": false, - "returnParameters": { - "id": 2978, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2977, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2990, - "src": "1120:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2976, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1120:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1119:9:7" - }, - "scope": 3015, - "src": "1060:116:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3013, - "nodeType": "Block", - "src": "1309:57:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3003, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2999, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2997, - "src": "1315:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3002, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3000, - "name": "_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2992, - "src": "1319:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3001, - "name": "_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2994, - "src": "1324:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1319:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1315:11:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3004, - "nodeType": "ExpressionStatement", - "src": "1315:11:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3008, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3006, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2997, - "src": "1339:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3007, - "name": "_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2992, - "src": "1344:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1339:7:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 3005, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3437, - "src": "1332:6:7", - "typeDescriptions": { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 3009, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1332:15:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3010, - "nodeType": "ExpressionStatement", - "src": "1332:15:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 3011, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2997, - "src": "1360:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2998, - "id": 3012, - "nodeType": "Return", - "src": "1353:8:7" - } - ] - }, - "documentation": "@dev Adds two numbers, throws on overflow.", - "id": 3014, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2995, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2992, - "name": "_a", - "nodeType": "VariableDeclaration", - "scope": 3014, - "src": "1251:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2991, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1251:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2994, - "name": "_b", - "nodeType": "VariableDeclaration", - "scope": 3014, - "src": "1263:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2993, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1263:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1250:24:7" - }, - "payable": false, - "returnParameters": { - "id": 2998, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2997, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 3014, - "src": "1298:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2996, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1298:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1297:11:7" - }, - "scope": 3015, - "src": "1238:128:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 3016, - "src": "117:1251:7" - } - ], - "src": "0:1369:7" - }, - "legacyAST": { - "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "exportedSymbols": { - "SafeMath": [ - 3015 - ] - }, - "id": 3016, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2923, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:7" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "library", - "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error", - "fullyImplemented": true, - "id": 3015, - "linearizedBaseContracts": [ - 3015 - ], - "name": "SafeMath", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": { - "id": 2955, - "nodeType": "Block", - "src": "274:309:7", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2934, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2932, - "name": "_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2925, - "src": "489:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2933, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "495:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "489:7:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2938, - "nodeType": "IfStatement", - "src": "485:36:7", - "trueBody": { - "id": 2937, - "nodeType": "Block", - "src": "498:23:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2935, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "513:1:7", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 2931, - "id": 2936, - "nodeType": "Return", - "src": "506:8:7" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 2943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2939, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2930, - "src": "527:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2942, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2940, - "name": "_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2925, - "src": "531:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 2941, - "name": "_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2927, - "src": "536:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "531:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "527:11:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2944, - "nodeType": "ExpressionStatement", - "src": "527:11:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2946, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2930, - "src": "551:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 2947, - "name": "_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2925, - "src": "555:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "551:6:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2949, - "name": "_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2927, - "src": "561:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "551:12:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 2945, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3437, - "src": "544:6:7", - "typeDescriptions": { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 2951, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "544:20:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2952, - "nodeType": "ExpressionStatement", - "src": "544:20:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 2953, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2930, - "src": "577:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2931, - "id": 2954, - "nodeType": "Return", - "src": "570:8:7" - } - ] - }, - "documentation": "@dev Multiplies two numbers, throws on overflow.", - "id": 2956, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "mul", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2928, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2925, - "name": "_a", - "nodeType": "VariableDeclaration", - "scope": 2956, - "src": "216:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2924, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "216:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2927, - "name": "_b", - "nodeType": "VariableDeclaration", - "scope": 2956, - "src": "228:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2926, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "228:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "215:24:7" - }, - "payable": false, - "returnParameters": { - "id": 2931, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2930, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 2956, - "src": "263:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2929, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "263:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "262:11:7" - }, - "scope": 3015, - "src": "203:380:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2969, - "nodeType": "Block", - "src": "734:214:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2967, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2965, - "name": "_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2958, - "src": "936:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "id": 2966, - "name": "_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2960, - "src": "941:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "936:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2964, - "id": 2968, - "nodeType": "Return", - "src": "929:14:7" - } - ] - }, - "documentation": "@dev Integer division of two numbers, truncating the quotient.", - "id": 2970, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "div", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2961, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2958, - "name": "_a", - "nodeType": "VariableDeclaration", - "scope": 2970, - "src": "678:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2957, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "678:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2960, - "name": "_b", - "nodeType": "VariableDeclaration", - "scope": 2970, - "src": "690:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2959, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "690:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "677:24:7" - }, - "payable": false, - "returnParameters": { - "id": 2964, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2963, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2970, - "src": "725:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2962, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "725:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "724:9:7" - }, - "scope": 3015, - "src": "665:283:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 2989, - "nodeType": "Block", - "src": "1129:47:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2980, - "name": "_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2974, - "src": "1142:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 2981, - "name": "_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2972, - "src": "1148:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1142:8:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 2979, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3437, - "src": "1135:6:7", - "typeDescriptions": { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 2983, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1135:16:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2984, - "nodeType": "ExpressionStatement", - "src": "1135:16:7" - }, - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2985, - "name": "_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2972, - "src": "1164:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 2986, - "name": "_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2974, - "src": "1169:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1164:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2978, - "id": 2988, - "nodeType": "Return", - "src": "1157:14:7" - } - ] - }, - "documentation": "@dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).", - "id": 2990, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "sub", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2975, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2972, - "name": "_a", - "nodeType": "VariableDeclaration", - "scope": 2990, - "src": "1073:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2971, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1073:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2974, - "name": "_b", - "nodeType": "VariableDeclaration", - "scope": 2990, - "src": "1085:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2973, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1085:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1072:24:7" - }, - "payable": false, - "returnParameters": { - "id": 2978, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2977, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 2990, - "src": "1120:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2976, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1120:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1119:9:7" - }, - "scope": 3015, - "src": "1060:116:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - }, - { - "body": { - "id": 3013, - "nodeType": "Block", - "src": "1309:57:7", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3003, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2999, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2997, - "src": "1315:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3002, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3000, - "name": "_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2992, - "src": "1319:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3001, - "name": "_b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2994, - "src": "1324:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1319:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1315:11:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3004, - "nodeType": "ExpressionStatement", - "src": "1315:11:7" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3008, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3006, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2997, - "src": "1339:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3007, - "name": "_a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2992, - "src": "1344:2:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1339:7:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 3005, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3437, - "src": "1332:6:7", - "typeDescriptions": { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 3009, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1332:15:7", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3010, - "nodeType": "ExpressionStatement", - "src": "1332:15:7" - }, - { - "expression": { - "argumentTypes": null, - "id": 3011, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2997, - "src": "1360:1:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 2998, - "id": 3012, - "nodeType": "Return", - "src": "1353:8:7" - } - ] - }, - "documentation": "@dev Adds two numbers, throws on overflow.", - "id": 3014, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "add", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 2995, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2992, - "name": "_a", - "nodeType": "VariableDeclaration", - "scope": 3014, - "src": "1251:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2991, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1251:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2994, - "name": "_b", - "nodeType": "VariableDeclaration", - "scope": 3014, - "src": "1263:10:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2993, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1263:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1250:24:7" - }, - "payable": false, - "returnParameters": { - "id": 2998, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2997, - "name": "c", - "nodeType": "VariableDeclaration", - "scope": 3014, - "src": "1298:9:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2996, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1298:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1297:11:7" - }, - "scope": 3015, - "src": "1238:128:7", - "stateMutability": "pure", - "superFunction": null, - "visibility": "internal" - } - ], - "scope": 3016, - "src": "117:1251:7" - } - ], - "src": "0:1369:7" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "2.0.0", - "updatedAt": "2018-10-10T12:57:03.070Z" -} \ No newline at end of file diff --git a/test/ethereum/scripts/includes/build/StandardToken.json b/test/ethereum/scripts/includes/build/StandardToken.json deleted file mode 100644 index 268e3f20..00000000 --- a/test/ethereum/scripts/includes/build/StandardToken.json +++ /dev/null @@ -1,6783 +0,0 @@ -{ - "contractName": "StandardToken", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "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" - }, - { - "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" - }, - { - "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": 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": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_addedValue", - "type": "uint256" - } - ], - "name": "increaseApproval", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseApproval", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b506106ae806100206000396000f30060806040526004361061008d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461009257806318160ddd146100ca57806323b872dd146100f1578063661884631461011b57806370a082311461013f578063a9059cbb14610160578063d73dd62314610184578063dd62ed3e146101a8575b600080fd5b34801561009e57600080fd5b506100b6600160a060020a03600435166024356101cf565b604080519115158252519081900360200190f35b3480156100d657600080fd5b506100df610235565b60408051918252519081900360200190f35b3480156100fd57600080fd5b506100b6600160a060020a036004358116906024351660443561023b565b34801561012757600080fd5b506100b6600160a060020a03600435166024356103b0565b34801561014b57600080fd5b506100df600160a060020a036004351661049f565b34801561016c57600080fd5b506100b6600160a060020a03600435166024356104ba565b34801561019057600080fd5b506100b6600160a060020a0360043516602435610599565b3480156101b457600080fd5b506100df600160a060020a0360043581169060243516610632565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60015490565b600160a060020a03831660009081526020819052604081205482111561026057600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561029057600080fd5b600160a060020a03831615156102a557600080fd5b600160a060020a0384166000908152602081905260409020546102ce908363ffffffff61065d16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610303908363ffffffff61066f16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610345908363ffffffff61065d16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000908152600260209081526040808320600160a060020a038616845290915281205480831061040457336000908152600260209081526040808320600160a060020a0388168452909152812055610439565b610414818463ffffffff61065d16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b336000908152602081905260408120548211156104d657600080fd5b600160a060020a03831615156104eb57600080fd5b3360009081526020819052604090205461050b908363ffffffff61065d16565b3360009081526020819052604080822092909255600160a060020a0385168152205461053d908363ffffffff61066f16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a03861684529091528120546105cd908363ffffffff61066f16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60008282111561066957fe5b50900390565b8181018281101561067c57fe5b929150505600a165627a7a72305820cb604106eed7261794856b504006ec8ed1f6e1c45de64442662e838be28b84a10029", - "deployedBytecode": "0x60806040526004361061008d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461009257806318160ddd146100ca57806323b872dd146100f1578063661884631461011b57806370a082311461013f578063a9059cbb14610160578063d73dd62314610184578063dd62ed3e146101a8575b600080fd5b34801561009e57600080fd5b506100b6600160a060020a03600435166024356101cf565b604080519115158252519081900360200190f35b3480156100d657600080fd5b506100df610235565b60408051918252519081900360200190f35b3480156100fd57600080fd5b506100b6600160a060020a036004358116906024351660443561023b565b34801561012757600080fd5b506100b6600160a060020a03600435166024356103b0565b34801561014b57600080fd5b506100df600160a060020a036004351661049f565b34801561016c57600080fd5b506100b6600160a060020a03600435166024356104ba565b34801561019057600080fd5b506100b6600160a060020a0360043516602435610599565b3480156101b457600080fd5b506100df600160a060020a0360043581169060243516610632565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60015490565b600160a060020a03831660009081526020819052604081205482111561026057600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561029057600080fd5b600160a060020a03831615156102a557600080fd5b600160a060020a0384166000908152602081905260409020546102ce908363ffffffff61065d16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610303908363ffffffff61066f16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610345908363ffffffff61065d16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000908152600260209081526040808320600160a060020a038616845290915281205480831061040457336000908152600260209081526040808320600160a060020a0388168452909152812055610439565b610414818463ffffffff61065d16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b336000908152602081905260408120548211156104d657600080fd5b600160a060020a03831615156104eb57600080fd5b3360009081526020819052604090205461050b908363ffffffff61065d16565b3360009081526020819052604080822092909255600160a060020a0385168152205461053d908363ffffffff61066f16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a03861684529091528120546105cd908363ffffffff61066f16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60008282111561066957fe5b50900390565b8181018281101561067c57fe5b929150505600a165627a7a72305820cb604106eed7261794856b504006ec8ed1f6e1c45de64442662e838be28b84a10029", - "sourceMap": "334:3780:11:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;334:3780:11;;;;;;;", - "deployedSourceMap": "334:3780:11:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1814:188;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1814:188:11;-1:-1:-1;;;;;1814:188:11;;;;;;;;;;;;;;;;;;;;;;;;;389:83:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;389:83:8;;;;;;;;;;;;;;;;;;;;726:470:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;726:470:11;-1:-1:-1;;;;;726:470:11;;;;;;;;;;;;3679:432;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3679:432:11;-1:-1:-1;;;;;3679:432:11;;;;;;;1149:99:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1149:99:8;-1:-1:-1;;;;;1149:99:8;;;;;626:321;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;626:321:8;-1:-1:-1;;;;;626:321:8;;;;;;;2926:296:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2926:296:11;-1:-1:-1;;;;;2926:296:11;;;;;;;2321:153;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2321:153:11;-1:-1:-1;;;;;2321:153:11;;;;;;;;;;1814:188;1901:10;1881:4;1893:19;;;:7;:19;;;;;;;;-1:-1:-1;;;;;1893:29:11;;;;;;;;;;;:38;;;1942;;;;;;;1881:4;;1893:29;;1901:10;;1942:38;;;;;;;;-1:-1:-1;1993:4:11;1814:188;;;;:::o;389:83:8:-;455:12;;389:83;:::o;726:470:11:-;-1:-1:-1;;;;;864:15:11;;832:4;864:15;;;;;;;;;;;854:25;;;846:34;;;;;;-1:-1:-1;;;;;904:14:11;;;;;;:7;:14;;;;;;;;919:10;904:26;;;;;;;;894:36;;;886:45;;;;;;-1:-1:-1;;;;;945:17:11;;;;937:26;;;;;;-1:-1:-1;;;;;988:15:11;;:8;:15;;;;;;;;;;;:27;;1008:6;988:27;:19;:27;:::i;:::-;-1:-1:-1;;;;;970:15:11;;;:8;:15;;;;;;;;;;;:45;;;;1037:13;;;;;;;:25;;1055:6;1037:25;:17;:25;:::i;:::-;-1:-1:-1;;;;;1021:13:11;;;:8;:13;;;;;;;;;;;:41;;;;1097:14;;;;;:7;:14;;;;;1112:10;1097:26;;;;;;;:38;;1128:6;1097:38;:30;:38;:::i;:::-;-1:-1:-1;;;;;1068:14:11;;;;;;;:7;:14;;;;;;;;1083:10;1068:26;;;;;;;;:67;;;;1146:28;;;;;;;;;;;1068:14;;1146:28;;;;;;;;;;;-1:-1:-1;1187:4:11;726:470;;;;;:::o;3679:432::-;3826:10;3785:4;3818:19;;;:7;:19;;;;;;;;-1:-1:-1;;;;;3818:29:11;;;;;;;;;;3857:28;;;3853:165;;3903:10;3927:1;3895:19;;;:7;:19;;;;;;;;-1:-1:-1;;;;;3895:29:11;;;;;;;;;:33;3853:165;;;3981:30;:8;3994:16;3981:30;:12;:30;:::i;:::-;3957:10;3949:19;;;;:7;:19;;;;;;;;-1:-1:-1;;;;;3949:29:11;;;;;;;;;:62;3853:165;4037:10;4059:19;;;;:7;:19;;;;;;;;-1:-1:-1;;;;;4028:61:11;;4059:29;;;;;;;;;;;4028:61;;;;;;;;;4037:10;4028:61;;;;;;;;;;;-1:-1:-1;4102:4:11;;3679:432;-1:-1:-1;;;3679:432:11:o;1149:99:8:-;-1:-1:-1;;;;;1227:16:8;1205:7;1227:16;;;;;;;;;;;;1149:99::o;626:321::-;728:10;689:4;719:20;;;;;;;;;;;709:30;;;701:39;;;;;;-1:-1:-1;;;;;754:17:8;;;;746:26;;;;;;811:10;802:8;:20;;;;;;;;;;;:32;;827:6;802:32;:24;:32;:::i;:::-;788:10;779:8;:20;;;;;;;;;;;:55;;;;-1:-1:-1;;;;;856:13:8;;;;;;:25;;874:6;856:25;:17;:25;:::i;:::-;-1:-1:-1;;;;;840:13:8;;:8;:13;;;;;;;;;;;;:41;;;;892:33;;;;;;;840:13;;901:10;;892:33;;;;;;;;;;-1:-1:-1;938:4:8;626:321;;;;:::o;2926:296:11:-;3089:10;3027:4;3081:19;;;:7;:19;;;;;;;;-1:-1:-1;;;;;3081:29:11;;;;;;;;;;:46;;3115:11;3081:46;:33;:46;:::i;:::-;3049:10;3041:19;;;;:7;:19;;;;;;;;-1:-1:-1;;;;;3041:29:11;;;;;;;;;;;;:87;;;3139:61;;;;;;3041:29;;3139:61;;;;;;;;;;;-1:-1:-1;3213:4:11;2926:296;;;;:::o;2321:153::-;-1:-1:-1;;;;;2444:15:11;;;2420:7;2444:15;;;:7;:15;;;;;;;;:25;;;;;;;;;;;;;2321:153::o;1060:116:7:-;1120:7;1142:8;;;;1135:16;;;;-1:-1:-1;1164:7:7;;;1060:116::o;1238:128::-;1319:7;;;1339;;;;1332:15;;;;1238:128;;;;:::o", - "source": "pragma solidity ^0.4.24;\n\nimport \"./BasicToken.sol\";\nimport \"./ERC20.sol\";\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * https://github.com/ethereum/EIPs/issues/20\n * Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(\n address _from,\n address _to,\n uint256 _value\n )\n public\n returns (bool)\n {\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n require(_to != address(0));\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n emit Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n emit Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(\n address _owner,\n address _spender\n )\n public\n view\n returns (uint256)\n {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(\n address _spender,\n uint256 _addedValue\n )\n public\n returns (bool)\n {\n allowed[msg.sender][_spender] = (\n allowed[msg.sender][_spender].add(_addedValue));\n emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(\n address _spender,\n uint256 _subtractedValue\n )\n public\n returns (bool)\n {\n uint256 oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue >= oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n", - "sourcePath": "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol", - "ast": { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol", - "exportedSymbols": { - "StandardToken": [ - 3433 - ] - }, - "id": 3434, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 3188, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:11" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/BasicToken.sol", - "file": "./BasicToken.sol", - "id": 3189, - "nodeType": "ImportDirective", - "scope": 3434, - "sourceUnit": 3112, - "src": "26:26:11", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", - "file": "./ERC20.sol", - "id": 3190, - "nodeType": "ImportDirective", - "scope": 3434, - "sourceUnit": 3155, - "src": "53:21:11", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3191, - "name": "ERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3154, - "src": "360:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$3154", - "typeString": "contract ERC20" - } - }, - "id": 3192, - "nodeType": "InheritanceSpecifier", - "src": "360:5:11" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3193, - "name": "BasicToken", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3111, - "src": "367:10:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_BasicToken_$3111", - "typeString": "contract BasicToken" - } - }, - "id": 3194, - "nodeType": "InheritanceSpecifier", - "src": "367:10:11" - } - ], - "contractDependencies": [ - 3111, - 3154, - 3186 - ], - "contractKind": "contract", - "documentation": "@title Standard ERC20 token\n * @dev Implementation of the basic standard token.\nhttps://github.com/ethereum/EIPs/issues/20\nBased on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol", - "fullyImplemented": true, - "id": 3433, - "linearizedBaseContracts": [ - 3433, - 3111, - 3154, - 3186 - ], - "name": "StandardToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 3200, - "name": "allowed", - "nodeType": "VariableDeclaration", - "scope": 3433, - "src": "383:66:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "typeName": { - "id": 3199, - "keyType": { - "id": 3195, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "392:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "383:49:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "valueType": { - "id": 3198, - "keyType": { - "id": 3196, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "412:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "403:28:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 3197, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "423:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": { - "id": 3285, - "nodeType": "Block", - "src": "840:356:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3212, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3206, - "src": "854:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3213, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "864:8:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3215, - "indexExpression": { - "argumentTypes": null, - "id": 3214, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3202, - "src": "873:5:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "864:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "854:25:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 3211, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3451, - "src": "846:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 3217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "846:34:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3218, - "nodeType": "ExpressionStatement", - "src": "846:34:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3220, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3206, - "src": "894:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3221, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "904:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3223, - "indexExpression": { - "argumentTypes": null, - "id": 3222, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3202, - "src": "912:5:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "904:14:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3226, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3224, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "919:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "919:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "904:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "894:36:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 3219, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3451, - "src": "886:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 3228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "886:45:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3229, - "nodeType": "ExpressionStatement", - "src": "886:45:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3231, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3204, - "src": "945:3:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3233, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "960:1:11", - "subdenomination": null, - "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": 3232, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "952:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3234, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "952:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "945:17:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 3230, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3451, - "src": "937:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 3236, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "937:26:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3237, - "nodeType": "ExpressionStatement", - "src": "937:26:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 3247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3238, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "970:8:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3240, - "indexExpression": { - "argumentTypes": null, - "id": 3239, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3202, - "src": "979:5:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "970:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3245, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3206, - "src": "1008:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3241, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "988:8:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3243, - "indexExpression": { - "argumentTypes": null, - "id": 3242, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3202, - "src": "997:5:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "988:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "988:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "988:27:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "970:45:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3248, - "nodeType": "ExpressionStatement", - "src": "970:45:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 3258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3249, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "1021:8:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3251, - "indexExpression": { - "argumentTypes": null, - "id": 3250, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3204, - "src": "1030:3:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1021:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3256, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3206, - "src": "1055:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3252, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "1037:8:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3254, - "indexExpression": { - "argumentTypes": null, - "id": 3253, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3204, - "src": "1046:3:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1037:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "1037:17:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1037:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1021:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3259, - "nodeType": "ExpressionStatement", - "src": "1021:41:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 3275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3260, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "1068:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3264, - "indexExpression": { - "argumentTypes": null, - "id": 3261, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3202, - "src": "1076:5:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1068:14:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3265, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3262, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "1083:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1083:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1068:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3273, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3206, - "src": "1128:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3266, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "1097:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3268, - "indexExpression": { - "argumentTypes": null, - "id": 3267, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3202, - "src": "1105:5:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1097:14:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3271, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3269, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "1112:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1112:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1097:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "1097:30:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1097:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1068:67:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3276, - "nodeType": "ExpressionStatement", - "src": "1068:67:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3278, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3202, - "src": "1155:5:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3279, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3204, - "src": "1162:3:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3280, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3206, - "src": "1167:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3277, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3185, - "src": "1146:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3281, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1146:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3282, - "nodeType": "EmitStatement", - "src": "1141:33:11" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3283, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1187:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3210, - "id": 3284, - "nodeType": "Return", - "src": "1180:11:11" - } - ] - }, - "documentation": "@dev Transfer tokens from one address to another\n@param _from address The address which you want to send tokens from\n@param _to address The address which you want to transfer to\n@param _value uint256 the amount of tokens to be transferred", - "id": 3286, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3207, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3202, - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 3286, - "src": "753:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3201, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "753:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3204, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 3286, - "src": "772:11:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3203, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "772:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3206, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 3286, - "src": "789:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3205, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "789:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "747:60:11" - }, - "payable": false, - "returnParameters": { - "id": 3210, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3209, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3286, - "src": "832:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3208, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "832:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "831:6:11" - }, - "scope": 3433, - "src": "726:470:11", - "stateMutability": "nonpayable", - "superFunction": 3136, - "visibility": "public" - }, - { - "body": { - "id": 3313, - "nodeType": "Block", - "src": "1887:115:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3295, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "1893:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3299, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3296, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "1901:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1901:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1893:19:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3300, - "indexExpression": { - "argumentTypes": null, - "id": 3298, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3288, - "src": "1913:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1893:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3301, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3290, - "src": "1925:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1893:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3303, - "nodeType": "ExpressionStatement", - "src": "1893:38:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3305, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "1951:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1951:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3307, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3288, - "src": "1963:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3308, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3290, - "src": "1973:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3304, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3153, - "src": "1942:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1942:38:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3310, - "nodeType": "EmitStatement", - "src": "1937:43:11" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3311, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1993:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3294, - "id": 3312, - "nodeType": "Return", - "src": "1986:11:11" - } - ] - }, - "documentation": "@dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\nBeware that changing an allowance with this method brings the risk that someone may use both the old\nand the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\nrace condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n@param _spender The address which will spend the funds.\n@param _value The amount of tokens to be spent.", - "id": 3314, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3291, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3288, - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 3314, - "src": "1831:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3287, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1831:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3290, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 3314, - "src": "1849:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3289, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1849:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1830:34:11" - }, - "payable": false, - "returnParameters": { - "id": 3294, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3293, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3314, - "src": "1881:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3292, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1881:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1880:6:11" - }, - "scope": 3433, - "src": "1814:188:11", - "stateMutability": "nonpayable", - "superFunction": 3145, - "visibility": "public" - }, - { - "body": { - "id": 3329, - "nodeType": "Block", - "src": "2431:43:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3323, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "2444:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3325, - "indexExpression": { - "argumentTypes": null, - "id": 3324, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3316, - "src": "2452:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2444:15:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3327, - "indexExpression": { - "argumentTypes": null, - "id": 3326, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3318, - "src": "2460:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2444:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3322, - "id": 3328, - "nodeType": "Return", - "src": "2437:32:11" - } - ] - }, - "documentation": "@dev Function to check the amount of tokens that an owner allowed to a spender.\n@param _owner address The address which owns the funds.\n@param _spender address The address which will spend the funds.\n@return A uint256 specifying the amount of tokens still available for the spender.", - "id": 3330, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3316, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 3330, - "src": "2345:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3315, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2345:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3318, - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 3330, - "src": "2365:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3317, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2365:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2339:47:11" - }, - "payable": false, - "returnParameters": { - "id": 3322, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3321, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3330, - "src": "2420:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3320, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2420:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2419:9:11" - }, - "scope": 3433, - "src": "2321:153:11", - "stateMutability": "view", - "superFunction": 3125, - "visibility": "public" - }, - { - "body": { - "id": 3371, - "nodeType": "Block", - "src": "3035:187:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3339, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "3041:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3343, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3340, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3049:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3049:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3041:19:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3344, - "indexExpression": { - "argumentTypes": null, - "id": 3342, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "3061:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3041:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3352, - "name": "_addedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3334, - "src": "3115:11:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3345, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "3081:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3348, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3346, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3089:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3089:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3081:19:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3350, - "indexExpression": { - "argumentTypes": null, - "id": 3349, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "3101:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3081:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "3081:33:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3081:46:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 3354, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3073:55:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3041:87:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3356, - "nodeType": "ExpressionStatement", - "src": "3041:87:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3358, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3148:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3148:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3360, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "3160:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3361, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "3170:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3364, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3362, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3178:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3178:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3170:19:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3366, - "indexExpression": { - "argumentTypes": null, - "id": 3365, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "3190:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3170:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3357, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3153, - "src": "3139:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3139:61:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3368, - "nodeType": "EmitStatement", - "src": "3134:66:11" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3369, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3213:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3338, - "id": 3370, - "nodeType": "Return", - "src": "3206:11:11" - } - ] - }, - "documentation": "@dev Increase the amount of tokens that an owner allowed to a spender.\napprove should be called when allowed[_spender] == 0. To increment\nallowed value is better to use this function to avoid 2 calls (and wait until\nthe first transaction is mined)\nFrom MonolithDAO Token.sol\n@param _spender The address which will spend the funds.\n@param _addedValue The amount of tokens to increase the allowance by.", - "id": 3372, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "increaseApproval", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3335, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3332, - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 3372, - "src": "2957:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3331, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2957:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3334, - "name": "_addedValue", - "nodeType": "VariableDeclaration", - "scope": 3372, - "src": "2979:19:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3333, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2979:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2951:51:11" - }, - "payable": false, - "returnParameters": { - "id": 3338, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3337, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3372, - "src": "3027:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3336, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3027:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3026:6:11" - }, - "scope": 3433, - "src": "2926:296:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3431, - "nodeType": "Block", - "src": "3793:318:11", - "statements": [ - { - "assignments": [ - 3382 - ], - "declarations": [ - { - "constant": false, - "id": 3382, - "name": "oldValue", - "nodeType": "VariableDeclaration", - "scope": 3432, - "src": "3799:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3381, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3799:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3389, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3383, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "3818:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3386, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3384, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3826:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3826:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3818:19:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3388, - "indexExpression": { - "argumentTypes": null, - "id": 3387, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3374, - "src": "3838:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3818:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3799:48:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3390, - "name": "_subtractedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3376, - "src": "3857:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3391, - "name": "oldValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3382, - "src": "3877:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3857:28:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 3415, - "nodeType": "Block", - "src": "3941:77:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3413, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3403, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "3949:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3407, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3404, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3957:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3405, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3957:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3949:19:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3408, - "indexExpression": { - "argumentTypes": null, - "id": 3406, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3374, - "src": "3969:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3949:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3411, - "name": "_subtractedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3376, - "src": "3994:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3409, - "name": "oldValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3382, - "src": "3981:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "3981:12:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3981:30:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3949:62:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3414, - "nodeType": "ExpressionStatement", - "src": "3949:62:11" - } - ] - }, - "id": 3416, - "nodeType": "IfStatement", - "src": "3853:165:11", - "trueBody": { - "id": 3402, - "nodeType": "Block", - "src": "3887:48:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3400, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3393, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "3895:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3397, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3394, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3903:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3903:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3895:19:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3398, - "indexExpression": { - "argumentTypes": null, - "id": 3396, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3374, - "src": "3915:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3895:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 3399, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3927:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3895:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3401, - "nodeType": "ExpressionStatement", - "src": "3895:33:11" - } - ] - } - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3418, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "4037:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4037:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3420, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3374, - "src": "4049:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3421, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "4059:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3424, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3422, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "4067:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4067:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4059:19:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3426, - "indexExpression": { - "argumentTypes": null, - "id": 3425, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3374, - "src": "4079:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4059:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3417, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3153, - "src": "4028:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4028:61:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3428, - "nodeType": "EmitStatement", - "src": "4023:66:11" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3429, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4102:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3380, - "id": 3430, - "nodeType": "Return", - "src": "4095:11:11" - } - ] - }, - "documentation": "@dev Decrease the amount of tokens that an owner allowed to a spender.\napprove should be called when allowed[_spender] == 0. To decrement\nallowed value is better to use this function to avoid 2 calls (and wait until\nthe first transaction is mined)\nFrom MonolithDAO Token.sol\n@param _spender The address which will spend the funds.\n@param _subtractedValue The amount of tokens to decrease the allowance by.", - "id": 3432, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "decreaseApproval", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3377, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3374, - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 3432, - "src": "3710:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3373, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3710:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3376, - "name": "_subtractedValue", - "nodeType": "VariableDeclaration", - "scope": 3432, - "src": "3732:24:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3375, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3732:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3704:56:11" - }, - "payable": false, - "returnParameters": { - "id": 3380, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3379, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3432, - "src": "3785:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3378, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3785:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3784:6:11" - }, - "scope": 3433, - "src": "3679:432:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 3434, - "src": "334:3780:11" - } - ], - "src": "0:4115:11" - }, - "legacyAST": { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol", - "exportedSymbols": { - "StandardToken": [ - 3433 - ] - }, - "id": 3434, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 3188, - "literals": [ - "solidity", - "^", - "0.4", - ".24" - ], - "nodeType": "PragmaDirective", - "src": "0:24:11" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/BasicToken.sol", - "file": "./BasicToken.sol", - "id": 3189, - "nodeType": "ImportDirective", - "scope": 3434, - "sourceUnit": 3112, - "src": "26:26:11", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", - "file": "./ERC20.sol", - "id": 3190, - "nodeType": "ImportDirective", - "scope": 3434, - "sourceUnit": 3155, - "src": "53:21:11", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3191, - "name": "ERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3154, - "src": "360:5:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$3154", - "typeString": "contract ERC20" - } - }, - "id": 3192, - "nodeType": "InheritanceSpecifier", - "src": "360:5:11" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3193, - "name": "BasicToken", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3111, - "src": "367:10:11", - "typeDescriptions": { - "typeIdentifier": "t_contract$_BasicToken_$3111", - "typeString": "contract BasicToken" - } - }, - "id": 3194, - "nodeType": "InheritanceSpecifier", - "src": "367:10:11" - } - ], - "contractDependencies": [ - 3111, - 3154, - 3186 - ], - "contractKind": "contract", - "documentation": "@title Standard ERC20 token\n * @dev Implementation of the basic standard token.\nhttps://github.com/ethereum/EIPs/issues/20\nBased on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol", - "fullyImplemented": true, - "id": 3433, - "linearizedBaseContracts": [ - 3433, - 3111, - 3154, - 3186 - ], - "name": "StandardToken", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 3200, - "name": "allowed", - "nodeType": "VariableDeclaration", - "scope": 3433, - "src": "383:66:11", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "typeName": { - "id": 3199, - "keyType": { - "id": 3195, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "392:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "383:49:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - }, - "valueType": { - "id": 3198, - "keyType": { - "id": 3196, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "412:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "403:28:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 3197, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "423:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": { - "id": 3285, - "nodeType": "Block", - "src": "840:356:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3216, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3212, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3206, - "src": "854:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3213, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "864:8:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3215, - "indexExpression": { - "argumentTypes": null, - "id": 3214, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3202, - "src": "873:5:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "864:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "854:25:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 3211, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3451, - "src": "846:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 3217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "846:34:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3218, - "nodeType": "ExpressionStatement", - "src": "846:34:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3227, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3220, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3206, - "src": "894:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3221, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "904:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3223, - "indexExpression": { - "argumentTypes": null, - "id": 3222, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3202, - "src": "912:5:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "904:14:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3226, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3224, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "919:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "919:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "904:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "894:36:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 3219, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3451, - "src": "886:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 3228, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "886:45:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3229, - "nodeType": "ExpressionStatement", - "src": "886:45:11" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3235, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3231, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3204, - "src": "945:3:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3233, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "960:1:11", - "subdenomination": null, - "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": 3232, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "952:7:11", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 3234, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "952:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "945:17:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 3230, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 3451, - 3452 - ], - "referencedDeclaration": 3451, - "src": "937:7:11", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 3236, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "937:26:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3237, - "nodeType": "ExpressionStatement", - "src": "937:26:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 3247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3238, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "970:8:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3240, - "indexExpression": { - "argumentTypes": null, - "id": 3239, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3202, - "src": "979:5:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "970:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3245, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3206, - "src": "1008:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3241, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "988:8:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3243, - "indexExpression": { - "argumentTypes": null, - "id": 3242, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3202, - "src": "997:5:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "988:15:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3244, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "988:19:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "988:27:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "970:45:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3248, - "nodeType": "ExpressionStatement", - "src": "970:45:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 3258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3249, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "1021:8:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3251, - "indexExpression": { - "argumentTypes": null, - "id": 3250, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3204, - "src": "1030:3:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1021:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3256, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3206, - "src": "1055:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3252, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "1037:8:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3254, - "indexExpression": { - "argumentTypes": null, - "id": 3253, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3204, - "src": "1046:3:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1037:13:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "1037:17:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1037:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1021:41:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3259, - "nodeType": "ExpressionStatement", - "src": "1021:41:11" - }, - { - "expression": { - "argumentTypes": null, - "id": 3275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3260, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "1068:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3264, - "indexExpression": { - "argumentTypes": null, - "id": 3261, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3202, - "src": "1076:5:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1068:14:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3265, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3262, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "1083:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3263, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1083:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1068:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3273, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3206, - "src": "1128:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3266, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "1097:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3268, - "indexExpression": { - "argumentTypes": null, - "id": 3267, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3202, - "src": "1105:5:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1097:14:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3271, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3269, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "1112:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1112:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1097:26:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3272, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "1097:30:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1097:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1068:67:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3276, - "nodeType": "ExpressionStatement", - "src": "1068:67:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3278, - "name": "_from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3202, - "src": "1155:5:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3279, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3204, - "src": "1162:3:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3280, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3206, - "src": "1167:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3277, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3185, - "src": "1146:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3281, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1146:28:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3282, - "nodeType": "EmitStatement", - "src": "1141:33:11" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3283, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1187:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3210, - "id": 3284, - "nodeType": "Return", - "src": "1180:11:11" - } - ] - }, - "documentation": "@dev Transfer tokens from one address to another\n@param _from address The address which you want to send tokens from\n@param _to address The address which you want to transfer to\n@param _value uint256 the amount of tokens to be transferred", - "id": 3286, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3207, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3202, - "name": "_from", - "nodeType": "VariableDeclaration", - "scope": 3286, - "src": "753:13:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3201, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "753:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3204, - "name": "_to", - "nodeType": "VariableDeclaration", - "scope": 3286, - "src": "772:11:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3203, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "772:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3206, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 3286, - "src": "789:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3205, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "789:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "747:60:11" - }, - "payable": false, - "returnParameters": { - "id": 3210, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3209, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3286, - "src": "832:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3208, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "832:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "831:6:11" - }, - "scope": 3433, - "src": "726:470:11", - "stateMutability": "nonpayable", - "superFunction": 3136, - "visibility": "public" - }, - { - "body": { - "id": 3313, - "nodeType": "Block", - "src": "1887:115:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3295, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "1893:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3299, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3296, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "1901:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3297, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1901:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1893:19:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3300, - "indexExpression": { - "argumentTypes": null, - "id": 3298, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3288, - "src": "1913:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1893:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3301, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3290, - "src": "1925:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1893:38:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3303, - "nodeType": "ExpressionStatement", - "src": "1893:38:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3305, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "1951:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1951:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3307, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3288, - "src": "1963:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3308, - "name": "_value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3290, - "src": "1973:6:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3304, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3153, - "src": "1942:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1942:38:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3310, - "nodeType": "EmitStatement", - "src": "1937:43:11" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3311, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1993:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3294, - "id": 3312, - "nodeType": "Return", - "src": "1986:11:11" - } - ] - }, - "documentation": "@dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\nBeware that changing an allowance with this method brings the risk that someone may use both the old\nand the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\nrace condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n@param _spender The address which will spend the funds.\n@param _value The amount of tokens to be spent.", - "id": 3314, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "approve", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3291, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3288, - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 3314, - "src": "1831:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3287, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1831:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3290, - "name": "_value", - "nodeType": "VariableDeclaration", - "scope": 3314, - "src": "1849:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3289, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1849:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1830:34:11" - }, - "payable": false, - "returnParameters": { - "id": 3294, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3293, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3314, - "src": "1881:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3292, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1881:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1880:6:11" - }, - "scope": 3433, - "src": "1814:188:11", - "stateMutability": "nonpayable", - "superFunction": 3145, - "visibility": "public" - }, - { - "body": { - "id": 3329, - "nodeType": "Block", - "src": "2431:43:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3323, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "2444:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3325, - "indexExpression": { - "argumentTypes": null, - "id": 3324, - "name": "_owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3316, - "src": "2452:6:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2444:15:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3327, - "indexExpression": { - "argumentTypes": null, - "id": 3326, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3318, - "src": "2460:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2444:25:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3322, - "id": 3328, - "nodeType": "Return", - "src": "2437:32:11" - } - ] - }, - "documentation": "@dev Function to check the amount of tokens that an owner allowed to a spender.\n@param _owner address The address which owns the funds.\n@param _spender address The address which will spend the funds.\n@return A uint256 specifying the amount of tokens still available for the spender.", - "id": 3330, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "allowance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3319, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3316, - "name": "_owner", - "nodeType": "VariableDeclaration", - "scope": 3330, - "src": "2345:14:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3315, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2345:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3318, - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 3330, - "src": "2365:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3317, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2365:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2339:47:11" - }, - "payable": false, - "returnParameters": { - "id": 3322, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3321, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3330, - "src": "2420:7:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3320, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2420:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2419:9:11" - }, - "scope": 3433, - "src": "2321:153:11", - "stateMutability": "view", - "superFunction": 3125, - "visibility": "public" - }, - { - "body": { - "id": 3371, - "nodeType": "Block", - "src": "3035:187:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3339, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "3041:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3343, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3340, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3049:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3049:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3041:19:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3344, - "indexExpression": { - "argumentTypes": null, - "id": 3342, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "3061:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3041:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3352, - "name": "_addedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3334, - "src": "3115:11:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3345, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "3081:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3348, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3346, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3089:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3347, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3089:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3081:19:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3350, - "indexExpression": { - "argumentTypes": null, - "id": 3349, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "3101:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3081:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "add", - "nodeType": "MemberAccess", - "referencedDeclaration": 3014, - "src": "3081:33:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3353, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3081:46:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 3354, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3073:55:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3041:87:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3356, - "nodeType": "ExpressionStatement", - "src": "3041:87:11" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3358, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3148:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3148:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3360, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "3160:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3361, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "3170:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3364, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3362, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3178:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3178:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3170:19:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3366, - "indexExpression": { - "argumentTypes": null, - "id": 3365, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "3190:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3170:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3357, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3153, - "src": "3139:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3139:61:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3368, - "nodeType": "EmitStatement", - "src": "3134:66:11" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3369, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3213:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3338, - "id": 3370, - "nodeType": "Return", - "src": "3206:11:11" - } - ] - }, - "documentation": "@dev Increase the amount of tokens that an owner allowed to a spender.\napprove should be called when allowed[_spender] == 0. To increment\nallowed value is better to use this function to avoid 2 calls (and wait until\nthe first transaction is mined)\nFrom MonolithDAO Token.sol\n@param _spender The address which will spend the funds.\n@param _addedValue The amount of tokens to increase the allowance by.", - "id": 3372, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "increaseApproval", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3335, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3332, - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 3372, - "src": "2957:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3331, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2957:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3334, - "name": "_addedValue", - "nodeType": "VariableDeclaration", - "scope": 3372, - "src": "2979:19:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3333, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2979:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2951:51:11" - }, - "payable": false, - "returnParameters": { - "id": 3338, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3337, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3372, - "src": "3027:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3336, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3027:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3026:6:11" - }, - "scope": 3433, - "src": "2926:296:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 3431, - "nodeType": "Block", - "src": "3793:318:11", - "statements": [ - { - "assignments": [ - 3382 - ], - "declarations": [ - { - "constant": false, - "id": 3382, - "name": "oldValue", - "nodeType": "VariableDeclaration", - "scope": 3432, - "src": "3799:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3381, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3799:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3389, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3383, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "3818:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3386, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3384, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3826:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3385, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3826:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3818:19:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3388, - "indexExpression": { - "argumentTypes": null, - "id": 3387, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3374, - "src": "3838:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3818:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3799:48:11" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3390, - "name": "_subtractedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3376, - "src": "3857:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 3391, - "name": "oldValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3382, - "src": "3877:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3857:28:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 3415, - "nodeType": "Block", - "src": "3941:77:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3413, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3403, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "3949:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3407, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3404, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3957:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3405, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3957:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3949:19:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3408, - "indexExpression": { - "argumentTypes": null, - "id": 3406, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3374, - "src": "3969:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3949:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3411, - "name": "_subtractedValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3376, - "src": "3994:16:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3409, - "name": "oldValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3382, - "src": "3981:8:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 2990, - "src": "3981:12:11", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 3412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3981:30:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3949:62:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3414, - "nodeType": "ExpressionStatement", - "src": "3949:62:11" - } - ] - }, - "id": 3416, - "nodeType": "IfStatement", - "src": "3853:165:11", - "trueBody": { - "id": 3402, - "nodeType": "Block", - "src": "3887:48:11", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3400, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3393, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "3895:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3397, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3394, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "3903:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3395, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3903:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3895:19:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3398, - "indexExpression": { - "argumentTypes": null, - "id": 3396, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3374, - "src": "3915:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3895:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 3399, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3927:1:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3895:33:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3401, - "nodeType": "ExpressionStatement", - "src": "3895:33:11" - } - ] - } - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3418, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "4037:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4037:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3420, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3374, - "src": "4049:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3421, - "name": "allowed", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3200, - "src": "4059:7:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 3424, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3422, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3448, - "src": "4067:3:11", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4067:10:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4059:19:11", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3426, - "indexExpression": { - "argumentTypes": null, - "id": 3425, - "name": "_spender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3374, - "src": "4079:8:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4059:29:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3417, - "name": "Approval", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3153, - "src": "4028:8:11", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4028:61:11", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3428, - "nodeType": "EmitStatement", - "src": "4023:66:11" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3429, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4102:4:11", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 3380, - "id": 3430, - "nodeType": "Return", - "src": "4095:11:11" - } - ] - }, - "documentation": "@dev Decrease the amount of tokens that an owner allowed to a spender.\napprove should be called when allowed[_spender] == 0. To decrement\nallowed value is better to use this function to avoid 2 calls (and wait until\nthe first transaction is mined)\nFrom MonolithDAO Token.sol\n@param _spender The address which will spend the funds.\n@param _subtractedValue The amount of tokens to decrease the allowance by.", - "id": 3432, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "decreaseApproval", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 3377, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3374, - "name": "_spender", - "nodeType": "VariableDeclaration", - "scope": 3432, - "src": "3710:16:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3373, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3710:7:11", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3376, - "name": "_subtractedValue", - "nodeType": "VariableDeclaration", - "scope": 3432, - "src": "3732:24:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3375, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3732:7:11", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3704:56:11" - }, - "payable": false, - "returnParameters": { - "id": 3380, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3379, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 3432, - "src": "3785:4:11", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3378, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3785:4:11", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3784:6:11" - }, - "scope": 3433, - "src": "3679:432:11", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 3434, - "src": "334:3780:11" - } - ], - "src": "0:4115:11" - }, - "compiler": { - "name": "solc", - "version": "0.4.24+commit.e67f0147.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "2.0.0", - "updatedAt": "2018-10-10T12:57:03.071Z" -} \ No newline at end of file diff --git a/test/healthcheck_test.js b/test/healthcheck_test.js deleted file mode 100644 index 030804a6..00000000 --- a/test/healthcheck_test.js +++ /dev/null @@ -1,61 +0,0 @@ -const tree = require('./test_tree').TEST_TREE.healthcheck; -const assert = require('assert'); -const testBuilder = require('./testUtils/quickBuilderUtil'); -const testUtils = require('./testUtils/utils'); -const noLoggerOpts = { - bOpts : { - withLogger : false, - }, - pOpts : { - withLogger : false, - }, -}; - -const stopTest = async (peers,bNodeController,bNodeCoreServer,resolve)=>{ - let pPaths = peers.map(p=>{ - return p.tasksDbPath; - }); - for(let i=0;i { - let peersNum = 7; - // init nodes - let {peers,bNode} = await testBuilder.createN(peersNum,noLoggerOpts); - await testUtils.sleep(4000); - let bNodeController = bNode.mainController; - let bNodeCoreServer = bNode.coreServer; - // start the tested node - const testPeer = await testBuilder.createNode({withEth : true}); - await testUtils.sleep(1000); - - await testPeer.mainController.getNode().asyncTryConsistentDiscovery(); - let hc = await testPeer.mainController.healthCheck(); - // assertion checks - assert.strictEqual(hc.status, true); - - assert.strictEqual(hc.connection.outbound, 8); - assert.strictEqual(hc.connection.status, true); - - assert.strictEqual(hc.core.status, true); - assert.strictEqual(hc.core.registrationParams.signKey.length, 42); - assert.strictEqual(hc.ethereum.status, true); - - assert.strictEqual(Object.keys(hc.state.missing).length, 0); - assert.strictEqual(hc.state.status, true); - - // STOP EVERYTHING - peers.push(testPeer); - await stopTest(peers,bNodeController,bNodeCoreServer,resolve); - }) -}); diff --git a/test/init_worker_test.js b/test/init_worker_test.js index e4f0dfd5..e3354a9b 100644 --- a/test/init_worker_test.js +++ b/test/init_worker_test.js @@ -61,7 +61,6 @@ it('#1 run init and healthCheck', async function() { const testPeer = await testBuilder.createNode({withEth : true, ethWorkerAddress: workerAddress, stateful: true}); await testUtils.sleep(1000); - const controller = testPeer.mainController; const coreServer = testPeer.coreServer; let noTipsReceiver = []; @@ -69,20 +68,20 @@ it('#1 run init and healthCheck', async function() { await bNodeController.getNode().asynctryAnnounce(); coreServer.setReceiverTips(noTipsReceiver); await testPeer.mainController.getNode().asyncInitializeWorkerProcess({amount: 50000}); - // await testUtils.sleep(2000); - let hc = await testPeer.mainController.healthCheck(); + // assertion checks - assert.strictEqual(hc.status, true); + // we check what was previously the health check: + // receiving the registration params + checking the missing states + + let coreUri = testPeer.mainController.getIpcClient().getUri(); + let regParams = await testPeer.mainController.getNode().asyncGetRegistrationParams(); - assert.strictEqual(hc.connection.outbound, 8); - assert.strictEqual(hc.connection.status, true); + assert.strictEqual(coreUri != null, true); + assert.strictEqual(regParams.result.signingKey.length, 42); - assert.strictEqual(hc.core.status, true); - assert.strictEqual(hc.core.registrationParams.signKey.length, 42); - assert.strictEqual(hc.ethereum.status, true); + let missingStates = await testPeer.mainController.getNode().asyncIdentifyMissingStates(); - assert.strictEqual(Object.keys(hc.state.missing).length, 0); - assert.strictEqual(hc.state.status, true); + assert.strictEqual(Object.keys(missingStates["missingStatesMap"]).length, 0); // STOP EVERYTHING peers.push(testPeer); diff --git a/test/jsonrpc_advanced_test.js b/test/jsonrpc_advanced_test.js index 5322fa77..d43270e6 100644 --- a/test/jsonrpc_advanced_test.js +++ b/test/jsonrpc_advanced_test.js @@ -44,8 +44,6 @@ describe('jsonrpc_advanced',()=>{ let bNodeCoreServer = bNode.coreServer; let peerController = peer.mainController; let peerCoreServer = peer.coreServer; - let pPath = peer.tasksDbPath; - let bPath = bNode.tasksDbPath; // stop the test const stopTest = async ()=>{ await peerController.shutdownSystem(); @@ -53,8 +51,6 @@ describe('jsonrpc_advanced',()=>{ await bNodeController.shutdownSystem(); bNodeCoreServer.disconnect(); principalMock.destroy(principalServer); - // await testUtils.rm_Minus_Rf(pPath); - // await testUtils.rm_Minus_Rf(bPath); resolve(); }; const client = jayson.client.http('http://localhost:3346'); @@ -63,7 +59,7 @@ describe('jsonrpc_advanced',()=>{ const deployInput = await getDeployRequest(signKey); client.request('deploySecretContract',deployInput,async (err,res)=>{ assert.strictEqual(true,res.result.sendTaskResult, "sendTaskResult not true"); - await testUtils.sleep(5000); + await testUtils.sleep(1000); client.request('getTaskStatus' , {"workerAddress":deployInput.workerAddress,"taskId":deployInput.contractAddress, "withResult" : true}, async (err,res)=>{ @@ -98,16 +94,12 @@ describe('jsonrpc_advanced',()=>{ let bNodeCoreServer = bNode.coreServer; let peerController = peer.mainController; let peerCoreServer = peer.coreServer; - let pPath = peer.tasksDbPath; - let bPath = bNode.tasksDbPath; // stop the test const stopTest = async ()=>{ await peerController.shutdownSystem(); peerCoreServer.disconnect(); await bNodeController.shutdownSystem(); bNodeCoreServer.disconnect(); - // await testUtils.rm_Minus_Rf(pPath); - // await testUtils.rm_Minus_Rf(bPath); principalMock.destroy(principalServer); resolve(); }; @@ -117,7 +109,7 @@ describe('jsonrpc_advanced',()=>{ const deployInput = await getDeployRequest(signKey); client.request('deploySecretContract',deployInput,async (err,res)=>{ assert.strictEqual(true,res.result.sendTaskResult, "sendTaskResult not true"); - await testUtils.sleep(5000); + await testUtils.sleep(1000); client.request('getTaskResult', {"taskId":deployInput.contractAddress}, async (err,res)=>{ @@ -133,6 +125,114 @@ describe('jsonrpc_advanced',()=>{ }); }); }); + + it('#3 Should computeTask and GetTaskResult endpoint', async function(){ + if(!tree['all'] || !tree['#3']){ + this.skip(); + } + return new Promise(async resolve => { + // create all the boring stuff + const principalServer = principalMock.create(getStateKeysCallback); + await testUtils.sleep(150); + const principalPort = principalMock.getPort(principalServer); + const uri = 'http://127.0.0.1:'; + + let {bNode,peer} = await testBuilder.createTwo({ + bOpts:{withProxy : true,proxyPort : 3346,withLogger : false}, + pOpts :{withLogger : false, principalUri :uri + principalPort}}); + + await testUtils.sleep(3000); + let bNodeController = bNode.mainController; + let bNodeCoreServer = bNode.coreServer; + let peerController = peer.mainController; + let peerCoreServer = peer.coreServer; + // stop the test + const stopTest = async ()=>{ + await peerController.shutdownSystem(); + peerCoreServer.disconnect(); + await bNodeController.shutdownSystem(); + bNodeCoreServer.disconnect(); + principalMock.destroy(principalServer); + resolve(); + }; + const client = jayson.client.http('http://localhost:3346'); + let signKey = await peerController.getNode().selfSubscribeAction(); + await testUtils.sleep(1000); + const computeInput = await getComputeRequest(signKey); + client.request('sendTaskInput',computeInput,async (err,res)=>{ + assert.strictEqual(true, res.result.sendTaskResult, "sendTaskResult not true"); + await testUtils.sleep(1000); + client.request('getTaskResult', + {"taskId":computeInput.taskId}, + async (err,res)=>{ + if(err) assert.strictEqual(true,false,"err" + err); + let status = res.result.result.status; + let output = res.result.result.output; + assert.strictEqual(constants.TASK_STATUS.SUCCESS, status, "result not success"); + // the output result comes from core_mock hardcoded data which might brake in the future + assert.deepStrictEqual(MockCoreServer.GET_COMPUTE_OUTPUT_MOCK, output, "output don't match"); + await stopTest(); + }); + }); + }); + }); + + it('#4 Should computeTask and GetTaskResult endpoint, combined with PTT', async function(){ + if(!tree['all'] || !tree['#4']){ + this.skip(); + } + return new Promise(async resolve => { + // create all the boring stuff + const principalServer = principalMock.create(getStateKeysCallback); + await testUtils.sleep(150); + const principalPort = principalMock.getPort(principalServer); + const uri = 'http://127.0.0.1:'; + + let {bNode,peer} = await testBuilder.createTwo({ + bOpts:{withProxy : true,proxyPort : 3346,withLogger : false}, + pOpts :{withLogger : false, principalUri :uri + principalPort}}); + + await testUtils.sleep(3000); + let bNodeController = bNode.mainController; + let bNodeCoreServer = bNode.coreServer; + let peerController = peer.mainController; + let peerCoreServer = peer.coreServer; + // stop the test + const stopTest = async ()=>{ + await peerController.shutdownSystem(); + peerCoreServer.disconnect(); + await bNodeController.shutdownSystem(); + bNodeCoreServer.disconnect(); + principalMock.destroy(principalServer); + resolve(); + }; + const client = jayson.client.http('http://localhost:3346'); + let signKey = await peerController.getNode().selfSubscribeAction(); + await testUtils.sleep(1000); + peerController.getNode().principal().startPTT(); + const computeInput = await getComputeRequest(signKey); + peerController.getNode().principal().on(constants.PTT_END_EVENT, async ()=> { + await testUtils.sleep(1000); + client.request('getTaskResult', + {"taskId":computeInput.taskId}, + async (err,res)=>{ + if(err) assert.strictEqual(true,false,"err" + err); + let status = res.result.result.status; + let output = res.result.result.output; + assert.strictEqual(constants.TASK_STATUS.SUCCESS, status, "result not success"); + // the output result comes from core_mock hardcoded data which might brake in the future + assert.deepStrictEqual(MockCoreServer.GET_COMPUTE_OUTPUT_MOCK, output, "output don't match"); + // assert.strictEqual(deployInput.preCode,res.result.output, "output don't match"); + await stopTest(); + }); + }); + client.request('sendTaskInput',computeInput,async (err,res)=>{ + assert.strictEqual(true, res.result.sendTaskResult, "sendTaskResult not true"); + await testUtils.sleep(1000); + peerController.getNode().principal().onPTTEnd(); + }); + }); + }); }); async function getDeployRequest(signKey){ @@ -147,3 +247,14 @@ async function getDeployRequest(signKey){ userDHKey : '5587fbc96b01bfe6482bf9361a08e84810afcc0b1af72a8e4520f98771ea1080681e8a2f9546e5924e18c047fa948591dba098bffaced50f97a41b0050bdab99', }; } + +function getComputeRequest(signKey){ + return { + taskId : '9980b216c78f20a2755240a73b7903825db9a6f985bcce798381aef58d740521', + contractAddress : '4409b216c78f20a2755240a73b7903825db9a6f985bcce798381aef58d740521', + workerAddress : signKey, + encryptedFn : 'be3e4462e79ccdf05b02e0921731c5f9dc8dce554b861cf5a05a5162141d63e1f4b1fac190828367052b198857aba9e10cdad79d95', + encryptedArgs : 'fd50f5f6cd8b7e2b30547e70a84b61faaebf445927b70a743f23bf10342da00b7d8a20948c6c3aec7c54edba52298d90', + userDHKey : '5587fbc96b01bfe6482bf9361a08e84810afcc0b1af72a8e4520f98771ea1080681e8a2f9546e5924e18c047fa948591dba098bffaced50f97a41b0050bdab99', + }; +} diff --git a/test/principal_test.js b/test/principal_test.js index ea870470..04307d08 100644 --- a/test/principal_test.js +++ b/test/principal_test.js @@ -7,6 +7,7 @@ const PrincipalNode = require('../src/worker/handlers/PrincipalNode'); const MsgPrincipal = require('../src/policy/p2p_messages/principal_messages'); const MockCoreServer = require('../src/core/core_server_mock/core_server'); const constants = require('../src/common/constants'); +const Logger = require('../src//common/logger'); const expect = require('expect'); const fakeResponse = '0061d93b5412c0c9'; @@ -79,6 +80,31 @@ it('#2 Should Simulate the principal node and run GetStateKeysAction', async fun }); }); +it('#3 Should test PTT flag', async function() { + const tree = TEST_TREE.principal; + if (!tree['all'] || !tree['#3']) { + this.skip(); + } + return new Promise(async (resolve) => { + const dummyPort = 100; // will not be used, just for initializing + const logger = new Logger({'cli': false}); + const principalClient = new PrincipalNode({uri: uri + dummyPort}, logger); + + principalClient.on(constants.PTT_END_EVENT, ()=> { + expect(principalClient.isInPTT()).toEqual(false); + resolve(); + }); + + let res = principalClient.startPTT(); + expect(res).toEqual(true); + expect(principalClient.isInPTT()).toEqual(true); + res = principalClient.startPTT(); + expect(res).toEqual(false); + expect(principalClient.isInPTT()).toEqual(true); + principalClient.onPTTEnd(); + }); +}); + function getStateKeysCallback(args, callback) { if (args.data && args.sig) { receivedRequest = true; diff --git a/test/tasks/task_test.js b/test/tasks/task_test.js index ae29d48d..3421b779 100644 --- a/test/tasks/task_test.js +++ b/test/tasks/task_test.js @@ -42,7 +42,7 @@ it('#1 Should test computeTask', function(done){ task.setFailedStatus().getStatus(),'status not failure'); assert.strictEqual(userTaskId,task.getTaskId(),'taskId dont match'); - assert.strictEqual(encryptedArgs,task.getEncyptedArgs(),'encArgs dont match'); + assert.strictEqual(encryptedArgs,task.getEncryptedArgs(),'encArgs dont match'); assert.strictEqual(encryptedFn,task.getEncryptedFn(),'encFn dont match'); assert.strictEqual(userPubKey,task.getUserDHKey(),'userKey dont match'); assert.strictEqual(gasLimit,task.getGasLimit(),'gasLimit dont match'); @@ -78,7 +78,7 @@ it('#2 Should test DeployTask', function(done){ task.setFailedStatus().getStatus(),'status not failure'); assert.strictEqual(userTaskId,task.getTaskId(),'taskId dont match'); - assert.strictEqual(encryptedArgs,task.getEncyptedArgs(),'encArgs dont match'); + assert.strictEqual(encryptedArgs,task.getEncryptedArgs(),'encArgs dont match'); assert.strictEqual(encryptedFn,task.getEncryptedFn(),'encFn dont match'); assert.strictEqual(userPubKey,task.getUserDHKey(),'userKey dont match'); assert.strictEqual(gasLimit,task.getGasLimit(),'gasLimit dont match'); diff --git a/test/test_tree.js b/test/test_tree.js index 5d502742..9b1344e6 100644 --- a/test/test_tree.js +++ b/test/test_tree.js @@ -74,6 +74,8 @@ module.exports.TEST_TREE = { 'all' : true, '#1' : true, '#2' : true, + '#3' : true, + '#4' : true, }, 'actions_tests':{ 'all' : true, @@ -85,6 +87,7 @@ module.exports.TEST_TREE = { 'all' : true, '#1' : true, '#2' : true, + '#3' : true, }, 'verifier':{ 'all' : true, @@ -131,6 +134,10 @@ module.exports.TEST_TREE = { '#41' : true, '#42' : true, '#43' : true, + '#44' : true, + '#45' : true, + '#46' : true, + '#47' : true, }, 'ethereum_integration':{ 'all' : true, @@ -149,10 +156,6 @@ module.exports.TEST_TREE = { '#2' : true, '#3' : true, }, - 'healthcheck' : { - 'all' : true, - '#1' : true, - }, 'init_worker' : { 'all' : true, '#1' : true, diff --git a/test/verifier_test.js b/test/verifier_test.js index f312af86..0eae3b8e 100644 --- a/test/verifier_test.js +++ b/test/verifier_test.js @@ -43,7 +43,7 @@ describe('Verifier tests', function() { apiMock.setTaskParams(taskId, blockNumber, status, null, null, null); } - res = await verifier.verifyTaskSubmission(task, contractAddress, null); + res = await verifier.verifyTaskSubmission(task, 0, contractAddress, null); assert.strictEqual(res.isVerified, true); assert.strictEqual(res.error, null); @@ -54,7 +54,7 @@ describe('Verifier tests', function() { else { apiMock.setContractParams(taskId, outputHash, [web3Utils.randomHex(32)]); } - res = await verifier.verifyTaskSubmission(task, contractAddress, null); + res = await verifier.verifyTaskSubmission(task, 0, contractAddress, null); assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); @@ -65,7 +65,7 @@ describe('Verifier tests', function() { else { apiMock.setContractParams(taskId, outputHash, [web3Utils.randomHex(32), web3Utils.randomHex(32), deltaHash]); } - res = await verifier.verifyTaskSubmission(task, contractAddress, null); + res = await verifier.verifyTaskSubmission(task, 0, contractAddress, null); assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); @@ -76,7 +76,7 @@ describe('Verifier tests', function() { else { apiMock.setContractParams(contractAddress, web3Utils.randomHex(32), [deltaHash]); } - res = await verifier.verifyTaskSubmission(task, contractAddress, null); + res = await verifier.verifyTaskSubmission(task, 0, contractAddress, null); assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); @@ -88,12 +88,12 @@ describe('Verifier tests', function() { else { apiMock.setTaskParams(taskId, blockNumber, status, null, null, null); } - res = await verifier.verifyTaskSubmission(task, contractAddress, null); + res = await verifier.verifyTaskSubmission(task, 0, contractAddress, null); assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskFailedErr, true); task = new FailedResult(taskId, constants.TASK_STATUS.FAILED, output, 5, "signature"); - res = await verifier.verifyTaskSubmission(task, contractAddress, null); + res = await verifier.verifyTaskSubmission(task, 0, contractAddress, null); assert.strictEqual(res.isVerified, true); assert.strictEqual(res.error, null); @@ -103,38 +103,13 @@ describe('Verifier tests', function() { task = new DeployResult(taskId, constants.TASK_STATUS.UNVERIFIED, output, {data: delta, key: 4}, 5, "ethereumPayload", "ethereumAddress", "signature", "preCodeHash"); apiMock.setTaskParams(taskId, blockNumber, status, null, null, null); - res = await verifier.verifyTaskSubmission(task, taskId, null); - assert.strictEqual(res.isVerified, false); - assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); - } - - // No output - status = constants.ETHEREUM_TASK_STATUS.RECEIPT_VERIFIED; - if (isComputeTask) { - task = new ComputeResult(taskId, constants.TASK_STATUS.UNVERIFIED, null, {data: delta, key: 1}, - 5, "ethereumPayload", "ethereumAddress", "signature"); - - apiMock.setContractParams(contractAddress, null, [web3Utils.randomHex(32), deltaHash]); - apiMock.setTaskParams(taskId, blockNumber, status, null, null, constants.ETHEREUM_EMPTY_HASH); - // ok - res = await verifier.verifyTaskSubmission(task, contractAddress, null); - assert.strictEqual(res.isVerified, true); - assert.strictEqual(res.error, null); - } - else { - task = new DeployResult(taskId, constants.TASK_STATUS.UNVERIFIED, null, {data: delta, key: 0}, - 5, "ethereumPayload", "ethereumAddress", "signature", "preCodeHash"); - - contractAddress = taskId; - apiMock.setContractParams(contractAddress, outputHash, [deltaHash]); - apiMock.setTaskParams(taskId, blockNumber, status, null, null, constants.ETHEREUM_EMPTY_HASH); - // error - res = await verifier.verifyTaskSubmission(task, taskId, null); + res = await verifier.verifyTaskSubmission(task, 0, taskId, null); assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); } // No Delta + status = constants.ETHEREUM_TASK_STATUS.RECEIPT_VERIFIED; if (isComputeTask) { task = new ComputeResult(taskId, constants.TASK_STATUS.UNVERIFIED, output, 5, "ethereumPayload", "ethereumAddress", "signature"); @@ -142,27 +117,17 @@ describe('Verifier tests', function() { apiMock.setContractParams(contractAddress, null, [deltaHash]); apiMock.setTaskParams(taskId, blockNumber, status, null, null, outputHash); // ok - res = await verifier.verifyTaskSubmission(task, contractAddress, {key:0, data:delta}); - assert.strictEqual(res.isVerified, true); - assert.strictEqual(res.error, null); - // and no output - task = new ComputeResult(taskId, constants.TASK_STATUS.UNVERIFIED, null, - 5, "ethereumPayload", "ethereumAddress", "signature"); - - apiMock.setContractParams(contractAddress, null, [deltaHash]); - apiMock.setTaskParams(taskId, blockNumber, status, null, null, constants.ETHEREUM_EMPTY_HASH); - // ok - res = await verifier.verifyTaskSubmission(task, contractAddress, {key:0, data:delta}); + res = await verifier.verifyTaskSubmission(task, 0, contractAddress, {key:0, data:delta}); assert.strictEqual(res.isVerified, true); assert.strictEqual(res.error, null); // wrong key of localTip - res = await verifier.verifyTaskSubmission(task, contractAddress, {key:3, data:delta}); + res = await verifier.verifyTaskSubmission(task, 0, contractAddress, {key:3, data:delta}); assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); // wrong delta of localTip - res = await verifier.verifyTaskSubmission(task, contractAddress, {key:0, data:web3Utils.randomHex(32)}); + res = await verifier.verifyTaskSubmission(task, 0, contractAddress, {key:0, data:web3Utils.randomHex(32)}); assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); } @@ -174,16 +139,42 @@ describe('Verifier tests', function() { apiMock.setContractParams(contractAddress, outputHash, [deltaHash]); apiMock.setTaskParams(taskId, blockNumber, status, null, null, outputHash); // error - res = await verifier.verifyTaskSubmission(task, taskId, null); + res = await verifier.verifyTaskSubmission(task, 0, taskId, null); assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); } + + // status == RECEIPT_FAILED_ETH + status = constants.ETHEREUM_TASK_STATUS.RECEIPT_FAILED_ETH; + if (isComputeTask) { + apiMock.setTaskParams(taskId, blockNumber, status, null, null, outputHash); + } + else { + apiMock.setTaskParams(taskId, blockNumber, status, null, null, null); + } + res = await verifier.verifyTaskSubmission(task, 0, contractAddress, null); + assert.strictEqual(res.isVerified, false); + assert.strictEqual(res.error instanceof errors.TaskEthereumFailureErr, true); + + // status == RECEIPT_FAILED_CANCELLED + status = constants.ETHEREUM_TASK_STATUS.RECEIPT_FAILED_CANCELLED; + if (isComputeTask) { + apiMock.setTaskParams(taskId, blockNumber, status, null, null, outputHash); + } + else { + apiMock.setTaskParams(taskId, blockNumber, status, null, null, null); + } + res = await verifier.verifyTaskSubmission(task, 0, contractAddress, null); + assert.strictEqual(res.isVerified, false); + assert.strictEqual(res.error instanceof errors.TaskValidityErr, true); } async function initStuffForTaskSubmission() { let taskData = testUtils.createDataForTaskSubmission(); const logger = new Logger(); const ethereumAPI = new EthereumAPIMock(logger); + ethereumAPI.api().setTaskTimeout(100); + ethereumAPI.api().setEthereumBlockNumber(100); await ethereumAPI.init(); return defaultsDeep({apiMock: ethereumAPI.api(), services: ethereumAPI.services(), verifier: ethereumAPI.verifier()}, taskData); @@ -196,6 +187,8 @@ describe('Verifier tests', function() { const ethereumAPI = new EthereumAPIMock(logger); ethereumAPI.api().setEpochSize(epochSize); ethereumAPI.api().setWorkerParams(Array.from(params)); + ethereumAPI.api().setTaskTimeout(100); + ethereumAPI.api().setEthereumBlockNumber(100); await ethereumAPI.init(); return {apiMock: ethereumAPI.api(), services: ethereumAPI.services(), verifier: ethereumAPI.verifier(), params: params, expectedAddress: expectedAddress, @@ -240,7 +233,7 @@ describe('Verifier tests', function() { // ok a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, a.taskId, null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, a.taskId, null).then( (res)=> { assert.strictEqual(res.isVerified, true); assert.strictEqual(res.error, null); resolve(); @@ -265,7 +258,7 @@ describe('Verifier tests', function() { // ok a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, a.taskId, null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, a.taskId, null).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); resolve(); @@ -289,7 +282,7 @@ describe('Verifier tests', function() { let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, a.taskId, null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, a.taskId, null).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); resolve(); @@ -312,7 +305,7 @@ describe('Verifier tests', function() { let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, a.taskId, null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, a.taskId, null).then( (res)=> { assert.strictEqual(res.isVerified, true); assert.strictEqual(res.error , null); resolve(); @@ -335,7 +328,7 @@ describe('Verifier tests', function() { let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, a.taskId, null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, a.taskId, null).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskValidityErr, true); resolve(); @@ -359,7 +352,7 @@ describe('Verifier tests', function() { let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, a.taskId, null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, a.taskId, null).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskFailedErr, true); resolve(); @@ -383,7 +376,7 @@ describe('Verifier tests', function() { let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, a.taskId, null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, a.taskId, null).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskValidityErr, true); resolve(); @@ -410,7 +403,7 @@ describe('Verifier tests', function() { // ok a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, "40", null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, "40", null).then( (res)=> { assert.strictEqual(res.isVerified, true); assert.strictEqual(res.error, null); resolve(); @@ -436,7 +429,7 @@ describe('Verifier tests', function() { // ok a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, "40", null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, "40", null).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); resolve(); @@ -461,7 +454,7 @@ describe('Verifier tests', function() { let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, "40", null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, "40", null).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); resolve(); @@ -484,7 +477,7 @@ describe('Verifier tests', function() { let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, "40", null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, "40", null).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskValidityErr, true); resolve(); @@ -508,7 +501,7 @@ describe('Verifier tests', function() { let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, "40", null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, "40", null).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskFailedErr, true); resolve(); @@ -532,7 +525,7 @@ describe('Verifier tests', function() { let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, "40", null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, "40", null).then( (res)=> { // SHOULD FAIL IF GETS HERE assert.strictEqual(true, false); }); @@ -557,7 +550,7 @@ describe('Verifier tests', function() { let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, "40", null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, "40", null).then( (res)=> { // SHOULD FAIL IF GETS HERE assert.strictEqual(true, false); }); @@ -653,7 +646,7 @@ describe('Verifier tests', function() { let inputsHash = cryptography.hashArray([a.encryptedFn, a.encryptedArgs, cryptography.hash(a.preCode), a.userDHKey]); a.apiMock.setTaskParams(a.secretContractAddress, blockNumber, status, a.gasLimit, inputsHash); - a.verifier.verifyTaskCreation(task, a.expectedAddress).then( (res)=> { + a.verifier.verifyTaskCreation(task, blockNumber, a.expectedAddress).then( (res)=> { assert.strictEqual(res.isVerified, true); assert.strictEqual(res.error, null); assert.strictEqual(res.gasLimit, a.gasLimit); @@ -679,7 +672,7 @@ describe('Verifier tests', function() { let inputsHash = cryptography.hashArray([a.encryptedFn, a.encryptedArgs, cryptography.hash(a.preCode), a.userDHKey]); a.apiMock.setTaskParams(a.secretContractAddress, blockNumber, status, a.gasLimit, inputsHash); - a.verifier.verifyTaskCreation(task, web3Utils.toChecksumAddress(web3Utils.randomHex(20))).then( (res)=> { + a.verifier.verifyTaskCreation(task, blockNumber, web3Utils.toChecksumAddress(web3Utils.randomHex(20))).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.WorkerSelectionVerificationErr, true); resolve(); @@ -703,7 +696,7 @@ describe('Verifier tests', function() { let inputsHash = cryptography.hashArray([a.encryptedFn, a.encryptedArgs, cryptography.hash(a.preCode), a.userDHKey]); a.apiMock.setTaskParams(a.secretContractAddress, blockNumber, status, a.gasLimit, inputsHash); - a.verifier.verifyTaskCreation(task, a.expectedAddress).then( (res)=> { + a.verifier.verifyTaskCreation(task, blockNumber, a.expectedAddress).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskValidityErr, true); resolve(); @@ -727,7 +720,7 @@ describe('Verifier tests', function() { let inputsHash = cryptography.hashArray([a.encryptedFn, a.encryptedArgs, cryptography.hash(a.preCode), a.userDHKey]); a.apiMock.setTaskParams(a.secretContractAddress, blockNumber, status, a.gasLimit, inputsHash); - a.verifier.verifyTaskCreation(task, a.expectedAddress).then( (res)=> { + a.verifier.verifyTaskCreation(task, blockNumber, a.expectedAddress).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskValidityErr, true); resolve(); @@ -749,7 +742,7 @@ describe('Verifier tests', function() { let inputsHash = cryptography.hashArray([a.encryptedFn, a.encryptedArgs, cryptography.hash(a.preCode), a.userDHKey]); a.apiMock.setTaskParams(a.secretContractAddress,0, status, a.gasLimit, inputsHash); - a.verifier.verifyTaskCreation(task, a.expectedAddress).then( (res)=> { + a.verifier.verifyTaskCreation(task, blockNumber, a.expectedAddress).then( (res)=> { assert.strictEqual(res.isVerified, true); assert.strictEqual(res.error , null); assert.strictEqual(res.gasLimit , a.gasLimit); @@ -762,7 +755,8 @@ describe('Verifier tests', function() { }); }); - it('Good deploy task creation pre-mined 2', async function() { + + it('Deploy task creation cancellation', async function() { const tree = TEST_TREE.verifier; if (!tree['all'] || !tree['#22']) { this.skip(); @@ -770,25 +764,20 @@ describe('Verifier tests', function() { return new Promise(async function(resolve) { let a = await initStuffForTaskCreation(); + let blockNumber = a.expectedParams.firstBlockNumber + 50; let task = new DeployTask(a.secretContractAddress, a.preCode, a.encryptedArgs, a.encryptedFn, a.userDHKey, a.gasLimit, a.secretContractAddress, 0); let status = constants.ETHEREUM_TASK_STATUS.RECORD_UNDEFINED; let inputsHash = cryptography.hashArray([a.encryptedFn, a.encryptedArgs, cryptography.hash(a.preCode), a.userDHKey]); - let blockNumber = a.expectedParams.firstBlockNumber + 50; a.apiMock.setTaskParams(a.secretContractAddress,0, status, a.gasLimit, inputsHash); - a.verifier.verifyTaskCreation(task, a.expectedAddress).then( (res)=> { - assert.strictEqual(res.isVerified, true); - assert.strictEqual(res.error , null); - assert.strictEqual(res.blockNumber , blockNumber); - assert.strictEqual(res.gasLimit , a.gasLimit); + a.verifier.verifyTaskCreation(task, blockNumber, a.expectedAddress).then( (res)=> { + assert.strictEqual(res.isVerified, false); + assert.strictEqual(res.error instanceof errors.TaskCancelledErr, true); resolve(); }); - - let event = {tasks: {}}; - event.tasks[a.secretContractAddress] = {taskId: a.secretContractAddress, inputsHash: inputsHash, gasLimit: a.gasLimit, blockNumber: blockNumber}; - event.tasks[web3Utils.randomHex(32)] = {taskId: a.secretContractAddress, inputsHash: inputsHash, gasLimit: a.gasLimit, blockNumber: blockNumber}; - a.apiMock.triggerEvent('TaskRecordsCreated', event); + const event = {taskId: a.secretContractAddress}; + a.apiMock.triggerEvent('TaskFeeReturned', event); }); }); @@ -808,7 +797,7 @@ describe('Verifier tests', function() { let inputsHash = cryptography.hashArray([a.encryptedFn, a.encryptedArgs, a.secretContractAddress, a.userDHKey]); a.apiMock.setTaskParams(a.taskId, blockNumber, status, a.gasLimit, inputsHash); - a.verifier.verifyTaskCreation(task, a.expectedAddress).then( (res)=> { + a.verifier.verifyTaskCreation(task, blockNumber, a.expectedAddress).then( (res)=> { assert.strictEqual(res.isVerified, true); assert.strictEqual(res.error, null); assert.strictEqual(res.blockNumber , blockNumber); @@ -834,7 +823,7 @@ describe('Verifier tests', function() { let inputsHash = cryptography.hashArray([a.encryptedFn, a.encryptedArgs,otherAddress, a.userDHKey]); a.apiMock.setTaskParams(a.taskId, blockNumber, status, a.gasLimit, inputsHash); - a.verifier.verifyTaskCreation(task, web3Utils.toChecksumAddress(web3Utils.randomHex(20))).then( (res)=> { + a.verifier.verifyTaskCreation(task, blockNumber, web3Utils.toChecksumAddress(web3Utils.randomHex(20))).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.WorkerSelectionVerificationErr, true); resolve(); @@ -857,7 +846,7 @@ describe('Verifier tests', function() { let inputsHash = cryptography.hashArray([a.encryptedFn, a.encryptedArgs, a.secretContractAddress, a.userDHKey]); a.apiMock.setTaskParams(a.taskId, blockNumber, status, a.gasLimit, inputsHash); - a.verifier.verifyTaskCreation(task, a.expectedAddress).then( (res)=> { + a.verifier.verifyTaskCreation(task, blockNumber, a.expectedAddress).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskValidityErr, true); resolve(); @@ -880,7 +869,7 @@ describe('Verifier tests', function() { let inputsHash = cryptography.hashArray([a.encryptedFn, a.encryptedArgs, a.secretContractAddress, a.userDHKey]); a.apiMock.setTaskParams(a.taskId, blockNumber, status, a.gasLimit, inputsHash); - a.verifier.verifyTaskCreation(task, a.expectedAddress).then( (res)=> { + a.verifier.verifyTaskCreation(task, blockNumber, a.expectedAddress).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskValidityErr, true); resolve(); @@ -902,7 +891,7 @@ describe('Verifier tests', function() { let blockNumber = a.expectedParams.firstBlockNumber + 50; a.apiMock.setTaskParams(a.taskId,0, status); - a.verifier.verifyTaskCreation(task, a.expectedAddress).then( (res)=> { + a.verifier.verifyTaskCreation(task, blockNumber, a.expectedAddress).then( (res)=> { assert.strictEqual(res.isVerified, true); assert.strictEqual(res.error , null); assert.strictEqual(res.blockNumber , blockNumber); @@ -915,7 +904,7 @@ describe('Verifier tests', function() { }); }); - it('Good compute task creation pre-mined 2', async function() { + it('Compute task creation cancellation', async function() { const tree = TEST_TREE.verifier; if (!tree['all'] || !tree['#28']) { this.skip(); @@ -929,19 +918,14 @@ describe('Verifier tests', function() { let blockNumber = a.expectedParams.firstBlockNumber + 50; a.apiMock.setTaskParams(a.taskId,0, status); - a.verifier.verifyTaskCreation(task, a.expectedAddress).then( (res)=> { - assert.strictEqual(res.isVerified, true); - assert.strictEqual(res.error , null); - assert.strictEqual(res.blockNumber , blockNumber); - assert.strictEqual(res.gasLimit , a.gasLimit); + a.verifier.verifyTaskCreation(task, blockNumber, a.expectedAddress).then( (res)=> { + assert.strictEqual(res.isVerified, false); + assert.strictEqual(res.error instanceof errors.TaskCancelledErr, true); resolve(); }); - - let event = {tasks: {}}; - event.tasks[a.taskId] = {taskId: a.taskId, inputsHash: inputsHash, gasLimit: a.gasLimit, blockNumber: blockNumber}; - event.tasks[web3Utils.randomHex(32)] = {taskId: a.taskId, inputsHash: inputsHash, gasLimit: a.gasLimit, blockNumber: blockNumber}; - a.apiMock.triggerEvent('TaskRecordsCreated', event); + const event = {taskId: a.taskId, inputsHash: inputsHash, gasLimit: a.gasLimit, blockNumber: blockNumber}; + a.apiMock.triggerEvent('TaskFeeReturned', event); }); }); @@ -958,7 +942,7 @@ describe('Verifier tests', function() { let inputsHash = cryptography.hashArray([a.encryptedFn, a.encryptedArgs, cryptography.hash(a.preCode), a.userDHKey]); a.apiMock.setTaskParams(a.secretContractAddress,0, status, a.gasLimit, inputsHash); - a.verifier.verifyTaskCreation(task, web3Utils.toChecksumAddress(web3Utils.randomHex(20))).then( (res)=> { + a.verifier.verifyTaskCreation(task, 0, web3Utils.toChecksumAddress(web3Utils.randomHex(20))).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.WorkerSelectionVerificationErr, true); resolve(); @@ -984,7 +968,7 @@ describe('Verifier tests', function() { let inputsHash = cryptography.hashArray([a.encryptedFn, a.encryptedArgs, a.secretContractAddress, a.userDHKey]); a.apiMock.setTaskParams(a.taskId,0, status); - a.verifier.verifyTaskCreation(task, web3Utils.toChecksumAddress(web3Utils.randomHex(20))).then( (res)=> { + a.verifier.verifyTaskCreation(task, 0, web3Utils.toChecksumAddress(web3Utils.randomHex(20))).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.WorkerSelectionVerificationErr, true); resolve(); @@ -1011,7 +995,7 @@ describe('Verifier tests', function() { let inputsHash = cryptography.hashArray([a.encryptedFn, a.encryptedArgs, a.secretContractAddress, a.userDHKey]); a.apiMock.setTaskParams(a.taskId, blockNumber, status, a.gasLimit, inputsHash); - a.verifier.verifyTaskCreation(task, web3Utils.randomHex(22)).then( (res)=> { + a.verifier.verifyTaskCreation(task, blockNumber, web3Utils.randomHex(22)).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TypeErr, true); resolve(); @@ -1034,7 +1018,7 @@ describe('Verifier tests', function() { let inputsHash = cryptography.hashArray([a.encryptedFn, a.encryptedArgs, cryptography.hash(a.preCode), a.userDHKey]); a.apiMock.setTaskParams(a.taskId, blockNumber, status, a.gasLimit, inputsHash); - a.verifier.verifyTaskCreation(task, web3Utils.randomHex(22)).then( (res)=> { + a.verifier.verifyTaskCreation(task, blockNumber, web3Utils.randomHex(22)).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TypeErr, true); resolve(); @@ -1051,7 +1035,7 @@ describe('Verifier tests', function() { return new Promise(async function(resolve) { let a = await initStuffForTaskCreation(); - a.verifier.verifyTaskCreation({}, a.expectedAddress).then( (res)=> { + a.verifier.verifyTaskCreation({}, 0, a.expectedAddress).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TypeErr, true); resolve(); @@ -1061,7 +1045,7 @@ describe('Verifier tests', function() { it('Wrong deploy task creation post-mined due to wrong delta key', async function() { const tree = TEST_TREE.verifier; - if (!tree['all'] || !tree['#32']) { + if (!tree['all'] || !tree['#34']) { this.skip(); } @@ -1074,7 +1058,7 @@ describe('Verifier tests', function() { let inputsHash = cryptography.hashArray([a.encryptedFn, a.encryptedArgs, cryptography.hash(a.preCode), a.userDHKey]); a.apiMock.setTaskParams(a.taskId, blockNumber, status, a.gasLimit, inputsHash); - a.verifier.verifyTaskCreation(task, web3Utils.randomHex(22)).then( (res)=> { + a.verifier.verifyTaskCreation(task, blockNumber, web3Utils.randomHex(22)).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TypeErr, true); resolve(); @@ -1084,14 +1068,14 @@ describe('Verifier tests', function() { it('Wrong task creation post-mined due to wrong task type', async function() { const tree = TEST_TREE.verifier; - if (!tree['all'] || !tree['#33']) { + if (!tree['all'] || !tree['#35']) { this.skip(); } return new Promise(async function(resolve) { let a = await initStuffForTaskCreation(); - a.verifier.verifyTaskCreation({}, a.expectedAddress).then( (res)=> { + a.verifier.verifyTaskCreation({}, 0, a.expectedAddress).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TypeErr, true); resolve(); @@ -1101,7 +1085,7 @@ describe('Verifier tests', function() { it('Wrong deploy task creation post-mined due to wrong inputs hash', async function() { const tree = TEST_TREE.verifier; - if (!tree['all'] || !tree['#34']) { + if (!tree['all'] || !tree['#36']) { this.skip(); } @@ -1114,7 +1098,7 @@ describe('Verifier tests', function() { let inputsHash = web3Utils.randomHex(10); a.apiMock.setTaskParams(a.secretContractAddress, blockNumber, status, a.gasLimit, inputsHash); - a.verifier.verifyTaskCreation(task, a.expectedAddress).then( (res)=> { + a.verifier.verifyTaskCreation(task, blockNumber, a.expectedAddress).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); resolve(); @@ -1124,7 +1108,7 @@ describe('Verifier tests', function() { it('Wrong compute task creation post-mined due to wrong inputs hash', async function() { const tree = TEST_TREE.verifier; - if (!tree['all'] || !tree['#35']) { + if (!tree['all'] || !tree['#37']) { this.skip(); } @@ -1137,7 +1121,7 @@ describe('Verifier tests', function() { let inputsHash = web3Utils.randomHex(10); a.apiMock.setTaskParams(a.taskId, blockNumber, status, a.gasLimit, inputsHash); - a.verifier.verifyTaskCreation(task, a.expectedAddress).then( (res)=> { + a.verifier.verifyTaskCreation(task, blockNumber, a.expectedAddress).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); resolve(); @@ -1147,7 +1131,7 @@ describe('Verifier tests', function() { it('Wrong compute task submission pre-mined due to wrong key', async function() { const tree = TEST_TREE.verifier; - if (!tree['all'] || !tree['#36']) { + if (!tree['all'] || !tree['#38']) { this.skip(); } @@ -1161,7 +1145,7 @@ describe('Verifier tests', function() { // ok a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, "40", null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, "40", null).then( (res)=> { assert.strictEqual(res.isVerified, false); assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); resolve(); @@ -1172,9 +1156,9 @@ describe('Verifier tests', function() { }); }); - it('Good compute task submission pre-mined - no output', async function() { + it('Good compute task submission pre-mined - no delta', async function() { const tree = TEST_TREE.verifier; - if (!tree['all'] || !tree['#37']) { + if (!tree['all'] || !tree['#39']) { this.skip(); } @@ -1182,26 +1166,26 @@ describe('Verifier tests', function() { const key = 2; let a = await initStuffForTaskSubmission(); - let task = new ComputeResult(a.taskId, constants.TASK_STATUS.UNVERIFIED, null, {data: a.delta, key: key}, + let task = new ComputeResult(a.taskId, constants.TASK_STATUS.UNVERIFIED, a.output, {key: 0}, 5, "ethereumPayload", "ethereumAddress", "signature"); let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; // ok a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, "40", null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, "40", null).then( (res)=> { assert.strictEqual(res.isVerified, true); assert.strictEqual(res.error, null); resolve(); }); - const event = {stateDeltaHash: a.deltaHash, stateDeltaHashIndex: key, outputHash: constants.ETHEREUM_EMPTY_HASH, taskId: a.taskId}; + const event = {stateDeltaHash: constants.ETHEREUM_EMPTY_HASH, stateDeltaHashIndex: 0, outputHash: a.outputHash, taskId: a.taskId}; a.apiMock.triggerEvent('ReceiptVerified', event); }); }); - it('Good compute task submission pre-mined - no delta', async function() { + it('Wrong compute task submission pre-mined - no delta and wrong output', async function() { const tree = TEST_TREE.verifier; - if (!tree['all'] || !tree['#38']) { + if (!tree['all'] || !tree['#40']) { this.skip(); } @@ -1209,15 +1193,15 @@ describe('Verifier tests', function() { const key = 2; let a = await initStuffForTaskSubmission(); - let task = new ComputeResult(a.taskId, constants.TASK_STATUS.UNVERIFIED, a.output, {key: 0}, + let task = new ComputeResult(a.taskId, constants.TASK_STATUS.UNVERIFIED, [500], {key: 0}, 5, "ethereumPayload", "ethereumAddress", "signature"); let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; // ok a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, "40", null).then( (res)=> { - assert.strictEqual(res.isVerified, true); - assert.strictEqual(res.error, null); + a.verifier.verifyTaskSubmission(task, a.blockNumber, "40", null).then( (res)=> { + assert.strictEqual(res.isVerified, false); + assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); resolve(); }); @@ -1226,134 +1210,178 @@ describe('Verifier tests', function() { }); }); - it('Good compute task submission pre-mined - no delta and no output', async function() { + + it('Wrong deploy task submission pre-mined - no delta', async function() { const tree = TEST_TREE.verifier; - if (!tree['all'] || !tree['#39']) { + if (!tree['all'] || !tree['#41']) { this.skip(); } return new Promise(async function(resolve) { - const key = 2; - let a = await initStuffForTaskSubmission(); - let task = new ComputeResult(a.taskId, constants.TASK_STATUS.UNVERIFIED, null, {key: 0}, - 5, "ethereumPayload", "ethereumAddress", "signature"); + let task = new DeployResult(a.taskId, constants.TASK_STATUS.UNVERIFIED, a.output, {key: 0}, + 5, "ethereumPayload", "ethereumAddress", "signature", "preCodeHash"); let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; // ok a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, "40", null).then( (res)=> { - assert.strictEqual(res.isVerified, true); - assert.strictEqual(res.error, null); + a.verifier.verifyTaskSubmission(task, a.blockNumber, a.taskId, null).then( (res)=> { + assert.strictEqual(res.isVerified, false); + assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); resolve(); }); - const event = {stateDeltaHash: constants.ETHEREUM_EMPTY_HASH, stateDeltaHashIndex: 0, outputHash: constants.ETHEREUM_EMPTY_HASH, taskId: a.taskId}; - a.apiMock.triggerEvent('ReceiptVerified', event); + const event = {stateDeltaHash: a.deltaHash, codeHash: a.outputHash, secretContractAddress: a.taskId}; + a.apiMock.triggerEvent('SecretContractDeployed', event); }); }); - it('Wrong compute task submission pre-mined - no output and wrong delta', async function() { + it('Compute task submission failed due to ethereum', async function() { const tree = TEST_TREE.verifier; - if (!tree['all'] || !tree['#40']) { + if (!tree['all'] || !tree['#42']) { this.skip(); } return new Promise(async function(resolve) { - const key = 2; - let a = await initStuffForTaskSubmission(); - let task = new ComputeResult(a.taskId, constants.TASK_STATUS.UNVERIFIED, null, {data: [200], key: key}, + let task = new ComputeResult(a.taskId, constants.TASK_STATUS.UNVERIFIED, a.output, {key: 0}, 5, "ethereumPayload", "ethereumAddress", "signature"); let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; - // ok a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, "40", null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, "40", null).then( (res)=> { assert.strictEqual(res.isVerified, false); - assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); + assert.strictEqual(res.error instanceof errors.TaskEthereumFailureErr, true); resolve(); }); - const event = {stateDeltaHash: a.deltaHash, stateDeltaHashIndex: key, outputHash: constants.ETHEREUM_EMPTY_HASH, taskId: a.taskId}; - a.apiMock.triggerEvent('ReceiptVerified', event); + const event = {taskId: a.taskId}; + a.apiMock.triggerEvent('ReceiptFailedETH', event); }); }); - it('Wrong compute task submission pre-mined - no delta and wrong output', async function() { + it('Deploy task submission failed due to ethereum', async function() { const tree = TEST_TREE.verifier; - if (!tree['all'] || !tree['#38']) { + if (!tree['all'] || !tree['#43']) { this.skip(); } return new Promise(async function(resolve) { - const key = 2; - let a = await initStuffForTaskSubmission(); - let task = new ComputeResult(a.taskId, constants.TASK_STATUS.UNVERIFIED, [500], {key: 0}, - 5, "ethereumPayload", "ethereumAddress", "signature"); + let task = new DeployResult(a.taskId, constants.TASK_STATUS.UNVERIFIED, a.output, {data: a.delta, key: 0}, + 5, "ethereumPayload", "ethereumAddress", "signature", "preCodeHash"); let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; - // ok a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, "40", null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, a.taskId, null).then( (res)=> { assert.strictEqual(res.isVerified, false); - assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); + assert.strictEqual(res.error instanceof errors.TaskEthereumFailureErr, true); resolve(); }); - const event = {stateDeltaHash: constants.ETHEREUM_EMPTY_HASH, stateDeltaHashIndex: 0, outputHash: a.outputHash, taskId: a.taskId}; - a.apiMock.triggerEvent('ReceiptVerified', event); + const event = {taskId: a.taskId}; + a.apiMock.triggerEvent('ReceiptFailedETH', event); }); }); - it('Wrong deploy task submission pre-mined - no output', async function() { + it('Check deploy creation timeout', async function() { const tree = TEST_TREE.verifier; - if (!tree['all'] || !tree['#42']) { + if (!tree['all'] || !tree['#44']) { + this.skip(); + } + + return new Promise(async function(resolve) { + let a = await initStuffForTaskCreation(); + let task = new DeployTask(a.secretContractAddress, a.preCode, a.encryptedArgs, a.encryptedFn, a.userDHKey, a.gasLimit, a.secretContractAddress, 0); + let status = constants.ETHEREUM_TASK_STATUS.RECORD_UNDEFINED; + let inputsHash = cryptography.hashArray([a.encryptedFn, a.encryptedArgs, cryptography.hash(a.preCode), a.userDHKey]); + + a.apiMock.setTaskParams(a.secretContractAddress,0, status, a.gasLimit, inputsHash); + const ethereumBlockNumber = a.apiMock.getEthereumBlockNumber(); + const nextEpochBlock = a.apiMock.getTaskTimeout() + ethereumBlockNumber; + a.verifier.verifyTaskCreation(task, ethereumBlockNumber, a.expectedAddress).then( (res)=> { + assert.strictEqual(res.isVerified, false); + assert.strictEqual(res.error instanceof errors.TaskTimeoutErr, true); + resolve(); + }); + + let event = {seed: a.expectedParams.seed, firstBlockNumber: nextEpochBlock, workers: a.expectedParams.workers, balances: a.expectedParams.balances, nonce: a.expectedParams.nonce}; + a.apiMock.triggerEvent('WorkersParameterized', event); + }); + }); + + it('Check compute creation timeout', async function() { + const tree = TEST_TREE.verifier; + if (!tree['all'] || !tree['#45']) { + this.skip(); + } + + return new Promise(async function(resolve) { + let a = await initStuffForTaskCreation(); + let task = new ComputeTask(a.taskId, a.encryptedArgs, a.encryptedFn, a.userDHKey, a.gasLimit, a.secretContractAddress, 0); + let status = constants.ETHEREUM_TASK_STATUS.RECORD_UNDEFINED; + const ethereumBlockNumber = a.apiMock.getEthereumBlockNumber(); + const nextEpochBlock = a.apiMock.getTaskTimeout() + ethereumBlockNumber; + + a.apiMock.setTaskParams(a.taskId,0, status); + a.verifier.verifyTaskCreation(task, ethereumBlockNumber, a.expectedAddress).then( (res)=> { + assert.strictEqual(res.isVerified, false); + assert.strictEqual(res.error instanceof errors.TaskTimeoutErr, true); + resolve(); + }); + + let event = {seed: a.expectedParams.seed, firstBlockNumber: nextEpochBlock, workers: a.expectedParams.workers, balances: a.expectedParams.balances, nonce: a.expectedParams.nonce}; + a.apiMock.triggerEvent('WorkersParameterized', event); + }); + }); + + it('Check compute task submission timeout', async function() { + const tree = TEST_TREE.verifier; + if (!tree['all'] || !tree['#46']) { this.skip(); } return new Promise(async function(resolve) { let a = await initStuffForTaskSubmission(); - let task = new DeployResult(a.taskId, constants.TASK_STATUS.UNVERIFIED, null, {data: a.delta, key: 0}, - 5, "ethereumPayload", "ethereumAddress", "signature", "preCodeHash"); + let task = new ComputeResult(a.taskId, constants.TASK_STATUS.UNVERIFIED, a.output, {key: 0}, + 5, "ethereumPayload", "ethereumAddress", "signature"); let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; + const nextEpochBlock = a.apiMock.getTaskTimeout() + a.blockNumber; - // ok a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, a.taskId, null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, "40", null).then( (res)=> { assert.strictEqual(res.isVerified, false); - assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); + assert.strictEqual(res.error instanceof errors.TaskTimeoutErr, true); resolve(); }); - const event = {stateDeltaHash: a.deltaHash, codeHash: a.outputHash, secretContractAddress: a.taskId}; - a.apiMock.triggerEvent('SecretContractDeployed', event); + let event = {seed: 787878978979, firstBlockNumber: nextEpochBlock, workers: [], balances: [], nonce: 9}; + a.apiMock.triggerEvent('WorkersParameterized', event); }); }); - it('Wrong deploy task submission pre-mined - no delta', async function() { + it('Check deploy task submission timeout', async function() { const tree = TEST_TREE.verifier; - if (!tree['all'] || !tree['#43']) { + if (!tree['all'] || !tree['#47']) { this.skip(); } return new Promise(async function(resolve) { let a = await initStuffForTaskSubmission(); - let task = new DeployResult(a.taskId, constants.TASK_STATUS.UNVERIFIED, a.output, {key: 0}, + let task = new DeployResult(a.taskId, constants.TASK_STATUS.UNVERIFIED, a.output, {data: a.delta, key: 0}, 5, "ethereumPayload", "ethereumAddress", "signature", "preCodeHash"); let status = constants.ETHEREUM_TASK_STATUS.RECORD_CREATED; + const nextEpochBlock = a.apiMock.getTaskTimeout() + a.blockNumber; - // ok a.apiMock.setTaskParams(a.taskId, a.blockNumber, status); - a.verifier.verifyTaskSubmission(task, a.taskId, null).then( (res)=> { + a.verifier.verifyTaskSubmission(task, a.blockNumber, a.taskId, null).then( (res)=> { assert.strictEqual(res.isVerified, false); - assert.strictEqual(res.error instanceof errors.TaskVerificationErr, true); + assert.strictEqual(res.error instanceof errors.TaskTimeoutErr, true); resolve(); }); - const event = {stateDeltaHash: a.deltaHash, codeHash: a.outputHash, secretContractAddress: a.taskId}; - a.apiMock.triggerEvent('SecretContractDeployed', event); + let event = {seed: 78587678687, firstBlockNumber: nextEpochBlock, workers: [], balances: [], nonce: 10}; + a.apiMock.triggerEvent('WorkersParameterized', event); }); }); });