From c1ae7a3084146ac428d18d06abc6725d78c5990d Mon Sep 17 00:00:00 2001 From: calvin Date: Fri, 4 Feb 2022 14:44:24 -0600 Subject: [PATCH 01/50] Initial otnode service service --- installer/data/otnode.service | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 installer/data/otnode.service diff --git a/installer/data/otnode.service b/installer/data/otnode.service new file mode 100755 index 0000000000..317b5a20c5 --- /dev/null +++ b/installer/data/otnode.service @@ -0,0 +1,16 @@ +#/lib/systemd/system/graphdb.service + +[Unit] +Description=OriginTrail V6 Stage 1 Beta Node +Documentation=https://github.com/OriginTrail/ot-node/tree/v6/release%2Ftestnet +After=network.target + +[Service] +Type=simple +User=root +WorkingDirectory=/root/ot-node +ExecStart=/usr/bin/node /root/ot-node/index.js +Restart=on-failure + +[Install] +WantedBy=multi-user.target \ No newline at end of file From e7151840fcc8bca685ef3ebd374b325356a833cb Mon Sep 17 00:00:00 2001 From: calvin Date: Fri, 4 Feb 2022 14:48:50 -0600 Subject: [PATCH 02/50] Update the installer to handle the otnode service --- installer/installer.sh | 53 ++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/installer/installer.sh b/installer/installer.sh index 8f4e0fa25b..f859167e62 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -94,13 +94,13 @@ else echo -e "${GREEN}SUCCESS${NC}" fi -echo -n "Copying service file: " +echo -n "Copying graphdb service file: " OUTPUT=$(cp $OTNODE_DIR/installer/data/graphdb.service /lib/systemd/system/ >/dev/null 2>&1) if [[ $? -ne 0 ]]; then echo -e "${RED}FAILED${NC}" - echo "There was an error copying the service file." + echo "There was an error copying the graphdb service file." echo $OUTPUT exit 1 else @@ -185,9 +185,9 @@ else echo -e "${GREEN}SUCCESS${NC}" fi -echo -n "Installing nodejs and npm: " +echo -n "Installing nodejs: " -OUTPUT=$(aptitude install nodejs npm -y >/dev/null 2>&1) +OUTPUT=$(aptitude install nodejs -y >/dev/null 2>&1) if [[ $? -ne 0 ]]; then echo -e "${RED}FAILED${NC}" echo "There was an error installing nodejs/npm." @@ -197,18 +197,6 @@ else echo -e "${GREEN}SUCCESS${NC}" fi -echo -n "Installing forever: " - -OUTPUT=$(npm install forever -g >/dev/null 2>&1) -if [[ $? -ne 0 ]]; then - echo -e "${RED}FAILED${NC}" - echo "There was an error installing forever." - echo $OUTPUT - exit 1 -else - echo -e "${GREEN}SUCCESS${NC}" -fi - echo -n "Installing tcllib and mysql-server: " OUTPUT=$(apt install tcllib mysql-server -y >/dev/null 2>&1) @@ -364,9 +352,25 @@ else echo -e "${GREEN}SUCCESS${NC}" fi -echo -n "Starting the node: " +echo -n "Copying otnode service file: " + +OUTPUT=$(cp $OTNODE_DIR/installer/data/otnode.service /lib/systemd/system/ >/dev/null 2>&1) + +if [[ $? -ne 0 ]]; then + echo -e "${RED}FAILED${NC}" + echo "There was an error copying the otnode service file." + echo $OUTPUT + exit 1 +else + echo -e "${GREEN}SUCCESS${NC}" +fi + +systemctl daemon-reload + +echo -n "Starting otnode: " + +OUTPUT=$(systemctl start otnode >/dev/null 2>&1) -OUTPUT=$(forever start -a -o out.log -e out.log index.js >/dev/null 2>&1) if [[ $? -ne 0 ]]; then echo -e "${RED}FAILED${NC}" echo "There was an error starting the node." @@ -376,6 +380,19 @@ else echo -e "${GREEN}SUCCESS${NC}" fi +echo -n "Confirming the node has started: " + +IS_RUNNING=$(systemctl show -p ActiveState --value otnode) + +if [[ $IS_RUNNING == "active" ]]; then + echo -e "${GREEN}SUCCESS${NC}" +else + echo -e "${RED}FAILED${NC}" + echo "There was an error starting the node." + echo $OUTPUT + exit 1 +fi + echo -n "Logs will be displayed. Press ctrl+c to exit the logs. The node WILL stay running after you return to the command prompt." echo " " read -p "Press enter to continue..." From 1566b1801827cc09acfe80bff80920681add7471 Mon Sep 17 00:00:00 2001 From: calvin Date: Fri, 4 Feb 2022 14:53:47 -0600 Subject: [PATCH 03/50] Enable graphdb/otnode services --- installer/installer.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/installer/installer.sh b/installer/installer.sh index f859167e62..a6c5bed002 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -109,6 +109,19 @@ fi systemctl daemon-reload +echo -n "Enable GraphDB service on boot: " + +OUTPUT=$(systemctl enable graphdb >/dev/null 2>&1) + +if [[ $? -ne 0 ]]; then + echo -e "${RED}FAILED${NC}" + echo "There was an error enabling the GraphDB service." + echo $OUTPUT + exit 1 +else + echo -e "${GREEN}SUCCESS${NC}" +fi + echo -n "Starting GraphDB: " OUTPUT=$(systemctl start graphdb >/dev/null 2>&1) @@ -367,6 +380,19 @@ fi systemctl daemon-reload +echo -n "Enable otnode service on boot: " + +OUTPUT=$(systemctl enable otnode >/dev/null 2>&1) + +if [[ $? -ne 0 ]]; then + echo -e "${RED}FAILED${NC}" + echo "There was an error enabling the otnode service." + echo $OUTPUT + exit 1 +else + echo -e "${GREEN}SUCCESS${NC}" +fi + echo -n "Starting otnode: " OUTPUT=$(systemctl start otnode >/dev/null 2>&1) From b9f195d5a4e9e9f8452de6fcb2201f8e860609c0 Mon Sep 17 00:00:00 2001 From: calr0x Date: Tue, 8 Feb 2022 07:31:20 -0600 Subject: [PATCH 04/50] Switch to journalctl log command at end. --- installer/installer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/installer.sh b/installer/installer.sh index 8f4e0fa25b..04f7b68c05 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -380,4 +380,4 @@ echo -n "Logs will be displayed. Press ctrl+c to exit the logs. The node WILL st echo " " read -p "Press enter to continue..." -tail -f -n100 out.log +journalctl -u otnode -f From c56d1a935b91c61415923811e1eb196cd3b480e8 Mon Sep 17 00:00:00 2001 From: calr0x Date: Tue, 8 Feb 2022 07:43:14 -0600 Subject: [PATCH 05/50] Catch all versions of Ubuntu available to use --- installer/installer.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/installer/installer.sh b/installer/installer.sh index befc0fc37c..57bc3b2ebe 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -10,11 +10,11 @@ NC='\033[0m' # No Color clear -echo -n "${N1}Checking that the OS is Ubuntu 20.04 ONLY: " +echo -n "${N1}Checking that the OS is Ubuntu 20.04 or newer: " -if [[ $OS_VERSION != 20.04 ]]; then +if [[ $OS_VERSION != 20.04 ]] || [[ $OS_VERSION != 21.04 ]] || [[ $OS_VERSION != 21.10 ]]; then echo -e "${RED}FAILED${NC}" - echo "This installer requires Ubuntu 20.04. Destroy this VPS and remake using Ubuntu 20.04." + echo "This installer requires Ubuntu 20.04 or newer. Destroy this VPS and remake using Ubuntu 20.04 or newer." exit 1 else echo -e "${GREEN}SUCCESS${NC}" From 9ef6a4bb46b8dfffb57177b75257889eb8dcefe3 Mon Sep 17 00:00:00 2001 From: calr0x Date: Tue, 8 Feb 2022 07:57:08 -0600 Subject: [PATCH 06/50] Correct service name --- installer/data/otnode.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/data/otnode.service b/installer/data/otnode.service index 317b5a20c5..1280289d7c 100755 --- a/installer/data/otnode.service +++ b/installer/data/otnode.service @@ -1,4 +1,4 @@ -#/lib/systemd/system/graphdb.service +#/lib/systemd/system/otnode.service [Unit] Description=OriginTrail V6 Stage 1 Beta Node From 3a9ed1dc31823b4b988c7124486f9525bbbbe21d Mon Sep 17 00:00:00 2001 From: calr0x Date: Tue, 8 Feb 2022 07:58:40 -0600 Subject: [PATCH 07/50] Correct service error --- installer/data/otnode.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/data/otnode.service b/installer/data/otnode.service index 1280289d7c..4536fc1a42 100755 --- a/installer/data/otnode.service +++ b/installer/data/otnode.service @@ -2,7 +2,7 @@ [Unit] Description=OriginTrail V6 Stage 1 Beta Node -Documentation=https://github.com/OriginTrail/ot-node/tree/v6/release%2Ftestnet +Documentation=https://github.com/OriginTrail/ot-node/ After=network.target [Service] From 141241642b7806c4735b1bbe89394cbbc35f4f47 Mon Sep 17 00:00:00 2001 From: calr0x Date: Tue, 8 Feb 2022 08:00:47 -0600 Subject: [PATCH 08/50] Wait to start otnode after graphdb --- installer/data/otnode.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/data/otnode.service b/installer/data/otnode.service index 4536fc1a42..2bd9c99bd7 100755 --- a/installer/data/otnode.service +++ b/installer/data/otnode.service @@ -3,7 +3,7 @@ [Unit] Description=OriginTrail V6 Stage 1 Beta Node Documentation=https://github.com/OriginTrail/ot-node/ -After=network.target +After=network.target graphdb.service [Service] Type=simple From 74340cb0bec3a6f733d0d1fcfc65b689927c23f4 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Tue, 8 Feb 2022 16:49:44 +0100 Subject: [PATCH 09/50] graph layer refactor --- external/graphdb-service.js | 237 ++++++----- index.js | 2 +- .../command/common/send-telemetry-command.js | 2 +- .../publish/insert-assertion-command.js | 19 +- .../command/publish/send-assertion-command.js | 14 +- .../command/publish/submit-proofs-command.js | 17 +- modules/controller/rpc-controller.js | 353 +++++++++------- modules/service/data-service.js | 388 +++++++++--------- modules/service/dependency-injection.js | 2 +- modules/service/publish-service.js | 62 ++- modules/service/query-service.js | 154 +++---- modules/{Utilities.js => utilities.js} | 14 + modules/worker/l1-worker.js | 41 ++ modules/worker/worker-pool.js | 29 ++ package.json | 3 +- 15 files changed, 725 insertions(+), 612 deletions(-) rename modules/{Utilities.js => utilities.js} (64%) create mode 100644 modules/worker/l1-worker.js create mode 100644 modules/worker/worker-pool.js diff --git a/external/graphdb-service.js b/external/graphdb-service.js index bb6641e88d..560317d6cb 100644 --- a/external/graphdb-service.js +++ b/external/graphdb-service.js @@ -1,13 +1,13 @@ -const { ServerClientConfig, GraphDBServerClient } = require('graphdb').server; -const { RepositoryClientConfig, RepositoryConfig, RepositoryType } = require('graphdb').repository; -const { SparqlXmlResultParser } = require('graphdb').parser; -const { GetQueryPayload, QueryType } = require('graphdb').query; -const { RDFMimeType } = require('graphdb').http; +const {ServerClientConfig, GraphDBServerClient} = require('graphdb').server; +const {RepositoryClientConfig, RepositoryConfig, RepositoryType} = require('graphdb').repository; +const {SparqlXmlResultParser} = require('graphdb').parser; +const {GetQueryPayload, QueryType} = require('graphdb').query; +const {RDFMimeType} = require('graphdb').http; const axios = require('axios'); -const { execSync } = require('child_process'); +const {execSync} = require('child_process'); const jsonld = require('jsonld'); const N3 = require('n3'); -const { BufferList } = require('bl'); +const {BufferList} = require('bl'); const constants = require('../modules/constants'); class GraphdbService { @@ -144,16 +144,13 @@ class GraphdbService { async extractMetadata(rdf) { return new Promise(async (accept, reject) => { - const parser = new N3.Parser({ format: 'N-Triples', baseIRI: 'http://schema.org/' }); + const parser = new N3.Parser({format: 'N-Triples', baseIRI: 'http://schema.org/'}); const result = { metadata: { - - }, - blockchain: { - + keywords: [], + UALs: [], }, - assets: [], - keywords: [], + blockchain: {}, }; const quads = []; @@ -169,106 +166,123 @@ class GraphdbService { }, ); + for (const quad of quads) { try { switch (quad._predicate.id) { - case 'http://schema.org/hasType': - result.metadata.type = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasTimestamp': - result.metadata.timestamp = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasIssuer': - result.metadata.issuer = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasVisibility': - result.metadata.visibility = !!quad._object.id.includes('true'); - break; - case 'http://schema.org/hasDataHash': - result.metadata.dataHash = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasAsset': - result.assets.push(JSON.parse(quad._object.id)); - break; - case 'http://schema.org/hasKeyword': - result.keywords.push(JSON.parse(quad._object.id)); - break; - case 'http://schema.org/hasSignature': - result.signature = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasRootHash': - result.rootHash = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasBlockchain': - result.blockchain.name = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasTransactionHash': - result.blockchain.transactionHash = JSON.parse(quad._object.id); - break; - default: - break; + case 'http://schema.org/hasType': + result.metadata.type = JSON.parse(quad._object.id); + result.id = quad._subject.id.replace('did:dkg:', ''); + break; + case 'http://schema.org/hasTimestamp': + result.metadata.timestamp = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasUALs': + result.metadata.UALs.push(JSON.parse(quad._object.id)); + break; + case 'http://schema.org/hasIssuer': + result.metadata.issuer = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasVisibility': + result.metadata.visibility = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasDataHash': + result.metadata.dataHash = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasKeywords': + result.metadata.keywords.push(JSON.parse(quad._object.id)); + break; + case 'http://schema.org/hasSignature': + result.signature = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasRootHash': + result.rootHash = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasBlockchain': + result.blockchain.name = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasTransactionHash': + result.blockchain.transactionHash = JSON.parse(quad._object.id); + break; + default: + break; } } catch (e) { - this.logger.error({ msg: `Error in extracting metadata: ${e}. ${e.stack}`, Event_name: constants.ERROR_TYPE.EXTRACT_METADATA_ERROR }); + this.logger.error({ + msg: `Error in extracting metadata: ${e}. ${e.stack}`, + Event_name: constants.ERROR_TYPE.EXTRACT_METADATA_ERROR + }); } } + + result.metadata.keywords.sort(); + if (!result.metadata.UALs.length) + delete result.metadata.UALs; + else + result.metadata.UALs.sort(); + + accept(result); }); } async createMetadata(assertion) { - const result = await this.toRDF({ + const metadata = { '@context': 'https://www.schema.org/', + '@id': `did:dkg:${assertion.id}`, hasType: assertion.metadata.type, hasSignature: assertion.signature, hasIssuer: assertion.metadata.issuer, hasTimestamp: assertion.metadata.timestamp, hasVisibility: assertion.metadata.visibility, hasDataHash: assertion.metadata.dataHash, - }); - - return result.map((x) => x.replace('_:c14n0', ``)); - } + hasKeywords: assertion.metadata.keywords, + }; - async createBlockchainMetadata(assertion) { - const result = await this.toRDF({ - '@context': 'https://www.schema.org/', - hasBlockchain: assertion.blockchain.name, - hasTransactionHash: assertion.blockchain.transactionHash, - }); - - return result.map((x) => x.replace('_:c14n0', ``)); - } - - async createConnections(options) { - const { - assertionId, assets, keywords, rootHash, - } = options; + if (assertion.metadata.UALs) + metadata.hasUALs = assertion.metadata.UALs; - const result = await this.toRDF({ - '@context': 'https://www.schema.org/', - hasAsset: assets, - hasKeyword: keywords, - hasRootHash: rootHash, - }); - - return result.map((x) => x.replace('_:c14n0', ``)); + const result = await this.toRDF(metadata); + return result; } async resolve(uri) { - const query = `CONSTRUCT { ?s ?p ?o } - WHERE { - GRAPH ?g { ?s ?p ?o } - FILTER (?g = ) . - }`; - let triples = await this.construct(query); - triples = triples.toString(); - if (triples) { - triples = triples.replace(/_:genid(.){37}/gm, '_:$1'); - triples = triples.split('\n'); - triples = triples.filter((x) => x !== ''); + let isAsset = false; + const query = `PREFIX schema: + CONSTRUCT { ?s ?p ?o } + WHERE { + GRAPH { + ?s ?p ?o + } + }`; + let nquads = await this.construct(query); + + if (!nquads.length) { + const query = `PREFIX schema: + CONSTRUCT { ?s ?p ?o } + WHERE { + GRAPH ?g { ?s ?p ?o } + { + SELECT ?ng + WHERE { + ?ng schema:hasUALs "${uri}" . + } + LIMIT 1 + } + FILTER (?g = ?ng) . + }`; + nquads = await this.construct(query); + isAsset = true; } - return triples; + + if (nquads.length) { + nquads = nquads.toString(); + nquads = nquads.replace(/_:genid(.){37}/gm, '_:$1'); + nquads = nquads.split('\n'); + nquads = nquads.filter((x) => x !== ''); + } else + nquads = null; + return {nquads, isAsset}; } async findAssertions(nquads) { @@ -282,26 +296,43 @@ class GraphdbService { return JSON.parse(g).results.bindings.map((x) => x.g.value.replace('did:dkg:', '')); } - async searchByQuery(query, options, localQuery) { + async findAssertionsByKeyword(query, options, localQuery) { const sparqlQuery = `PREFIX schema: - SELECT (?outerAssetId AS ?assetId) (GROUP_CONCAT(?assertionId; SEPARATOR=",") AS ?assertions) - WHERE { - ?assertionId schema:hasAsset ?outerAssetId ; - ${!localQuery ? 'schema:hasVisibility true .' : ''} - { SELECT distinct ?assertionId WHERE { - ?assertionId schema:hasKeyword ?keyword ; - schema:hasIssuer ?issuer ; - schema:hasType ?type . + ?assertionId schema:hasKeywords ?keyword . + ${!localQuery ? ' ?assertionId schema:hasVisibility "public" .' : ''} + ${options.prefix ? `FILTER contains(lcase(?keyword),'${query.toLowerCase()}')` : `FILTER (lcase(?keyword) = '${query.toLowerCase()}')`} + } + ${options.limit ? `LIMIT ${options.limit}` : ''}`; + let result = await this.execute(sparqlQuery); + result = JSON.parse(result).results.bindings; + return result; + } + + async findAssetsByKeyword(query, options, localQuery) { + const sparqlQuery = `PREFIX schema: + SELECT ?assertionId + WHERE { + ?assertionId schema:hasTimestamp ?timestamp ; + ${!localQuery ? 'schema:hasVisibility "public" ;' : ''} + schema:hasUALs ?assetId . + { + SELECT ?assetId (MAX(?timestamp) AS ?timestamp) + WHERE { + ?assertionId schema:hasKeywords ?keyword ; + schema:hasIssuer ?issuer ; + schema:hasType ?type ; + schema:hasTimestamp ?timestamp ; + schema:hasUALs ?assetId . ${options.prefix ? `FILTER contains(lcase(?keyword),'${query.toLowerCase()}')` : `FILTER (lcase(?keyword) = '${query.toLowerCase()}')`} ${options.issuers ? `FILTER (?issuer IN (${JSON.stringify(options.issuers).slice(1, -1)}))` : ''} ${options.types ? `FILTER (?type IN (${JSON.stringify(options.types).slice(1, -1)}))` : ''} - } - } - } - group by ?outerAssetId - ${options.limit ? `LIMIT ${options.limit}`: ''}`; + } + GROUP BY ?assetId + ${options.limit ? `LIMIT ${options.limit}` : ''} + } + }`; let result = await this.execute(sparqlQuery); result = JSON.parse(result).results.bindings; return result; diff --git a/index.js b/index.js index b380fb8474..637a5dc461 100644 --- a/index.js +++ b/index.js @@ -21,7 +21,7 @@ config = rc(pjson.name, defaultConfig); const node = new OTNode(); await node.start(); } catch (e) { - console.error(`Error occurred while starting new version, error message: ${e}`); + console.error(`Error occurred while starting new version, error message: ${e}. ${e.stack}`); if (!config.autoUpdate.enabled) { console.log('Auto update is disabled. Shutting down the node...'); process.exit(1); diff --git a/modules/command/common/send-telemetry-command.js b/modules/command/common/send-telemetry-command.js index 6f56b65e02..a25904385d 100644 --- a/modules/command/common/send-telemetry-command.js +++ b/modules/command/common/send-telemetry-command.js @@ -26,7 +26,7 @@ class SendTelemetryCommand extends Command { Models.handler_ids.create({ status: 'PENDING', }).then((insertedObject) => { - this.publishService.publish(JSON.stringify(jsonld), '.json', [], [`ot-telemetry-${Math.floor(new Date() / (60 * 1000))}`], true, insertedObject.dataValues.handler_id); + this.publishService.publish(JSON.stringify(jsonld), '.json', [`ot-telemetry-${Math.floor(new Date() / (60 * 1000))}`], 'public', undefined, insertedObject.dataValues.handler_id); }); } }) diff --git a/modules/command/publish/insert-assertion-command.js b/modules/command/publish/insert-assertion-command.js index c3d7b48701..4dbdac4e2c 100644 --- a/modules/command/publish/insert-assertion-command.js +++ b/modules/command/publish/insert-assertion-command.js @@ -15,22 +15,13 @@ class InsertAssertionCommand extends Command { * @param command */ async execute(command) { - const { - documentPath, keywords, assets, handlerId, operationId, - } = command.data; - - const { rdf, assertion } = await this.fileService.loadJsonFromFile(documentPath); + const { documentPath, handlerId } = command.data; + let { nquads, assertion } = await this.fileService.loadJsonFromFile(documentPath); try { - // Store to local graph database - await this.dataService.insert(rdf.join('\n'), `did:dkg:${assertion.id}`); - this.logger.info(`Assertion ${assertion.id} is successfully inserted`); - // await Models.assertions.create({ - // owner: '', - // hash: assertion.id, - // signature: '', - // topics: keywords.join(','), - // }); + // TODO Store to local graph database + await this.dataService.insert(nquads.join('\n'), `did:dkg:${assertion.id}`); + this.logger.info(`Assertion ${assertion.id} has been successfully inserted`); await Models.handler_ids.update( { status: 'COMPLETED', diff --git a/modules/command/publish/send-assertion-command.js b/modules/command/publish/send-assertion-command.js index c2603043d3..280d574072 100644 --- a/modules/command/publish/send-assertion-command.js +++ b/modules/command/publish/send-assertion-command.js @@ -18,14 +18,16 @@ class SendAssertionCommand extends Command { * @param command */ async execute(command) { - const { - assets, keywords, handlerId, documentPath, - } = command.data; + const { documentPath, handlerId } = command.data; - const { rdf, assertion } = await this.fileService.loadJsonFromFile(documentPath); + let { nquads, assertion } = await this.fileService.loadJsonFromFile(documentPath); + + if (!assertion.metadata.visibility) { + nquads = nquads.filter((x) => x.startsWith(' { + this.publishService.store({ id:assertion.id, nquads: nquads }, node).catch((e) => { this.handleError(handlerId, e, `Error while sending data with assertion id ${assertion.id} to node ${node._idB58String}. Error message: ${e.message}. ${e.stack}`); }); } diff --git a/modules/command/publish/submit-proofs-command.js b/modules/command/publish/submit-proofs-command.js index 3429c767e1..1d86faa1d1 100644 --- a/modules/command/publish/submit-proofs-command.js +++ b/modules/command/publish/submit-proofs-command.js @@ -1,6 +1,7 @@ const Command = require('../command'); const Models = require('../../../models/index'); const constants = require('../../constants'); +const sortedStringify = require("json-stable-stringify"); class SubmitProofsCommand extends Command { constructor(ctx) { @@ -9,6 +10,7 @@ class SubmitProofsCommand extends Command { this.blockchainService = ctx.blockchainService; this.dataService = ctx.dataService; this.fileService = ctx.fileService; + this.workerPool = ctx.workerPool; } /** @@ -16,14 +18,14 @@ class SubmitProofsCommand extends Command { * @param command */ async execute(command) { - const { documentPath, handlerId, operationId } = command.data; + const { documentPath, handlerId } = command.data; try { - const { rdf, assertion } = await this.fileService.loadJsonFromFile(documentPath); + let { nquads, assertion } = await this.fileService.loadJsonFromFile(documentPath); + //TODO extend for asset this.logger.info(`Sending transaction to the blockchain: createAssertionRecord(${assertion.id},${assertion.rootHash})`); - const { transactionHash, blockchain } = await this.blockchainService - .sendProofs(assertion); + const { transactionHash, blockchain } = await this.blockchainService.sendProofs(assertion); this.logger.info(`Transaction hash is ${transactionHash} on ${blockchain}`); assertion.blockchain = { @@ -31,13 +33,12 @@ class SubmitProofsCommand extends Command { transactionHash, }; - const updatedRdf = await this.dataService.appendBlockchainMetadata(rdf, assertion); - + nquads = await this.dataService.appendBlockchainMetadata(nquads, assertion); const handlerIdCachePath = this.fileService.getHandlerIdCachePath(); await this.fileService - .writeContentsToFile(handlerIdCachePath, handlerId, JSON.stringify({ - rdf: updatedRdf, assertion, + .writeContentsToFile(handlerIdCachePath, handlerId, sortedStringify({ + nquads, assertion })); } catch (e) { diff --git a/modules/controller/rpc-controller.js b/modules/controller/rpc-controller.js index 3a5f0e4833..ab9311012e 100644 --- a/modules/controller/rpc-controller.js +++ b/modules/controller/rpc-controller.js @@ -11,6 +11,7 @@ const constants = require('../constants'); const pjson = require('../../package.json'); const sortedStringify = require('json-stable-stringify'); const validator = require('validator'); +const Utilities = require('../utilities'); class RpcController { @@ -25,6 +26,7 @@ class RpcController { this.logger = ctx.logger; this.commandExecutor = ctx.commandExecutor; this.fileService = ctx.fileService; + this.workerPool = ctx.workerPool; this.app = express(); this.enableSSL(); @@ -35,18 +37,16 @@ class RpcController { } async initialize() { - this.startListeningForRpcNetworkCalls(); + this.initializeNetworkApi(); this.initializeAuthenticationMiddleware(); - this.startListeningForRpcApiCalls(); + this.initializeServiceApi(); await this.initializeErrorMiddleware(); if (this.sslEnabled) { await this.httpsServer.listen(this.config.rpcPort); } else { await this.app.listen(this.config.rpcPort); } - - this.logger.info(`RPC module enabled, server running on port ${this.config.rpcPort}`); } initializeAuthenticationMiddleware() { @@ -91,14 +91,14 @@ class RpcController { default: return next(error) } - this.logger.error({ msg: message, Event_name: constants.ERROR_TYPE.API_ERROR_400 }); + this.logger.error({msg: message, Event_name: constants.ERROR_TYPE.API_ERROR_400}); return res.status(code).send(message); } return next(error) }) this.app.use((error, req, res, next) => { - this.logger.error({ msg: error, Event_name: constants.ERROR_TYPE.API_ERROR_500}); + this.logger.error({msg: error, Event_name: constants.ERROR_TYPE.API_ERROR_500}); return res.status(500).send(error) }) } @@ -114,7 +114,9 @@ class RpcController { } } - startListeningForRpcNetworkCalls() { + initializeNetworkApi() { + this.logger.info(`Network API module enabled, server running on port ${this.config.network.port}`); + this.networkService.handleMessage('/store', (result) => this.publishService.handleStore(result)); this.networkService.handleMessage('/resolve', (result) => this.queryService.handleResolve(result)); @@ -137,83 +139,33 @@ class RpcController { // this.networkService.handleMessage('/query', (result) => this.queryService.handleQuery(result)); } - startListeningForRpcApiCalls() { + initializeServiceApi() { + this.logger.info(`Service API module enabled, server running on port ${this.config.rpcPort}`); this.app.post('/publish', async (req, res, next) => { - if (!req.files || !req.files.file || !req.body.assets) { - return next({code: 400, message: 'File, assets, and keywords are required fields.'}); - } else { - if(!this.isArrayOfStrings(req.body.assets)){ - return next({code: 400, message: `Assets must be a non-empty array of strings, all strings must have double quotes.`}); - } - if(req.body.keywords && !this.isArrayOfStrings(req.body.keywords)) { - return next({code: 400, message: `Keywords must be a non-empty array of strings, all strings must have double quotes.`}); - } - } - - const operationId = uuidv1(); - try { - this.logger.emit({ - msg: 'Started measuring execution of publish command', - Event_name: 'publish_start', - Operation_name: 'publish', - Id_operation: operationId - }); - - const inserted_object = await Models.handler_ids.create({ - status: 'PENDING', - }); - const handlerId = inserted_object.dataValues.handler_id; - res.status(200).send({ - handler_id: handlerId, - }); - - const fileContent = req.files.file.data; - const fileExtension = path.extname(req.files.file.name).toLowerCase(); - const assets = [...new Set(JSON.parse(req.body.assets.toLowerCase()))]; - let visibility = JSON.parse(!!req.body.visibility); - let keywords = req.body.keywords ? JSON.parse(req.body.keywords.toLowerCase()) : []; - - const assertion = await this.publishService.publish(fileContent, fileExtension, assets, keywords, visibility, handlerId); - - const handlerData = { - id: assertion.id, - rootHash: assertion.rootHash, - signature: assertion.signature, - metadata: assertion.metadata, - }; - - await Models.handler_ids.update( - { - data: JSON.stringify(handlerData) - }, { - where: { - handler_id: handlerId, - }, - }, - ); - - } catch (e) { - this.logger.error({ - msg: `Unexpected error at publish route: ${e.message}. ${e.stack}`, - Event_name: constants.ERROR_TYPE.PUBLISH_ROUTE_ERROR, - Event_value1: e.message, - Id_operation: operationId - }); - } finally { - this.logger.emit({ - msg: 'Finished measuring execution of publish command', - Event_name: 'publish_end', - Operation_name: 'publish', - Id_operation: operationId + await this.publish(req, res, next, {isAsset: false}); + }); + this.app.post('/provision', async (req, res, next) => { + await this.publish(req, res, next, {isAsset: true, ual: null}); + }); + this.app.post('/update', async (req, res, next) => { + if (!req.body.ual) { + return next({ + code: 400, + message: `UAL must be a string.` }); } + await this.publish(req, res, next, {isAsset: true, ual: req.body.ual}); }); this.app.get('/resolve', async (req, res, next) => { if (!req.query.ids) { return next({code: 400, message: 'Param ids is required.'}); } + + if (!req.query.load) { + req.query.load = true; + } const operationId = uuidv1(); try { this.logger.emit({ @@ -227,40 +179,70 @@ class RpcController { status: 'PENDING', }); const handlerId = inserted_object.dataValues.handler_id; - res.status(200).send({ + res.status(202).send({ handler_id: handlerId, }); - let assertionIds = [req.query.ids]; + let ids = [req.query.ids]; if (req.query.ids instanceof Array) { - assertionIds = [...new Set(req.query.ids)]; + ids = [...new Set(req.query.ids)]; } - this.logger.info(`Resolve for assertions ids: ${assertionIds} with handler id ${handlerId} initiated.`); + this.logger.info(`Resolve for ${ids} with handler id ${handlerId} initiated.`); const response = []; - for (const assertionId of assertionIds) { - let namedGraph = await this.dataService.resolve(assertionId, true); - if (namedGraph) { - let {assertion, rdf} = await this.dataService.createAssertion(assertionId, namedGraph); - assertion.metadata = JSON.parse(sortedStringify(assertion.metadata)) - assertion.data = JSON.parse(sortedStringify(await this.dataService.fromRDF(assertion.data, assertion.metadata.type))) - response.push({ - [assertionId]: assertion - }); + for (const id of ids) { + let result = await this.dataService.resolve(id, true); + if (!result) { + let {nquads, isAsset} = result; + let assertion = await this.dataService.createAssertion(nquads); + assertion.jsonld.metadata = JSON.parse(sortedStringify(assertion.jsonld.metadata)) + assertion.jsonld.data = JSON.parse(sortedStringify(await this.dataService.fromNQuads(assertion.jsonld.data, assertion.jsonld.metadata.type))) + response.push(isAsset ? { + type: 'asset', + id: id, + asset: { + metadata: { + type: assertion.jsonld.metadata.type, + issuer: assertion.jsonld.metadata.issuer, + latestState: assertion.jsonld.metadata.timestamp, + }, + data: assertion.jsonld.data + } + } : { + type: 'assertion', + id: id, + assertion: assertion.jsonld + } + ); } else { - this.logger.info(`Searching for closest ${this.config.replicationFactor} node(s) for keyword ${assertionId}`); - let nodes = await this.networkService.findNodes(assertionId, this.config.replicationFactor); + this.logger.info(`Searching for closest ${this.config.replicationFactor} node(s) for keyword ${id}`); + let nodes = await this.networkService.findNodes(id, this.config.replicationFactor); if (nodes.length < this.config.replicationFactor) - this.logger.warn(`Found only ${nodes.length} node(s) for keyword ${assertionId}`); + this.logger.warn(`Found only ${nodes.length} node(s) for keyword ${id}`); nodes = [...new Set(nodes)]; for (const node of nodes) { - let {assertion} = await this.queryService.resolve(assertionId, node); - if (assertion) { - assertion.metadata = JSON.parse(sortedStringify(assertion.metadata)); - assertion.data = JSON.parse(sortedStringify(await this.dataService.fromRDF(assertion.data, assertion.metadata.type))) - response.push({ - [assertionId]: assertion - }); + const result = await this.queryService.resolve(id, req.query.load, node); + if (result) { + const {assertion, isAsset} = result; + assertion.jsonld.metadata = JSON.parse(sortedStringify(assertion.jsonld.metadata)) + assertion.jsonld.data = JSON.parse(sortedStringify(await this.dataService.fromNQuads(assertion.jsonld.data, assertion.jsonld.metadata.type))) + response.push(isAsset ? { + type: 'asset', + id: id, + asset: { + metadata: { + type: assertion.jsonld.metadata.type, + issuer: assertion.jsonld.metadata.issuer, + latestState: assertion.jsonld.metadata.timestamp, + }, + data: assertion.jsonld.data + } + } : { + type: 'assertion', + id: id, + assertion: assertion.jsonld + } + ); break; } } @@ -303,6 +285,20 @@ class RpcController { if (!req.query.query || req.params.search !== 'search') { return next({code: 400, message: 'Params query is necessary.'}); } + + let prefix = req.query.prefix, + limit = req.query.limit; + + if (!prefix) { + prefix = false; + } + + if (!limit || limit < 1 || !Number(limit)) { + limit = 20; + } else if (limit > 500) { + limit = 500; + } + const operationId = uuidv1(); try { this.logger.emit({ @@ -311,20 +307,18 @@ class RpcController { Operation_name: 'search', Id_operation: operationId }); - req.query.query = escape(req.query.query); - const load = req.params.load ? req.params.load : false; - const inserted_object = await Models.handler_ids.create({ status: 'PENDING', }); const handlerId = inserted_object.dataValues.handler_id; - res.status(200).send({ + res.status(202).send({ handler_id: handlerId, }); + let response; let nodes = []; - response = await this.dataService.searchAssertions(req.query.query, { }, true); + response = await this.dataService.searchAssertions(req.query.query, {limit, prefix}, true); this.logger.info(`Searching for closest ${this.config.replicationFactor} node(s) for keyword ${req.query.query}`); let foundNodes = await this.networkService.findNodes(req.query.query, this.config.replicationFactor); if (foundNodes.length < this.config.replicationFactor) @@ -349,11 +343,10 @@ class RpcController { for (const node of nodes) { await this.queryService.searchAssertions({ query: req.query.query, - load, + options: {limit, prefix}, handlerId }, node); } - } catch (e) { this.logger.error({ msg: `Unexpected error at search assertions route: ${e.message}. ${e.stack}`, @@ -372,7 +365,7 @@ class RpcController { }); this.app.get('/entities::search', async (req, res, next) => { - if ((!req.query.query && !req.query.ids) || req.params.search !== 'search') { + if (!req.query.query || req.params.search !== 'search') { return next({code: 400, message: 'Params query or ids are necessary.'}); } const operationId = uuidv1(); @@ -385,15 +378,7 @@ class RpcController { }); let query = escape(req.query.query), ids, issuers, types, prefix = req.query.prefix, - limit = req.query.limit, - framingCriteria = req.query.framingCriteria; - - if (req.query.ids) { - ids = [req.query.ids]; - if (req.query.ids instanceof Array) { - ids = [...new Set(req.query.ids)]; - } - } + limit = req.query.limit; if (req.query.issuers) { issuers = [req.query.issuers]; @@ -435,16 +420,6 @@ class RpcController { nodes = await this.networkService.findNodes(query, this.config.replicationFactor); if (nodes.length < this.config.replicationFactor) this.logger.warn(`Found only ${nodes.length} node(s) for keyword ${query}`); - } else { - response = await this.dataService.searchByIds(ids, {issuers, types, limit}, true); - for (const id of ids) { - this.logger.info(`Searching for closest ${this.config.replicationFactor} node(s) for keyword ${id}`); - let foundNodes = await this.networkService.findNodes(id, this.config.replicationFactor); - if (foundNodes.length < this.config.replicationFactor) - this.logger.warn(`Found only ${foundNodes.length} node(s) for keyword ${id}`); - nodes = nodes.concat(foundNodes); - } - nodes = [...new Set(nodes)]; } const handlerIdCachePath = this.fileService.getHandlerIdCachePath(); @@ -463,7 +438,6 @@ class RpcController { for (const node of nodes) { await this.queryService.search({ query, - ids, issuers, types, prefix, @@ -518,7 +492,7 @@ class RpcController { let response = await this.dataService.runQuery(req.body.query, req.query.type.toUpperCase()); const handlerIdCachePath = this.fileService.getHandlerIdCachePath(); - if(response) { + if (response) { await this.fileService .writeContentsToFile(handlerIdCachePath, handlerId, JSON.stringify(response)); } @@ -637,7 +611,7 @@ class RpcController { }); this.app.get('/:operation/result/:handler_id', async (req, res, next) => { - if (!['publish', 'resolve', 'query', 'entities:search', 'assertions:search', 'proofs:get'].includes(req.params.operation)) { + if (!['provision', 'resolve', 'query', 'entities:search', 'assertions:search', 'proofs:get'].includes(req.params.operation)) { return next({ code: 400, message: 'Unexisting operation, available operations are: publish, resolve, query, proofs and search' @@ -664,14 +638,14 @@ class RpcController { const documentPath = this.fileService.getHandlerIdDocumentPath(handler_id); switch (req.params.operation) { case 'entities:search': - handlerData.data = await this.fileService.loadJsonFromFile(documentPath); + handlerData.data = await this.fileService.loadJsonFromFile(documentPath); - response = handlerData.data.map(async (x) => ({ + response = handlerData.data.map((x) => ({ "@type": "EntitySearchResult", "result": { "@id": x.id, "@type": x.type.toUpperCase(), - ...(await this.dataService.frameAsset(x.data, x.type)) + "timestamp": x.timestamp, }, "issuers": x.issuers, "assertions": x.assertions, @@ -679,8 +653,6 @@ class RpcController { "resultScore": 0 })); - response = await Promise.all(response); - res.send({ "@context": { "@vocab": "http://schema.org/", @@ -695,7 +667,7 @@ class RpcController { }); break; case 'assertions:search': - handlerData.data = await this.fileService.loadJsonFromFile(documentPath); + handlerData.data = await this.fileService.loadJsonFromFile(documentPath); response = handlerData.data.map(async (x) => ({ "@type": "AssertionSearchResult", @@ -724,18 +696,23 @@ class RpcController { "itemListElement": response }); break; + case 'resolve': + if (handlerData) { + handlerData.data = await this.fileService.loadJsonFromFile(documentPath); + } + res.status(200).send({status: handlerData.status, data: handlerData.data}); + break; + case 'provision': case 'publish': - const result = {}; - if (handlerData.data) { - const {rdf, assertion} = await this.fileService.loadJsonFromFile(documentPath); - result.data = JSON.parse(handlerData.data); - result.data.rdf = rdf; - result.data.assertion = assertion; + case 'update': + if (handlerData) { + const result = await this.fileService.loadJsonFromFile(documentPath); + handlerData.data = result.assertion; } - res.status(200).send({status: handlerData.status, data: result.data}); + res.status(200).send({status: handlerData.status, data: handlerData.data}); break; default: - handlerData.data = await this.fileService.loadJsonFromFile(documentPath); + handlerData.data = await this.fileService.loadJsonFromFile(documentPath); res.status(200).send({status: handlerData.status, data: handlerData.data}); break; @@ -778,16 +755,92 @@ class RpcController { }); } - isArrayOfStrings(arr) { - try { - const bodyAssets = JSON.parse(arr.toLowerCase()); - if (!(Array.isArray(bodyAssets)) | !(bodyAssets.length > 0) | !bodyAssets.every(i => (typeof i === "string")) | bodyAssets[0] === "") { - return false; - } - } catch (e) { - return false; + async publish(req, res, next, options) { + if (!req.files || !req.files.file || path.extname(req.files.file.name).toLowerCase() !== '.json') { + return next({code: 400, message: 'Assertion file is required field and must be in JSON-LD format.'}); + //TODO determine file size limit + } else if (req.files.file.size > 268435456) { + return next({ + code: 400, + message: `File size limit is 256MB.` + }); + } else if (req.body.keywords && !Utilities.isArrayOfStrings(req.body.keywords)) { + return next({ + code: 400, + message: `Keywords must be a non-empty array of strings, all strings must have double quotes.` + }); + } else if (req.body.visibility && !['public', 'private'].includes(req.body.visibility)) { + return next({ + code: 400, + message: `Visibility must be a string, value can be public or private.` + }); } - return true; + + const operationId = uuidv1(); + this.logger.emit({ + msg: 'Started measuring execution of publish command', + Event_name: 'publish_start', + Operation_name: 'publish', + Id_operation: operationId + }); + + const handlerObject = await Models.handler_ids.create({ + status: 'PENDING', + }) + + const handlerId = handlerObject.dataValues.handler_id; + res.status(202).send({ + handler_id: handlerId, + }); + + const fileContent = req.files.file.data; + const fileExtension = path.extname(req.files.file.name).toLowerCase(); + const visibility = req.body.visibility ? req.body.visibility.toLowerCase() : 'public'; + const ual = options.isAsset ? options.ual : undefined; + + let promise; + if (req.body.keywords) { + promise = this.workerPool.exec('JSONParse', [req.body.keywords.toLowerCase()]); + } else { + promise = new Promise((accept) => accept([])); + } + + promise + .then(keywords => this.publishService.publish(fileContent, fileExtension, keywords, visibility, ual, handlerId)) + .then(assertion => { + const handlerData = { + id: assertion.id, + rootHash: assertion.rootHash, + signature: assertion.signature, + metadata: assertion.metadata, + }; + + Models.handler_ids.update( + { + data: JSON.stringify(handlerData) + }, { + where: { + handler_id: handlerId, + }, + }, + ); + }) + .catch(e => { + this.logger.error({ + msg: `Unexpected error at publish route: ${e.message}. ${e.stack}`, + Event_name: constants.ERROR_TYPE.PUBLISH_ROUTE_ERROR, + Event_value1: e.message, + Id_operation: operationId + }); + }) + .then(() => { + this.logger.emit({ + msg: 'Finished measuring execution of publish command', + Event_name: 'publish_end', + Operation_name: 'publish', + Id_operation: operationId + }); + }); } } diff --git a/modules/service/data-service.js b/modules/service/data-service.js index 996b6a96ba..928051453f 100644 --- a/modules/service/data-service.js +++ b/modules/service/data-service.js @@ -1,6 +1,8 @@ -const { v1: uuidv1 } = require('uuid'); +const {v1: uuidv1} = require('uuid'); const constants = require('../constants'); const GraphDB = require('../../external/graphdb-service'); +const workerpool = require('workerpool'); + class DataService { constructor(ctx) { @@ -10,6 +12,7 @@ class DataService { this.validationService = ctx.validationService; this.networkService = ctx.networkService; this.nodeService = ctx.nodeService; + this.workerPool = ctx.workerPool; } getName() { @@ -54,31 +57,29 @@ class DataService { async canonize(fileContent, fileExtension) { switch (fileExtension) { - case '.json': - let jsonContent = JSON.parse(fileContent); - - const timestamp = new Date().toISOString(); - const rdf = await this.implementation.toRDF(jsonContent); - - let type = jsonContent['@type']; - delete jsonContent['@type']; - if (!type) { - type = 'default'; - } - - jsonContent = await this.fromRDF(rdf, type); - return { - assertion: { - data: jsonContent, + case '.json': + const assertion = { metadata: { - type, - timestamp, + timestamp: new Date().toISOString() }, - }, - rdf, - }; - default: - throw new Error('File format is not supported.'); + data: await this.workerPool.exec('JSONParse', [fileContent.toString()]) + } + const nquads = await this.workerPool.exec('toNQuads', [assertion.data]) + if (nquads && nquads.length === 0) { + throw new Error(`File format is corrupted, no n-quads extracted.`); + } + + let type = assertion.data['@type']; + delete assertion.data['@type']; + if (!type) { + type = 'default'; + } + assertion.metadata.type = type; + assertion.data = await this.fromNQuads(nquads, type); + + return {assertion, nquads}; + default: + throw new Error(`File extension ${fileExtension} is not supported.`); } } @@ -91,41 +92,33 @@ class DataService { } } - async resolve(assertionId, localQuery = false) { + async resolve(id, localQuery = false, metadataOnly = false) { try { - const rdf = await this.implementation.resolve(assertionId); - if (!localQuery && rdf && rdf.find((x) => x.includes(` "false"^^ .`))) { + let {nquads, isAsset} = await this.implementation.resolve(id); + if (!localQuery && nquads && nquads.find((x) => x.includes(` "private" .`))) { return null; } - return rdf; + if (metadataOnly) { + nquads = nquads.filter((x) => x.startsWith(``)); + } + return {nquads, isAsset}; } catch (e) { this.handleUnavailableTripleStoreError(e); } } - async createAssertion(assertionId, rdf) { - const metadata = rdf.filter((x) => x.startsWith(' !x.startsWith(' !x.includes('hasKeyword') && !x.includes('hasAsset') && !x.includes('hasRootHash') && !x.includes('hasBlockchain') && !x.includes('hasTransactionHash')); - const assertion = await this.implementation.extractMetadata(metadata); - assertion.id = assertionId; - assertion.data = data; - return { assertion, rdf }; + async createAssertion(nquads) { + const metadata = nquads.filter((x) => x.startsWith(' !x.startsWith(' !x.includes('hasRootHash') && !x.includes('hasBlockchain') && !x.includes('hasTransactionHash')); + const jsonld = await this.implementation.extractMetadata(metadata); + jsonld.data = data; + return {jsonld, nquads}; } verifyAssertion(assertion, rdf) { return new Promise(async (resolve) => { try { - const array = rdf.join('\n').match(//gm) - if (array.find(x => !x.includes(``))) { - this.logger.error({ - msg: 'Invalid assertion in named graph', - Event_name: constants.ERROR_TYPE.VERIFY_ASSERTION_ERROR, - Event_value1: 'Invalid assertion in named graph', - }); - resolve(false); - } - // let dataHash; // if (assertion.metadata.visibility) { // const framedData = await this.fromRDF(assertion.data, assertion.metadata.type); @@ -133,7 +126,7 @@ class DataService { // } else { // dataHash = assertion.metadata.dataHash; // } - const { dataHash } = assertion.metadata; + const {dataHash} = assertion.metadata; const metadataHash = this.validationService.calculateHash(assertion.metadata); const calculatedAssertionId = this.validationService.calculateHash(metadataHash + dataHash); @@ -157,14 +150,15 @@ class DataService { if (assertion.metadata.visibility) { const calculateRootHash = this.validationService.calculateRootHash([...new Set(rdf)]); - if (assertion.rootHash !== calculateRootHash) { - this.logger.error({ - msg: `Root hash ${assertion.rootHash} doesn't match with calculated ${calculateRootHash}`, - Event_name: constants.ERROR_TYPE.VERIFY_ASSERTION_ERROR, - Event_value1: 'Root hash not matching calculated', - }); - return resolve(false); - } + //TODO integrate blockchain + // if (assertion.rootHash !== calculateRootHash) { + // this.logger.error({ + // msg: `Root hash ${assertion.rootHash} doesn't match with calculated ${calculateRootHash}`, + // Event_name: constants.ERROR_TYPE.VERIFY_ASSERTION_ERROR, + // Event_value1: 'Root hash not matching calculated', + // }); + // return resolve(false); + // } } return resolve(true); } catch (e) { @@ -175,66 +169,54 @@ class DataService { async searchByQuery(query, options, localQuery = false) { try { - const assets = await this.implementation.searchByQuery(query, options, localQuery); - if (!assets) return null; - const result = []; - for (const asset of assets) { - const assertions = asset.assertions.value.split(',').filter((x) => x !== ''); - for (let assertionId of assertions) { - assertionId = assertionId.replace('did:dkg:', ''); + const assertions = await this.implementation.findAssetsByKeyword(query, options, localQuery); + if (!assertions) return null; - const rawRdf = await this.resolve(assertionId, localQuery); - if (!rawRdf) continue; - if (localQuery) { - const {assertion, rdf} = await this.createAssertion(assertionId, rawRdf); - - let object = result.find((x) => x.type === assertion.metadata.type && x.id === asset.assetId.value); - if (!object) { - object = { - type: assertion.metadata.type, - id: asset.assetId.value, - timestamp: assertion.metadata.timestamp, - data: [], - issuers: [], - assertions: [], - nodes: [this.networkService.getPeerId()], - }; - result.push(object); - } + const result = []; + for (let assertion of assertions) { + const assertionId = assertion.assertionId = assertion.assertionId.value.replace('did:dkg:', ''); + + assertion = await this.resolve(assertion.assertionId, localQuery, true); + if (!assertion) continue; + + + if (localQuery) { + assertion = await this.createAssertion(assertion.nquads); + + let object = result.find((x) => x.type === assertion.jsonld.metadata.type && x.id === assertion.jsonld.metadata.UALs[0]); + if (!object) { + object = { + id: assertion.jsonld.metadata.UALs[0], + type: assertion.jsonld.metadata.type, + timestamp: assertion.jsonld.metadata.timestamp, + issuers: [], + assertions: [], + nodes: [this.networkService.getPeerId()], + }; + result.push(object); + } - if (object.issuers.indexOf(assertion.metadata.issuer) === -1) { - object.issuers.push(assertion.metadata.issuer); - } + if (object.issuers.indexOf(assertion.jsonld.metadata.issuer) === -1) { + object.issuers.push(assertion.jsonld.metadata.issuer); + } - if (object.assertions.indexOf(assertion.id) === -1) { - object.assertions.push(assertion.id); - object.data.push({ - id: assertion.id, - timestamp: assertion.metadata.timestamp, - data: assertion.data, - }); - } - if (new Date(object.timestamp) < new Date(assertion.metadata.timestamp)) { - object.timestamp = assertion.metadata.timestamp; - } - } else { - let object = result.find((x) => x.assetId === asset.assetId.value); - if (!object) { - object = { - assetId: asset.assetId.value, - assertions: [], - }; - result.push(object); - } - if (!object.assertions.find((x) => x.id === assertionId)) { - object.assertions.push({ - id: assertionId, - node: this.networkService.getPeerId(), - rdf: rawRdf, - }); - } + if (object.assertions.indexOf(assertion.jsonld.id) === -1) { + object.assertions.push(assertion.jsonld.id); + } + if (new Date(object.timestamp) < new Date(assertion.jsonld.metadata.timestamp)) { + object.timestamp = assertion.jsonld.metadata.timestamp; + } + } else { + let object = result.find((x) => x.id === assertionId); + if (!object) { + object = { + assertionId, + node: this.networkService.getPeerId(), + nquads: assertion.nquads, + }; + result.push(object); } } } @@ -260,7 +242,7 @@ class DataService { if (!rawRdf) continue; if (localQuery) { - const { assertion, rdf } = await this.createAssertion(assertionId, rawRdf); + const {assertion, rdf} = await this.createAssertion(assertionId, rawRdf); let object = result.find((x) => x.type === assertion.metadata.type && x.id === asset.assetId.value); if (!object) { @@ -319,41 +301,37 @@ class DataService { async searchAssertions(query, options, localQuery = false) { try { - const assets = await this.implementation.searchByQuery(query, options, localQuery); - if (!assets) return null; + const assertions = await this.implementation.findAssertionsByKeyword(query, options, localQuery); + if (!assertions) return null; const result = []; - for (const asset of assets) { - const assertions = asset.assertions.value.split(',').filter((x) => x !== ''); - for (let assertionId of assertions) { - assertionId = assertionId.replace('did:dkg:', ''); - - const rawRdf = await this.resolve(assertionId, localQuery); - if (!rawRdf) continue; - - if (localQuery) { - const {assertion, rdf} = await this.createAssertion(assertionId, rawRdf); - let object = result.find((x) => x.id === assertion.id); - if (!object) { - object = { - id: assertion.id, - metadata: assertion.metadata, - signature: assertion.signature, - rootHash: assertion.rootHash, - nodes: [this.networkService.getPeerId()], - }; - result.push(object); - } - } else { - let object = result.find((x) => x.id === assertionId); - if (!object) { - object = { - assertionId, - node: this.networkService.getPeerId(), - rdf: rawRdf, - }; - result.push(object); - } + for (let assertion of assertions) { + const assertionId = assertion.assertionId = assertion.assertionId.value.replace('did:dkg:', ''); + + assertion = await this.resolve(assertion.assertionId, localQuery, true); + if (!assertion) continue; + + if (localQuery) { + assertion = await this.createAssertion(assertion.nquads); + let object = result.find((x) => x.id === assertion.id); + if (!object) { + object = { + id: assertion.jsonld.id, + metadata: assertion.jsonld.metadata, + signature: assertion.jsonld.signature, + nodes: [this.networkService.getPeerId()], + }; + result.push(object); + } + } else { + let object = result.find((x) => x.id === assertionId); + if (!object) { + object = { + assertionId, + node: this.networkService.getPeerId(), + nquads: assertion.nquads, + }; + result.push(object); } } } @@ -389,23 +367,23 @@ class DataService { }); try { switch (type) { - // case 'SELECT': - // result = this.implementation.execute(query); - // break; - case 'CONSTRUCT': - result = await this.implementation.construct(query); - result = result.toString(); - if (result) { - result = result.split('\n').filter((x) => x !== ''); - } else { - result = []; - } - break; - // case 'ASK': - // result = this.implementation.ask(query); - // break; - default: - throw Error('Query type not supported'); + // case 'SELECT': + // result = this.implementation.execute(query); + // break; + case 'CONSTRUCT': + result = await this.implementation.construct(query); + result = result.toString(); + if (result) { + result = result.split('\n').filter((x) => x !== ''); + } else { + result = []; + } + break; + // case 'ASK': + // result = this.implementation.ask(query); + // break; + default: + throw Error('Query type not supported'); } return result; } catch (e) { @@ -420,7 +398,7 @@ class DataService { } } - async fromRDF(rdf, type) { + async fromNQuads(nquads, type) { const Id_operation = uuidv1(); this.logger.emit({ msg: 'Started measuring execution of fromRDF command', @@ -428,46 +406,47 @@ class DataService { Operation_name: 'fromrdf', Id_operation, }); - let context; let + let context; + let frame; switch (type) { - case this.constants.GS1EPCIS: - context = { - '@context': [ - 'https://gs1.github.io/EPCIS/epcis-context.jsonld', - { - example: 'http://ns.example.com/epcis/', - }, - ], - }; - - frame = { - '@context': [ - 'https://gs1.github.io/EPCIS/epcis-context.jsonld', - { - example: 'http://ns.example.com/epcis/', - }, - ], - isA: 'EPCISDocument', - }; - break; - default: - context = { - '@context': ['https://www.schema.org/'], - }; - - frame = {}; + case this.constants.GS1EPCIS: + context = { + '@context': [ + 'https://gs1.github.io/EPCIS/epcis-context.jsonld', + { + example: 'http://ns.example.com/epcis/', + }, + ], + }; + + frame = { + '@context': [ + 'https://gs1.github.io/EPCIS/epcis-context.jsonld', + { + example: 'http://ns.example.com/epcis/', + }, + ], + isA: 'EPCISDocument', + }; + break; + default: + context = { + '@context': ['https://www.schema.org/'], + }; + + frame = {}; } + const json = await this.workerPool.exec('fromNQuads', [nquads, context, frame]) - const data = await this.implementation.fromRDF(rdf, context, frame); this.logger.emit({ msg: 'Finished measuring execution of fromRDF command', Event_name: 'fromrdf_end', Operation_name: 'fromrdf', Id_operation, }); - return data; - // return sort(data).asc(); + + return json; } async frameAsset(data, type, framingCriteria) { @@ -495,22 +474,21 @@ class DataService { return this.implementation.restartService(); } - async appendMetadata(rdf, assertion) { + async appendMetadata(nquads, assertion) { const metadata = await this.implementation.createMetadata(assertion); - rdf = rdf.concat(metadata); - return rdf; - } - - async appendBlockchainMetadata(rdf, assertion) { - const metadata = await this.implementation.createBlockchainMetadata(assertion); - rdf = rdf.concat(metadata); - return rdf; + nquads = nquads.concat(metadata); + return nquads; } - async appendConnections(rdf, options) { - const connections = await this.implementation.createConnections(options); - rdf = rdf.concat(connections); - return rdf; + async appendBlockchainMetadata(nquads, assertion) { + const blockchainMetadata = await this.workerPool.exec('toNQuads', [{ + '@context': 'https://www.schema.org/', + '@id': `did:dkg:${assertion.id}`, + hasBlockchain: assertion.blockchain.name, + hasTransactionHash: assertion.blockchain.transactionHash, + }]); + nquads = nquads.concat(blockchainMetadata); + return nquads; } handleUnavailableTripleStoreError(e) { diff --git a/modules/service/dependency-injection.js b/modules/service/dependency-injection.js index 466d20fd74..3737578744 100644 --- a/modules/service/dependency-injection.js +++ b/modules/service/dependency-injection.js @@ -6,7 +6,7 @@ class DependencyInjection { injectionMode: awilix.InjectionMode.PROXY, }); - container.loadModules(['modules/controller/**/*.js', 'modules/service/**/*.js', 'modules/command/**/*.js', 'modules/manager/**/*.js'], { + container.loadModules(['modules/controller/**/*.js', 'modules/service/**/*.js', 'modules/command/**/*.js', 'modules/manager/**/*.js', 'modules/worker/worker-pool.js'], { formatName: 'camelCase', resolverOptions: { lifetime: awilix.Lifetime.SINGLETON, diff --git a/modules/service/publish-service.js b/modules/service/publish-service.js index 8f761d9693..24e2b64c3e 100644 --- a/modules/service/publish-service.js +++ b/modules/service/publish-service.js @@ -7,58 +7,52 @@ class PublishService { this.logger = ctx.logger; this.commandExecutor = ctx.commandExecutor; this.fileService = ctx.fileService; + this.workerPool = ctx.workerPool; } - async publish(fileContent, fileExtension, rawAssets, keywords, visibility, handlerId) { + async publish(fileContent, fileExtension, keywords, visibility, ual, handlerId) { let { assertion, - rdf, + nquads, } = await this.dataService.canonize(fileContent, fileExtension); assertion.metadata.issuer = this.validationService.getIssuer(); assertion.metadata.visibility = visibility; + assertion.metadata.keywords = keywords; + assertion.metadata.keywords.sort(); + if (ual === null) { + ual = this.validationService.calculateHash(assertion.metadata.timestamp + assertion.metadata.type + assertion.metadata.issuer); + assertion.metadata.UALs = [ual]; + } else if (ual !== undefined) { + assertion.metadata.UALs = [ual]; + } + assertion.metadata.dataHash = this.validationService.calculateHash(assertion.data); assertion.metadataHash = this.validationService.calculateHash(assertion.metadata); assertion.id = this.validationService.calculateHash(assertion.metadataHash + assertion.metadata.dataHash); assertion.signature = this.validationService.sign(assertion.id); - keywords = [...new Set(keywords.concat(rawAssets))]; + nquads = await this.dataService.appendMetadata(nquads, assertion); + assertion.rootHash = this.validationService.calculateRootHash(nquads); - const assets = []; - for (const asset of rawAssets) { - assets.push(this.validationService.calculateHash(asset + assertion.metadata.type + assertion.metadata.issuer)); + if (ual !== undefined) { + this.logger.info(`UAL: ${ual}`); } - - rdf = await this.dataService.appendMetadata(rdf, assertion); - assertion.rootHash = this.validationService.calculateRootHash(rdf); - rdf = await this.dataService.appendConnections(rdf, { - assertionId: assertion.id, - assets, - keywords, - rootHash: assertion.rootHash, - }); - - if (!assertion.metadata.visibility) { - rdf = rdf.filter((x) => x.startsWith(' x.type === assertion.metadata.type && x.id === asset.assetId) - if (!object) { - object = { - type: assertion.metadata.type, - id: asset.assetId, - timestamp: assertion.metadata.timestamp, - data: [], - issuers: [], - assertions: [], - nodes: [rawAssertion.node] - } - handlerData.push(object) - } - - - if (object.nodes.indexOf(rawAssertion.node) === -1) { - object.nodes.push(rawAssertion.node); - } - - if (object.issuers.indexOf(assertion.metadata.issuer) === -1) { - object.issuers.push(assertion.metadata.issuer); - } - - if (object.assertions.indexOf(assertion.id) === -1) { - object.assertions.push(assertion.id); - object.data.push({ - id: assertion.id, - timestamp: assertion.metadata.timestamp, - data: assertion.data - }); - } - if (new Date(object.timestamp) < new Date(assertion.metadata.timestamp)) { - object.timestamp = assertion.metadata.timestamp; - } + for (const assertion of response) { + if (!assertion || !assertion.nquads) continue; + + const { jsonld, nquads } = await this.dataService.createAssertion(assertion.nquads); + let object = handlerData.find(x => x.type === jsonld.metadata.type && x.id === jsonld.metadata.UALs[0]) + if (!object) { + object = { + type: jsonld.metadata.type, + id: jsonld.metadata.UALs[0], + timestamp: jsonld.metadata.timestamp, + issuers: [], + assertions: [], + nodes: [assertion.node] } + handlerData.push(object) + } + + if (object.nodes.indexOf(assertion.node) === -1) { + object.nodes.push(assertion.node); + } + + if (object.issuers.indexOf(jsonld.metadata.issuer) === -1) { + object.issuers.push(jsonld.metadata.issuer); + } + + if (object.assertions.indexOf(jsonld.id) === -1) { + object.assertions.push(jsonld.id); + } + if (new Date(object.timestamp) < new Date(jsonld.metadata.timestamp)) { + object.timestamp = jsonld.metadata.timestamp; } } + await this.fileService.writeContentsToFile( this.fileService.getHandlerIdCachePath(), handlerId, @@ -128,14 +114,14 @@ class QueryService { } async handleSearchAssertions(request) { - const {query, handlerId, load } = request; - let response = await this.dataService.searchAssertions(query, { }); - return { response, handlerId, load }; + const {query, options, handlerId} = request; + let response = await this.dataService.searchAssertions(query, options); + return {response, handlerId}; } async handleSearchAssertionsResult(request) { // TODO: add mutex - const { handlerId, response, load } = request; + const {handlerId, response} = request; const documentPath = this.fileService.getHandlerIdDocumentPath(handlerId); const handlerData = await this.fileService.loadJsonFromFile(documentPath); @@ -146,29 +132,21 @@ class QueryService { if (assertion.nodes.indexOf(object.node) === -1) assertion.nodes = [...new Set(assertion.nodes.concat(object.node))] } else { - if (!object || !object.rdf) + if (!object || !object.nquads) continue - const {assertion, rdf} = await this.dataService.createAssertion(object.assertionId, object.rdf); - const status = await this.dataService.verifyAssertion(assertion, rdf); - //todo check root hash on the blockchain - if (status) { - handlerData.push({ - id: assertion.id, - metadata: assertion.metadata, - signature: assertion.signature, - rootHash: assertion.rootHash, - nodes: [object.node] - }) - - if (load) { - await this.dataService.insert(object.rdf, `did:dkg:${object.assertionId}`); - this.logger.info(`Assertion ${object.assertionId} is successfully inserted`); - } - } + const assertion = await this.dataService.createAssertion(object.nquads); + + handlerData.push({ + id: assertion.jsonld.id, + metadata: assertion.jsonld.metadata, + signature: assertion.jsonld.signature, + nodes: [object.node] + }) } } + await this.fileService.writeContentsToFile( this.fileService.getHandlerIdCachePath(), handlerId, diff --git a/modules/Utilities.js b/modules/utilities.js similarity index 64% rename from modules/Utilities.js rename to modules/utilities.js index 7e1983f429..3b8e327540 100644 --- a/modules/Utilities.js +++ b/modules/utilities.js @@ -23,6 +23,20 @@ exports.createPutRecord = (key, value) => { return rec.serialize(); }; + + +exports.isArrayOfStrings = (arr) => { + try { + const bodyAssets = JSON.parse(arr.toLowerCase()); + if (!(Array.isArray(bodyAssets)) | !(bodyAssets.length > 0) | !bodyAssets.every(i => (typeof i === "string")) | bodyAssets[0] === "") { + return false; + } + } catch (e) { + return false; + } + return true; +} + class Utilities { } diff --git a/modules/worker/l1-worker.js b/modules/worker/l1-worker.js new file mode 100644 index 0000000000..c45e8050e2 --- /dev/null +++ b/modules/worker/l1-worker.js @@ -0,0 +1,41 @@ +const workerpool = require('workerpool'); +const jsonld = require("jsonld"); + +function JSONParse(args) { + return JSON.parse(args); +} + +function JSONStringify(args) { + return JSON.stringify(args); +} + +async function toNQuads(json) { + let canonized = await jsonld.canonize(json, { + algorithm: 'URDNA2015', + format: 'application/n-quads', + }); + + return canonized.split('\n').filter((x) => x !== ''); +} + +function fromNQuads(nquads, context, frame) { + return new Promise((accept, reject) => { + jsonld.fromRDF(nquads.join('\n'), { + algorithm: 'URDNA2015', + format: 'application/n-quads', + }).then(json => + jsonld.frame(json, frame) + ).then((json) => + jsonld.compact(json, context) + ).then(result => { + accept(result); + }).catch(err => reject(err)) + }); +} + +workerpool.worker({ + JSONParse: JSONParse, + JSONStringify: JSONStringify, + toNQuads: toNQuads, + fromNQuads: fromNQuads +}); \ No newline at end of file diff --git a/modules/worker/worker-pool.js b/modules/worker/worker-pool.js new file mode 100644 index 0000000000..682feead81 --- /dev/null +++ b/modules/worker/worker-pool.js @@ -0,0 +1,29 @@ +const workerpool = require("workerpool"); +const jsonld = require("jsonld"); + + +class WorkerPool { + constructor() { + //TODO minWorkers and maxWorkers to be determined automatically by number of logical cores + //TODO is it necessary to terminate the pool? + this.pool = workerpool.pool(__dirname + '/l1-worker.js',{minWorkers: 2, maxWorkers: 4}); + } + + offload(fn, args) { + return new Promise((accept, reject) => { + this.pool.exec(fn, args) + .then(function (result) { + accept(result); + }) + .catch(function (err) { + reject(err); + }); + }) + } + + exec(name, args) { + return this.pool.exec(name, args) + } +} + +module.exports = WorkerPool; \ No newline at end of file diff --git a/package.json b/package.json index 2fb98df389..6b6189c6a3 100644 --- a/package.json +++ b/package.json @@ -93,6 +93,7 @@ "uuid": "^8.3.2", "validator": "^13.7.0", "watchdog": "^0.8.17", - "web3": "^1.6.0" + "web3": "^1.6.0", + "workerpool": "^6.2.0" } } From cbafc0e41ee63482b13a09bbb687b65e4eafb520 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 9 Feb 2022 09:59:36 +0100 Subject: [PATCH 10/50] update resolve endpoint --- modules/controller/rpc-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/controller/rpc-controller.js b/modules/controller/rpc-controller.js index ab9311012e..3f39ee730b 100644 --- a/modules/controller/rpc-controller.js +++ b/modules/controller/rpc-controller.js @@ -192,7 +192,7 @@ class RpcController { for (const id of ids) { let result = await this.dataService.resolve(id, true); - if (!result) { + if (result) { let {nquads, isAsset} = result; let assertion = await this.dataService.createAssertion(nquads); assertion.jsonld.metadata = JSON.parse(sortedStringify(assertion.jsonld.metadata)) From bac3f707716414ebca18e15586e9b1a12c462071 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 9 Feb 2022 11:14:19 +0100 Subject: [PATCH 11/50] update postman collection --- modules/controller/rpc-controller.js | 25 +- postman/DKGv6.postman_collection.json | 607 ++++++++++++++++++++------ 2 files changed, 478 insertions(+), 154 deletions(-) diff --git a/modules/controller/rpc-controller.js b/modules/controller/rpc-controller.js index 3f39ee730b..099ade6f7a 100644 --- a/modules/controller/rpc-controller.js +++ b/modules/controller/rpc-controller.js @@ -142,13 +142,13 @@ class RpcController { initializeServiceApi() { this.logger.info(`Service API module enabled, server running on port ${this.config.rpcPort}`); - this.app.post('/publish', async (req, res, next) => { + this.app.post('/api/latest/publish', async (req, res, next) => { await this.publish(req, res, next, {isAsset: false}); }); - this.app.post('/provision', async (req, res, next) => { + this.app.post('/api/latest/provision', async (req, res, next) => { await this.publish(req, res, next, {isAsset: true, ual: null}); }); - this.app.post('/update', async (req, res, next) => { + this.app.post('/api/latest/update', async (req, res, next) => { if (!req.body.ual) { return next({ code: 400, @@ -158,7 +158,7 @@ class RpcController { await this.publish(req, res, next, {isAsset: true, ual: req.body.ual}); }); - this.app.get('/resolve', async (req, res, next) => { + this.app.get('/api/latest/resolve', async (req, res, next) => { if (!req.query.ids) { return next({code: 400, message: 'Param ids is required.'}); } @@ -200,7 +200,7 @@ class RpcController { response.push(isAsset ? { type: 'asset', id: id, - asset: { + result: { metadata: { type: assertion.jsonld.metadata.type, issuer: assertion.jsonld.metadata.issuer, @@ -229,7 +229,7 @@ class RpcController { response.push(isAsset ? { type: 'asset', id: id, - asset: { + result: { metadata: { type: assertion.jsonld.metadata.type, issuer: assertion.jsonld.metadata.issuer, @@ -281,7 +281,7 @@ class RpcController { } }); - this.app.get('/assertions::search', async (req, res, next) => { + this.app.get('/api/latest/assertions::search', async (req, res, next) => { if (!req.query.query || req.params.search !== 'search') { return next({code: 400, message: 'Params query is necessary.'}); } @@ -364,7 +364,7 @@ class RpcController { } }); - this.app.get('/entities::search', async (req, res, next) => { + this.app.get('/api/latest/entities::search', async (req, res, next) => { if (!req.query.query || req.params.search !== 'search') { return next({code: 400, message: 'Params query or ids are necessary.'}); } @@ -463,7 +463,7 @@ class RpcController { } }); - this.app.post('/query', async (req, res, next) => { + this.app.post('/api/latest/query', async (req, res, next) => { if (!req.body.query || !req.query.type) { return next({code: 400, message: 'Params query and type are necessary.'}); } @@ -536,7 +536,7 @@ class RpcController { } }); - this.app.post('/proofs::get', async (req, res, next) => { + this.app.post('/api/latest/proofs::get', async (req, res, next) => { if (!req.body.nquads) { return next({code: 400, message: 'Params query and type are necessary.'}); } @@ -610,7 +610,7 @@ class RpcController { } }); - this.app.get('/:operation/result/:handler_id', async (req, res, next) => { + this.app.get('/api/latest/:operation/result/:handler_id', async (req, res, next) => { if (!['provision', 'resolve', 'query', 'entities:search', 'assertions:search', 'proofs:get'].includes(req.params.operation)) { return next({ code: 400, @@ -707,6 +707,7 @@ class RpcController { case 'update': if (handlerData) { const result = await this.fileService.loadJsonFromFile(documentPath); + delete result.assertion.data; handlerData.data = result.assertion; } res.status(200).send({status: handlerData.status, data: handlerData.data}); @@ -733,7 +734,7 @@ class RpcController { } }); - this.app.get('/info', async (req, res, next) => { + this.app.get('/api/latest/info', async (req, res, next) => { try { let version = pjson.version; diff --git a/postman/DKGv6.postman_collection.json b/postman/DKGv6.postman_collection.json index dfeb62b6f8..dbb72b12d4 100644 --- a/postman/DKGv6.postman_collection.json +++ b/postman/DKGv6.postman_collection.json @@ -1,104 +1,333 @@ { "info": { - "_postman_id": "d88a8124-f950-4bb2-a9cf-f07512d63555", + "_postman_id": "b6a0c71d-0397-4f56-8da6-750dc613207c", "name": "DKGv6", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { - "name": "Info", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "method": "GET", - "header": [], - "body": { - "mode": "formdata", - "formdata": [] - }, - "url": { - "raw": "{{HOST}}/info", - "host": [ - "{{HOST}}" - ], - "path": [ - "info" - ] - } - }, - "response": [] - }, - { - "name": "Publish", - "request": { - "auth": { - "type": "noauth" + "name": "Asset API", + "item": [ + { + "name": "Provision", + "request": { + "auth": { + "type": "noauth" + }, + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "src": "/Users/miloskotlar/ot-node-v6-poc/nft-data/axie1.json" + }, + { + "key": "keywords", + "value": "[\"Claude\",\"InformationTheory\", \"Cryptographer\"]", + "type": "text" + }, + { + "key": "visibility", + "value": "public", + "type": "text" + } + ] + }, + "url": { + "raw": "{{HOST}}:8900/api/latest/provision", + "host": [ + "{{HOST}}" + ], + "port": "8900", + "path": [ + "api", + "latest", + "provision" + ] + } + }, + "response": [] }, - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "type": "file", - "src": [] + { + "name": "Provision Result", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "topic", + "value": "blazard1", + "type": "text", + "disabled": true + }, + { + "key": "limit", + "value": "100", + "type": "text", + "disabled": true + }, + { + "key": "offset", + "value": "0", + "type": "text", + "disabled": true + } + ] }, - { - "key": "assets", - "value": "[\"ExampleAsset\"]", - "type": "text" + "url": { + "raw": "{{HOST}}:8900/api/latest/provision/result/5015fe5c-8b24-4a60-819f-67f50064500c", + "host": [ + "{{HOST}}" + ], + "port": "8900", + "path": [ + "api", + "latest", + "provision", + "result", + "5015fe5c-8b24-4a60-819f-67f50064500c" + ], + "query": [ + { + "key": "ids", + "value": "axie", + "disabled": true + }, + { + "key": "types", + "value": "gs1-epcis", + "disabled": true + } + ] + } + }, + "response": [] + }, + { + "name": "Update", + "request": { + "auth": { + "type": "noauth" }, - { - "key": "keywords", - "value": "[\"ExampleAsset\",\"NFT\"]", - "type": "text" + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "src": "/Users/miloskotlar/ot-node-v6-poc/nft-data/axie1.json" + }, + { + "key": "keywords", + "value": "[\"Claude\",\"InformationTheory\", \"Cryptographer\"]", + "type": "text" + }, + { + "key": "visibility", + "value": "public", + "type": "text" + }, + { + "key": "ual", + "value": "7d943dec383a7fc0e4897a0a99ace2eb2fe06b56aff3abea0757b8883e775f7d", + "type": "text" + } + ] }, - { - "key": "visibility", - "value": "true", - "type": "text" + "url": { + "raw": "{{HOST}}:8900/api/latest/update", + "host": [ + "{{HOST}}" + ], + "port": "8900", + "path": [ + "api", + "latest", + "update" + ] } - ] + }, + "response": [] }, - "url": { - "raw": "{{HOST}}/publish", - "host": [ - "{{HOST}}" - ], - "path": [ - "publish" - ] + { + "name": "Update Result", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "topic", + "value": "blazard1", + "type": "text", + "disabled": true + }, + { + "key": "limit", + "value": "100", + "type": "text", + "disabled": true + }, + { + "key": "offset", + "value": "0", + "type": "text", + "disabled": true + } + ] + }, + "url": { + "raw": "{{HOST}}:8900/api/latest/provision/result/c57908da-6153-4973-a465-098d7f3964f7", + "host": [ + "{{HOST}}" + ], + "port": "8900", + "path": [ + "api", + "latest", + "provision", + "result", + "c57908da-6153-4973-a465-098d7f3964f7" + ], + "query": [ + { + "key": "ids", + "value": "axie", + "disabled": true + }, + { + "key": "types", + "value": "gs1-epcis", + "disabled": true + } + ] + } + }, + "response": [] } - }, - "response": [] + ] }, { - "name": "Publish result", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "method": "GET", - "header": [], - "body": { - "mode": "formdata", - "formdata": [] + "name": "Low level API", + "item": [ + { + "name": "Publish", + "request": { + "auth": { + "type": "noauth" + }, + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "src": "/Users/miloskotlar/ot-node-v6-poc/nft-data/axie1.json" + }, + { + "key": "keywords", + "value": "[\"Claude\",\"InformationTheory\", \"Cryptographer\"]", + "type": "text" + }, + { + "key": "visibility", + "value": "public", + "type": "text" + } + ] + }, + "url": { + "raw": "{{HOST}}:8900/api/latest/publish", + "host": [ + "{{HOST}}" + ], + "port": "8900", + "path": [ + "api", + "latest", + "publish" + ] + } + }, + "response": [] }, - "url": { - "raw": "{{HOST}}/publish/result/7478256a-36da-4450-adc3-db79cb2d95cc", - "host": [ - "{{HOST}}" - ], - "path": [ - "publish", - "result", - "7478256a-36da-4450-adc3-db79cb2d95cc" - ] + { + "name": "Publish Result", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "topic", + "value": "blazard1", + "type": "text", + "disabled": true + }, + { + "key": "limit", + "value": "100", + "type": "text", + "disabled": true + }, + { + "key": "offset", + "value": "0", + "type": "text", + "disabled": true + } + ] + }, + "url": { + "raw": "{{HOST}}:8900/api/latest/provision/result/10024045-95fc-4a2f-9ebc-69c55b9a0e9e", + "host": [ + "{{HOST}}" + ], + "port": "8900", + "path": [ + "api", + "latest", + "provision", + "result", + "10024045-95fc-4a2f-9ebc-69c55b9a0e9e" + ], + "query": [ + { + "key": "ids", + "value": "axie", + "disabled": true + }, + { + "key": "types", + "value": "gs1-epcis", + "disabled": true + } + ] + } + }, + "response": [] } - }, - "response": [] + ] }, { "name": "Resolve", @@ -113,17 +342,28 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}/resolve?ids=da919440495228954b8d198ac2bffa121f41d1503c12124c3d764d5572e7ebfb", + "raw": "{{HOST}}:8900/api/latest/resolve?ids=177930cabcf1399dcb25b4cb907d71097b247247d250eb7a35fffc5974ec732f&&load=true", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ + "api", + "latest", "resolve" ], "query": [ { "key": "ids", - "value": "da919440495228954b8d198ac2bffa121f41d1503c12124c3d764d5572e7ebfb" + "value": "177930cabcf1399dcb25b4cb907d71097b247247d250eb7a35fffc5974ec732f" + }, + { + "key": null, + "value": null + }, + { + "key": "load", + "value": "true" } ] } @@ -131,7 +371,7 @@ "response": [] }, { - "name": "Resolve result", + "name": "Resolve Result", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -143,21 +383,36 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}/resolve/result/bed771ec-e8a7-4ec3-9aa8-4df321062895", + "raw": "{{HOST}}:8900/api/latest/resolve/result/ea5edd69-e612-450b-b4d9-385e3d0eaaef", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ + "api", + "latest", "resolve", "result", - "bed771ec-e8a7-4ec3-9aa8-4df321062895" + "ea5edd69-e612-450b-b4d9-385e3d0eaaef" + ], + "query": [ + { + "key": "ids", + "value": "axie", + "disabled": true + }, + { + "key": "types", + "value": "gs1-epcis", + "disabled": true + } ] } }, "response": [] }, { - "name": "Search Entities", + "name": "Assertions Search", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -188,12 +443,15 @@ ] }, "url": { - "raw": "{{HOST}}/entities:search?prefix=true&limit=20&query=exampleAsset", + "raw": "{{HOST}}:8900/api/latest/assertions:search?query=InformationTheory", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ - "entities:search" + "api", + "latest", + "assertions:search" ], "query": [ { @@ -206,17 +464,9 @@ "value": "gs1-epcis", "disabled": true }, - { - "key": "prefix", - "value": "true" - }, - { - "key": "limit", - "value": "20" - }, { "key": "query", - "value": "exampleAsset" + "value": "InformationTheory" } ] } @@ -224,7 +474,7 @@ "response": [] }, { - "name": "Search Entities Result", + "name": "Assertions Search Result", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -233,17 +483,39 @@ "header": [], "body": { "mode": "formdata", - "formdata": [] + "formdata": [ + { + "key": "topic", + "value": "blazard1", + "type": "text", + "disabled": true + }, + { + "key": "limit", + "value": "100", + "type": "text", + "disabled": true + }, + { + "key": "offset", + "value": "0", + "type": "text", + "disabled": true + } + ] }, "url": { - "raw": "{{HOST}}/entities:search/result/116cd013-62f9-4925-b6cc-e8dacea1e06c", + "raw": "{{HOST}}:8900/api/latest/assertions:search/result/2ab488b6-c12e-4e3c-959d-a38fef1f84e3", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ - "entities:search", + "api", + "latest", + "assertions:search", "result", - "116cd013-62f9-4925-b6cc-e8dacea1e06c" + "2ab488b6-c12e-4e3c-959d-a38fef1f84e3" ], "query": [ { @@ -262,7 +534,7 @@ "response": [] }, { - "name": "Search Assertions", + "name": "Search", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -293,17 +565,40 @@ ] }, "url": { - "raw": "{{HOST}}/assertions:search?query=exampleAsset", + "raw": "{{HOST}}:8900/api/latest/entities:search?query=InformationTheory", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ - "assertions:search" + "api", + "latest", + "entities:search" ], "query": [ + { + "key": "prefix", + "value": "true", + "disabled": true + }, + { + "key": "ids", + "value": "axie", + "disabled": true + }, + { + "key": "types", + "value": "gs1-epcis", + "disabled": true + }, + { + "key": "limit", + "value": "20", + "disabled": true + }, { "key": "query", - "value": "exampleAsset" + "value": "InformationTheory" } ] } @@ -311,7 +606,7 @@ "response": [] }, { - "name": "Search Assertions Result", + "name": "Search Result", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -321,6 +616,18 @@ "body": { "mode": "formdata", "formdata": [ + { + "key": "topic", + "value": "blazard1", + "type": "text", + "disabled": true + }, + { + "key": "limit", + "value": "100", + "type": "text", + "disabled": true + }, { "key": "offset", "value": "0", @@ -330,26 +637,17 @@ ] }, "url": { - "raw": "{{HOST}}/assertions:search/result/39f8b937-5aba-42ad-929b-1fd39ca32122", + "raw": "{{HOST}}:8900/api/latest/entities:search/result/15857cc9-100b-4420-aadc-c24f8eaa632d", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ - "assertions:search", + "api", + "latest", + "entities:search", "result", - "39f8b937-5aba-42ad-929b-1fd39ca32122" - ], - "query": [ - { - "key": "ids", - "value": "axie", - "disabled": true - }, - { - "key": "types", - "value": "gs1-epcis", - "disabled": true - } + "15857cc9-100b-4420-aadc-c24f8eaa632d" ] } }, @@ -365,17 +663,20 @@ "formdata": [ { "key": "query", - "value": "PREFIX schema: \n\nCONSTRUCT { ?s schema:hasRootHash ?o }\n\nWHERE {\n\nGRAPH ?g {\n\n?s schema:hasRootHash ?o .\n\n}\n\n}", + "value": "PREFIX schema: \nCONSTRUCT { ?s schema:name \"Claude Shannon\" }\nWHERE {\n GRAPH ?g { \n ?s schema:name \"Claude Shannon\" .\n }\n}", "type": "text" } ] }, "url": { - "raw": "{{HOST}}/query?type=construct", + "raw": "{{HOST}}:8900/api/latest/query?type=construct", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ + "api", + "latest", "query" ], "query": [ @@ -389,7 +690,7 @@ "response": [] }, { - "name": "Query result", + "name": "Query Result", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -398,17 +699,39 @@ "header": [], "body": { "mode": "formdata", - "formdata": [] + "formdata": [ + { + "key": "topic", + "value": "blazard1", + "type": "text", + "disabled": true + }, + { + "key": "limit", + "value": "100", + "type": "text", + "disabled": true + }, + { + "key": "offset", + "value": "0", + "type": "text", + "disabled": true + } + ] }, "url": { - "raw": "{{HOST}}/query/result/e14d68ee-be14-4c8d-9e38-5b0479dde03c", + "raw": "{{HOST}}:8900/api/latest/query/result/ce1c1ace-3bc7-49b7-8dc8-1fbea25143dc", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ + "api", + "latest", "query", "result", - "e14d68ee-be14-4c8d-9e38-5b0479dde03c" + "ce1c1ace-3bc7-49b7-8dc8-1fbea25143dc" ] } }, @@ -424,31 +747,28 @@ "formdata": [ { "key": "nquads", - "value": "[\" \\\"4bf4a3428ef89d7ed3d35037a47c84c70f7b72281767a33f64263fb37e2cb624\\\" .\",\n \" \\\"94a87ed335c491a1332d58b69974ea94d0e28b3baa14a4f9d1505b8f36afa8ab\\\" .\",\n \" \\\"462cd1651821ac1786a5af58383e2b1ac91184f7cda46a083d3746d542f8bf67\\\" .\",\n \" \\\"7c167a73001faedb139103731e521b6cf76941221a0a1e1ffac9d2cb2c641902\\\" .\",\n \" \\\"270d0eac754ac95052c7f0d36476d4052acea0428617ea0f4f26f01dc659ba41\\\" .\"\n ]", + "value": "[ \"_:genid2dc4c6c4682460401d8ca7914d9be0ce992dc14n0 \\\"Claude Shannon\\\" .\"\n]", "type": "text" } ] }, "url": { - "raw": "{{HOST}}/proofs:get?assertions=da919440495228954b8d198ac2bffa121f41d1503c12124c3d764d5572e7ebfb", + "raw": "{{HOST}}:8900/api/latest/proofs:get", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ + "api", + "latest", "proofs:get" - ], - "query": [ - { - "key": "assertions", - "value": "da919440495228954b8d198ac2bffa121f41d1503c12124c3d764d5572e7ebfb" - } ] } }, "response": [] }, { - "name": "Proofs result", + "name": "Proofs Result", "protocolProfileBehavior": { "disableBodyPruning": true }, @@ -460,14 +780,17 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}/proofs:get/result/e145a028-5dea-4287-a65f-e1c2dda8c3f6", + "raw": "{{HOST}}:8900/api/latest/proofs:get/result/967887f4-96cb-4784-9cd8-fc31a64a8ec8", "host": [ "{{HOST}}" ], + "port": "8900", "path": [ + "api", + "latest", "proofs:get", "result", - "e145a028-5dea-4287-a65f-e1c2dda8c3f6" + "967887f4-96cb-4784-9cd8-fc31a64a8ec8" ] } }, From 0841f36f53f5e1021dbb693d5f73e5c60b9a9f1f Mon Sep 17 00:00:00 2001 From: NZT48 Date: Wed, 9 Feb 2022 12:29:31 +0100 Subject: [PATCH 12/50] Update config to support triple store implementation option --- config/config.json | 5 +- external/blazegraph-service.js | 366 +++++++++++++++++++++++++++++++++ 2 files changed, 370 insertions(+), 1 deletion(-) create mode 100644 external/blazegraph-service.js diff --git a/config/config.json b/config/config.json index 88caefad2a..3fbae210c6 100644 --- a/config/config.json +++ b/config/config.json @@ -17,6 +17,7 @@ } ], "graphDatabase": { + "implementation": "GraphDB", "name": "node0", "username": "admin", "password": "" @@ -35,7 +36,7 @@ "telemetryHub": { "enabled": false, "packages": ["ot-telemetry-collector"], - "url": "" + "url": "https://webhook.site/75baabc2-74d0-4994-8b15-b8888bf09629" } }, "testnet": { @@ -56,6 +57,7 @@ } ], "graphDatabase": { + "implementation": "GraphDB", "name": "node0", "username": "admin", "password": "" @@ -90,6 +92,7 @@ }, "blockchain": [], "graphDatabase": { + "implementation": "GraphDB", "name": "node0", "username": "admin", "password": "" diff --git a/external/blazegraph-service.js b/external/blazegraph-service.js new file mode 100644 index 0000000000..bb6641e88d --- /dev/null +++ b/external/blazegraph-service.js @@ -0,0 +1,366 @@ +const { ServerClientConfig, GraphDBServerClient } = require('graphdb').server; +const { RepositoryClientConfig, RepositoryConfig, RepositoryType } = require('graphdb').repository; +const { SparqlXmlResultParser } = require('graphdb').parser; +const { GetQueryPayload, QueryType } = require('graphdb').query; +const { RDFMimeType } = require('graphdb').http; +const axios = require('axios'); +const { execSync } = require('child_process'); +const jsonld = require('jsonld'); +const N3 = require('n3'); +const { BufferList } = require('bl'); +const constants = require('../modules/constants'); + +class GraphdbService { + constructor(config) { + this.config = config; + } + + async initialize(logger) { + this.logger = logger; + this.logger.info(`Data repository name: ${this.config.repositoryName}`); + const serverConfig = new ServerClientConfig('http://localhost:7200/') + .setTimeout(40000) + .setHeaders({ + Accept: RDFMimeType.N_QUADS, + }) + .setKeepAlive(true); + this.server = new GraphDBServerClient(serverConfig); + + const exists = await this.server.hasRepository(this.config.repositoryName); + if (!exists) { + const newConfig = new RepositoryConfig(this.config.repositoryName, '', new Map(), '', 'Repo title', RepositoryType.FREE); + // Use the configuration to create new repository + await this.server.createRepository(newConfig); + } + + const readTimeout = 30000; + const writeTimeout = 30000; + const repositoryServerConfig = new RepositoryClientConfig('http://localhost:7200/') + .setEndpoints([`http://localhost:7200/repositories/${this.config.repositoryName}`]) + .setHeaders({ + Accept: RDFMimeType.N_QUADS, + }) + .setReadTimeout(readTimeout) + .setWriteTimeout(writeTimeout); + + this.repository = await this.server.getRepository(this.config.repositoryName, repositoryServerConfig); + this.repository.registerParser(new SparqlXmlResultParser()); + this.logger.info('GraphDB module initialized successfully'); + } + + async insert(triples, rootHash) { + const contentType = RDFMimeType.N_QUADS; + await this.repository.overwrite(triples, contentType, rootHash); + } + + async execute(query) { + return new Promise(async (accept, reject) => { + const payload = new GetQueryPayload() + .setQuery(query) + .setQueryType(QueryType.SELECT) + .setResponseType(RDFMimeType.SPARQL_RESULTS_JSON); + + try { + const stream = await this.repository.query(payload); + const bl = new BufferList(); + stream.on('data', (bindings) => { + bl.append(bindings); + }); + stream.on('end', () => { + accept(bl); + }); + } catch (e) { + reject(e); + } + }); + } + + async construct(query) { + return new Promise(async (accept, reject) => { + const payload = new GetQueryPayload() + .setQuery(query) + .setQueryType(QueryType.CONSTRUCT) + .setResponseType(RDFMimeType.N_QUADS); + + try { + const stream = await this.repository.query(payload); + const bl = new BufferList(); + stream.on('data', (bindings) => { + bl.append(bindings); + }); + stream.on('end', () => { + accept(bl); + }); + } catch (e) { + reject(e); + } + }); + } + + async ask(query) { + return new Promise(async (accept, reject) => { + const payload = new GetQueryPayload() + .setQuery(query) + .setQueryType(QueryType.ASK) + .setResponseType(RDFMimeType.BOOLEAN_RESULT); + try { + const stream = await this.repository.query(payload); + const bl = new BufferList(); + stream.on('data', (bindings) => { + bl.append(bindings); + }); + stream.on('end', () => { + accept(bl); + }); + } catch (e) { + reject(e); + } + }); + } + + async toRDF(jsonContent) { + let canonized = await jsonld.canonize(jsonContent, { + algorithm: 'URDNA2015', + format: 'application/n-quads', + }); + + canonized = canonized.split('\n'); + canonized = canonized.filter((x) => x !== ''); + + return canonized; + } + + async fromRDF(assertion, context, frame) { + const copy = await jsonld.fromRDF(assertion.join('\n'), { + algorithm: 'URDNA2015', + format: 'application/n-quads', + }); + + const framed = await jsonld.frame(copy, frame); + + const compressed = await jsonld.compact(framed, context); + return compressed; + } + + async extractMetadata(rdf) { + return new Promise(async (accept, reject) => { + const parser = new N3.Parser({ format: 'N-Triples', baseIRI: 'http://schema.org/' }); + const result = { + metadata: { + + }, + blockchain: { + + }, + assets: [], + keywords: [], + }; + + const quads = []; + await parser.parse( + rdf.join('\n'), + (error, quad, prefixes) => { + if (error) { + reject(error); + } + if (quad) { + quads.push(quad); + } + }, + ); + + for (const quad of quads) { + try { + switch (quad._predicate.id) { + case 'http://schema.org/hasType': + result.metadata.type = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasTimestamp': + result.metadata.timestamp = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasIssuer': + result.metadata.issuer = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasVisibility': + result.metadata.visibility = !!quad._object.id.includes('true'); + break; + case 'http://schema.org/hasDataHash': + result.metadata.dataHash = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasAsset': + result.assets.push(JSON.parse(quad._object.id)); + break; + case 'http://schema.org/hasKeyword': + result.keywords.push(JSON.parse(quad._object.id)); + break; + case 'http://schema.org/hasSignature': + result.signature = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasRootHash': + result.rootHash = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasBlockchain': + result.blockchain.name = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasTransactionHash': + result.blockchain.transactionHash = JSON.parse(quad._object.id); + break; + default: + break; + } + } catch (e) { + this.logger.error({ msg: `Error in extracting metadata: ${e}. ${e.stack}`, Event_name: constants.ERROR_TYPE.EXTRACT_METADATA_ERROR }); + } + } + accept(result); + }); + } + + async createMetadata(assertion) { + const result = await this.toRDF({ + '@context': 'https://www.schema.org/', + hasType: assertion.metadata.type, + hasSignature: assertion.signature, + hasIssuer: assertion.metadata.issuer, + hasTimestamp: assertion.metadata.timestamp, + hasVisibility: assertion.metadata.visibility, + hasDataHash: assertion.metadata.dataHash, + }); + + return result.map((x) => x.replace('_:c14n0', ``)); + } + + async createBlockchainMetadata(assertion) { + const result = await this.toRDF({ + '@context': 'https://www.schema.org/', + hasBlockchain: assertion.blockchain.name, + hasTransactionHash: assertion.blockchain.transactionHash, + }); + + return result.map((x) => x.replace('_:c14n0', ``)); + } + + async createConnections(options) { + const { + assertionId, assets, keywords, rootHash, + } = options; + + const result = await this.toRDF({ + '@context': 'https://www.schema.org/', + hasAsset: assets, + hasKeyword: keywords, + hasRootHash: rootHash, + }); + + return result.map((x) => x.replace('_:c14n0', ``)); + } + + async resolve(uri) { + const query = `CONSTRUCT { ?s ?p ?o } + WHERE { + GRAPH ?g { ?s ?p ?o } + FILTER (?g = ) . + }`; + let triples = await this.construct(query); + triples = triples.toString(); + if (triples) { + triples = triples.replace(/_:genid(.){37}/gm, '_:$1'); + triples = triples.split('\n'); + triples = triples.filter((x) => x !== ''); + } + return triples; + } + + async findAssertions(nquads) { + const query = `SELECT ?g + WHERE { + GRAPH ?g { + ${nquads} + } + }`; + const g = await this.execute(query); + return JSON.parse(g).results.bindings.map((x) => x.g.value.replace('did:dkg:', '')); + } + + async searchByQuery(query, options, localQuery) { + const sparqlQuery = `PREFIX schema: + SELECT (?outerAssetId AS ?assetId) (GROUP_CONCAT(?assertionId; SEPARATOR=",") AS ?assertions) + WHERE { + ?assertionId schema:hasAsset ?outerAssetId ; + ${!localQuery ? 'schema:hasVisibility true .' : ''} + { + SELECT distinct ?assertionId + WHERE { + ?assertionId schema:hasKeyword ?keyword ; + schema:hasIssuer ?issuer ; + schema:hasType ?type . + ${options.prefix ? `FILTER contains(lcase(?keyword),'${query.toLowerCase()}')` : `FILTER (lcase(?keyword) = '${query.toLowerCase()}')`} + ${options.issuers ? `FILTER (?issuer IN (${JSON.stringify(options.issuers).slice(1, -1)}))` : ''} + ${options.types ? `FILTER (?type IN (${JSON.stringify(options.types).slice(1, -1)}))` : ''} + } + } + } + group by ?outerAssetId + ${options.limit ? `LIMIT ${options.limit}`: ''}`; + let result = await this.execute(sparqlQuery); + result = JSON.parse(result).results.bindings; + return result; + } + + async searchByIds(ids, options) { + const sparqlQuery = `PREFIX schema: + SELECT ?assetId (GROUP_CONCAT(?assertionId; SEPARATOR=",") AS ?assertions) + WHERE { + ?assertionId schema:hasAsset ?assetId ; + schema:hasIssuer ?issuer ; + schema:hasType ?type . + FILTER (?assetId IN (${JSON.stringify(ids).slice(1, -1)})) + ${options.issuers ? `FILTER (?issuer IN (${JSON.stringify(options.issuers).slice(1, -1)}))` : ''} + ${options.types ? `FILTER (?type IN (${JSON.stringify(options.types).slice(1, -1)}))` : ''} + } + group by ?assetId + LIMIT ${options.limit}`; + + let result = await this.execute(sparqlQuery); + result = JSON.parse(result).results.bindings; + return result; + } + + async healthCheck() { + try { + const response = await axios.get(`http://localhost:7200/repositories/${this.config.repositoryName}/health`, {}, + { + auth: { + username: this.config.username, + password: this.config.password, + }, + }); + if (response.data.status === 'green') { + return true; + } + return false; + } catch (e) { + if (e.response && e.response.status === 404) { + // Expected error: GraphDB is up but has not created node0 repository + // Ot-node will create repo in initialization + return true; + } + return false; + } + } + + async restartService() { + // TODO: check env if development or production + const port = execSync('ps -aux | grep graphdb | cut -d\' \' -f7 | head -n 1').toString(); + if (port) { + execSync(`kill -9 ${port}`); + } + execSync('nohup ../graphdb-free-9.9.0/bin/graphdb &'); + } + + getName() { + return 'GraphDB'; + } +} + +module.exports = GraphdbService; From 65d2996a0072b46377413868f2abfd7e1cf96e58 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Wed, 9 Feb 2022 12:30:31 +0100 Subject: [PATCH 13/50] According to config param, initialize Blazegraph or Graphdb --- modules/service/data-service.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/modules/service/data-service.js b/modules/service/data-service.js index 996b6a96ba..37da954e8f 100644 --- a/modules/service/data-service.js +++ b/modules/service/data-service.js @@ -1,6 +1,7 @@ const { v1: uuidv1 } = require('uuid'); const constants = require('../constants'); const GraphDB = require('../../external/graphdb-service'); +const Blazegraph = require('../../external/blazegraph-service'); class DataService { constructor(ctx) { @@ -17,11 +18,15 @@ class DataService { } async initialize() { - this.implementation = new GraphDB({ - repositoryName: this.config.graphDatabase.name, - username: this.config.graphDatabase.username, - password: this.config.graphDatabase.password, - }); + if (this.config.graphDatabase.implementation === 'Blazegraph') { + this.implementation = new Blazegraph({}); + } else { + this.implementation = new GraphDB({ + repositoryName: this.config.graphDatabase.name, + username: this.config.graphDatabase.username, + password: this.config.graphDatabase.password, + }); + } let ready = await this.healthCheck(); let retries = 0; @@ -82,9 +87,9 @@ class DataService { } } - async insert(data, rootHash) { + async insert(data, assertionId) { try { - return this.implementation.insert(data, rootHash); + return this.implementation.insert(data, assertionId); } catch (e) { // TODO: Check situation when inserting data recieved from other node this.handleUnavailableTripleStoreError(e); From 23692c32eef145c4f1250f64710137018d141979 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Wed, 9 Feb 2022 12:31:05 +0100 Subject: [PATCH 14/50] Change orderd of publish commands, first insert locally, then send to other nodes --- modules/service/publish-service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/service/publish-service.js b/modules/service/publish-service.js index 8f761d9693..2955823b13 100644 --- a/modules/service/publish-service.js +++ b/modules/service/publish-service.js @@ -61,9 +61,9 @@ class PublishService { })); const commandSequence = [ + 'insertAssertionCommand', 'submitProofsCommand', 'sendAssertionCommand', - 'insertAssertionCommand', ]; await this.commandExecutor.add({ From 1ff794e657e16e6e2b564401f9de7d48204fb518 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Wed, 9 Feb 2022 12:33:56 +0100 Subject: [PATCH 15/50] Blazegraph support implemented --- external/blazegraph-service.js | 190 +++++++++++++-------------------- package.json | 1 + 2 files changed, 75 insertions(+), 116 deletions(-) diff --git a/external/blazegraph-service.js b/external/blazegraph-service.js index bb6641e88d..acf180498e 100644 --- a/external/blazegraph-service.js +++ b/external/blazegraph-service.js @@ -1,120 +1,98 @@ -const { ServerClientConfig, GraphDBServerClient } = require('graphdb').server; -const { RepositoryClientConfig, RepositoryConfig, RepositoryType } = require('graphdb').repository; -const { SparqlXmlResultParser } = require('graphdb').parser; -const { GetQueryPayload, QueryType } = require('graphdb').query; -const { RDFMimeType } = require('graphdb').http; const axios = require('axios'); -const { execSync } = require('child_process'); const jsonld = require('jsonld'); const N3 = require('n3'); -const { BufferList } = require('bl'); +const qs = require('qs'); const constants = require('../modules/constants'); -class GraphdbService { +class BlazegraphService { constructor(config) { this.config = config; } async initialize(logger) { this.logger = logger; - this.logger.info(`Data repository name: ${this.config.repositoryName}`); - const serverConfig = new ServerClientConfig('http://localhost:7200/') - .setTimeout(40000) - .setHeaders({ - Accept: RDFMimeType.N_QUADS, - }) - .setKeepAlive(true); - this.server = new GraphDBServerClient(serverConfig); - - const exists = await this.server.hasRepository(this.config.repositoryName); - if (!exists) { - const newConfig = new RepositoryConfig(this.config.repositoryName, '', new Map(), '', 'Repo title', RepositoryType.FREE); - // Use the configuration to create new repository - await this.server.createRepository(newConfig); - } - - const readTimeout = 30000; - const writeTimeout = 30000; - const repositoryServerConfig = new RepositoryClientConfig('http://localhost:7200/') - .setEndpoints([`http://localhost:7200/repositories/${this.config.repositoryName}`]) - .setHeaders({ - Accept: RDFMimeType.N_QUADS, - }) - .setReadTimeout(readTimeout) - .setWriteTimeout(writeTimeout); - - this.repository = await this.server.getRepository(this.config.repositoryName, repositoryServerConfig); - this.repository.registerParser(new SparqlXmlResultParser()); - this.logger.info('GraphDB module initialized successfully'); + this.logger.info('Blazegraph module initialized successfully'); } async insert(triples, rootHash) { - const contentType = RDFMimeType.N_QUADS; - await this.repository.overwrite(triples, contentType, rootHash); + const askQuery = `ASK WHERE { GRAPH <${rootHash}> { ?s ?p ?o } }`; + const exists = await this.ask(askQuery); + if (!exists) { + const config = { + method: 'post', + url: `http://localhost:9999/blazegraph/sparql?context-uri=${rootHash}`, + headers: { + 'Content-Type': 'text/x-nquads', + }, + data: triples, + }; + + await axios(config).then((response) => true) + .catch((error) => { + this.logger.error(`Failed to write into Blazegraph: ${error} - ${error.stack}`); + return false; + }); + } + // TODO: else -> Should log if we already have data } async execute(query) { return new Promise(async (accept, reject) => { - const payload = new GetQueryPayload() - .setQuery(query) - .setQueryType(QueryType.SELECT) - .setResponseType(RDFMimeType.SPARQL_RESULTS_JSON); - - try { - const stream = await this.repository.query(payload); - const bl = new BufferList(); - stream.on('data', (bindings) => { - bl.append(bindings); - }); - stream.on('end', () => { - accept(bl); - }); - } catch (e) { - reject(e); - } + const data = qs.stringify({ + query, + }); + const config = { + method: 'post', + url: 'http://localhost:9999/blazegraph/sparql', + headers: { + Accept: 'application/sparql-results+json', + 'Content-Type': 'application/x-www-form-urlencoded', + }, + data, + }; + axios(config).then((response) => { + accept(response.data); + }).catch((e) => reject(e)); }); } async construct(query) { return new Promise(async (accept, reject) => { - const payload = new GetQueryPayload() - .setQuery(query) - .setQueryType(QueryType.CONSTRUCT) - .setResponseType(RDFMimeType.N_QUADS); - - try { - const stream = await this.repository.query(payload); - const bl = new BufferList(); - stream.on('data', (bindings) => { - bl.append(bindings); - }); - stream.on('end', () => { - accept(bl); - }); - } catch (e) { - reject(e); - } + const data = qs.stringify({ + query, + }); + const config = { + method: 'post', + url: 'http://localhost:9999/blazegraph/sparql', + headers: { + Accept: 'text/x-nquads', + 'Content-Type': 'application/x-www-form-urlencoded', + }, + data, + }; + axios(config).then((response) => { + accept(response.data); + }).catch((e) => reject(e)); }); } async ask(query) { return new Promise(async (accept, reject) => { - const payload = new GetQueryPayload() - .setQuery(query) - .setQueryType(QueryType.ASK) - .setResponseType(RDFMimeType.BOOLEAN_RESULT); - try { - const stream = await this.repository.query(payload); - const bl = new BufferList(); - stream.on('data', (bindings) => { - bl.append(bindings); - }); - stream.on('end', () => { - accept(bl); - }); - } catch (e) { - reject(e); - } + const data = qs.stringify({ + query, + }); + const config = { + method: 'post', + url: 'http://localhost:9999/blazegraph/sparql', + headers: { + Accept: 'application/json', + 'Content-Type': 'application/x-www-form-urlencoded', + }, + data, + }; + axios(config).then((response) => { + accept(response.data.boolean); + }).catch((e) => reject(e)); }); } @@ -274,7 +252,7 @@ class GraphdbService { async findAssertions(nquads) { const query = `SELECT ?g WHERE { - GRAPH ?g { + GRAPH ?g { ${nquads} } }`; @@ -303,7 +281,7 @@ class GraphdbService { group by ?outerAssetId ${options.limit ? `LIMIT ${options.limit}`: ''}`; let result = await this.execute(sparqlQuery); - result = JSON.parse(result).results.bindings; + result = result.results.bindings; return result; } @@ -322,45 +300,25 @@ class GraphdbService { LIMIT ${options.limit}`; let result = await this.execute(sparqlQuery); - result = JSON.parse(result).results.bindings; + result = result.results.bindings; return result; } async healthCheck() { try { - const response = await axios.get(`http://localhost:7200/repositories/${this.config.repositoryName}/health`, {}, - { - auth: { - username: this.config.username, - password: this.config.password, - }, - }); - if (response.data.status === 'green') { + const response = await axios.get('http://localhost:9999/blazegraph/status', {}); + if (response.data !== null) { return true; } return false; } catch (e) { - if (e.response && e.response.status === 404) { - // Expected error: GraphDB is up but has not created node0 repository - // Ot-node will create repo in initialization - return true; - } return false; } } - async restartService() { - // TODO: check env if development or production - const port = execSync('ps -aux | grep graphdb | cut -d\' \' -f7 | head -n 1').toString(); - if (port) { - execSync(`kill -9 ${port}`); - } - execSync('nohup ../graphdb-free-9.9.0/bin/graphdb &'); - } - getName() { - return 'GraphDB'; + return 'Blazegraph'; } } -module.exports = GraphdbService; +module.exports = BlazegraphService; diff --git a/package.json b/package.json index 2fb98df389..90b181be56 100644 --- a/package.json +++ b/package.json @@ -82,6 +82,7 @@ "pino": "^7.5.1", "pino-multi-stream": "^6.0.0", "pino-pretty": "^7.2.0", + "qs": "^6.10.3", "rc": "^1.2.8", "semver": "^7.3.5", "sequelize": "^6.9.0", From d814cff4d2ddfa3187c0742031f593f8a4cc7566 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Wed, 9 Feb 2022 12:34:54 +0100 Subject: [PATCH 16/50] Remove tmp url in config --- config/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.json b/config/config.json index 3fbae210c6..0617496a6a 100644 --- a/config/config.json +++ b/config/config.json @@ -36,7 +36,7 @@ "telemetryHub": { "enabled": false, "packages": ["ot-telemetry-collector"], - "url": "https://webhook.site/75baabc2-74d0-4994-8b15-b8888bf09629" + "url": "" } }, "testnet": { From 3548f820bfda3af90445178fe5853b9508c70873 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 9 Feb 2022 12:52:44 +0100 Subject: [PATCH 17/50] resolve PR comments --- external/graphdb-service.js | 4 ++-- modules/constants.js | 6 ++++++ modules/controller/rpc-controller.js | 24 +++++++++++++----------- modules/service/data-service.js | 17 +++++++++++++---- 4 files changed, 34 insertions(+), 17 deletions(-) diff --git a/external/graphdb-service.js b/external/graphdb-service.js index 560317d6cb..71db7ef674 100644 --- a/external/graphdb-service.js +++ b/external/graphdb-service.js @@ -302,7 +302,7 @@ class GraphdbService { WHERE { ?assertionId schema:hasKeywords ?keyword . ${!localQuery ? ' ?assertionId schema:hasVisibility "public" .' : ''} - ${options.prefix ? `FILTER contains(lcase(?keyword),'${query.toLowerCase()}')` : `FILTER (lcase(?keyword) = '${query.toLowerCase()}')`} + ${options.prefix ? `FILTER contains(lcase(?keyword),'${query}')` : `FILTER (lcase(?keyword) = '${query}')`} } ${options.limit ? `LIMIT ${options.limit}` : ''}`; let result = await this.execute(sparqlQuery); @@ -325,7 +325,7 @@ class GraphdbService { schema:hasType ?type ; schema:hasTimestamp ?timestamp ; schema:hasUALs ?assetId . - ${options.prefix ? `FILTER contains(lcase(?keyword),'${query.toLowerCase()}')` : `FILTER (lcase(?keyword) = '${query.toLowerCase()}')`} + ${options.prefix ? `FILTER contains(lcase(?keyword),'${query}')` : `FILTER (lcase(?keyword) = '${query}')`} ${options.issuers ? `FILTER (?issuer IN (${JSON.stringify(options.issuers).slice(1, -1)}))` : ''} ${options.types ? `FILTER (?type IN (${JSON.stringify(options.types).slice(1, -1)}))` : ''} } diff --git a/modules/constants.js b/modules/constants.js index 58c1d6b58e..3143f4719c 100644 --- a/modules/constants.js +++ b/modules/constants.js @@ -44,6 +44,12 @@ exports.TRIPLE_STORE_CONNECT_MAX_RETRIES = 10; */ exports.TRIPLE_STORE_CONNECT_RETRY_FREQUENCY = 10; // 10 seconds +/** + * @constant {number} MAX_FILE_SIZE + * - Max file size for publish + */ +exports.MAX_FILE_SIZE = 26214400; + /** * @constant {object} ERROR_TYPE - * Types of errors supported diff --git a/modules/controller/rpc-controller.js b/modules/controller/rpc-controller.js index 099ade6f7a..08477592e7 100644 --- a/modules/controller/rpc-controller.js +++ b/modules/controller/rpc-controller.js @@ -37,6 +37,7 @@ class RpcController { } async initialize() { + //TODO add body-parser middleware this.initializeNetworkApi(); this.initializeAuthenticationMiddleware(); @@ -115,7 +116,7 @@ class RpcController { } initializeNetworkApi() { - this.logger.info(`Network API module enabled, server running on port ${this.config.network.port}`); + this.logger.info(`Network API module enabled on port ${this.config.network.port}`); this.networkService.handleMessage('/store', (result) => this.publishService.handleStore(result)); @@ -287,7 +288,8 @@ class RpcController { } let prefix = req.query.prefix, - limit = req.query.limit; + limit = req.query.limit, + query = req.query.query.toLowerCase(); if (!prefix) { prefix = false; @@ -318,11 +320,11 @@ class RpcController { let response; let nodes = []; - response = await this.dataService.searchAssertions(req.query.query, {limit, prefix}, true); - this.logger.info(`Searching for closest ${this.config.replicationFactor} node(s) for keyword ${req.query.query}`); - let foundNodes = await this.networkService.findNodes(req.query.query, this.config.replicationFactor); + response = await this.dataService.searchAssertions(query, {limit, prefix}, true); + this.logger.info(`Searching for closest ${this.config.replicationFactor} node(s) for keyword ${query}`); + let foundNodes = await this.networkService.findNodes(query, this.config.replicationFactor); if (foundNodes.length < this.config.replicationFactor) - this.logger.warn(`Found only ${foundNodes.length} node(s) for keyword ${req.query.query}`); + this.logger.warn(`Found only ${foundNodes.length} node(s) for keyword ${query}`); nodes = nodes.concat(foundNodes); nodes = [...new Set(nodes)]; @@ -342,7 +344,7 @@ class RpcController { for (const node of nodes) { await this.queryService.searchAssertions({ - query: req.query.query, + query, options: {limit, prefix}, handlerId }, node); @@ -377,7 +379,7 @@ class RpcController { Id_operation: operationId }); - let query = escape(req.query.query), ids, issuers, types, prefix = req.query.prefix, + let query = req.query.query.toLowerCase(), issuers, types, prefix = req.query.prefix, limit = req.query.limit; if (req.query.issuers) { @@ -611,7 +613,7 @@ class RpcController { }); this.app.get('/api/latest/:operation/result/:handler_id', async (req, res, next) => { - if (!['provision', 'resolve', 'query', 'entities:search', 'assertions:search', 'proofs:get'].includes(req.params.operation)) { + if (!['provision', 'update', 'publish', 'resolve', 'query', 'entities:search', 'assertions:search', 'proofs:get'].includes(req.params.operation)) { return next({ code: 400, message: 'Unexisting operation, available operations are: publish, resolve, query, proofs and search' @@ -760,10 +762,10 @@ class RpcController { if (!req.files || !req.files.file || path.extname(req.files.file.name).toLowerCase() !== '.json') { return next({code: 400, message: 'Assertion file is required field and must be in JSON-LD format.'}); //TODO determine file size limit - } else if (req.files.file.size > 268435456) { + } else if (req.files.file.size > constants.MAX_FILE_SIZE) { return next({ code: 400, - message: `File size limit is 256MB.` + message: `File size limit is 25MB.` }); } else if (req.body.keywords && !Utilities.isArrayOfStrings(req.body.keywords)) { return next({ diff --git a/modules/service/data-service.js b/modules/service/data-service.js index 928051453f..a37bd77299 100644 --- a/modules/service/data-service.js +++ b/modules/service/data-service.js @@ -107,10 +107,19 @@ class DataService { } } - async createAssertion(nquads) { - const metadata = nquads.filter((x) => x.startsWith(' !x.startsWith(' !x.includes('hasRootHash') && !x.includes('hasBlockchain') && !x.includes('hasTransactionHash')); + async createAssertion(rawNQuads) { + const metadata = []; + const data = []; + const nquads = []; + rawNQuads.forEach((nquad)=>{ + if (nquad.startsWith(' Date: Wed, 9 Feb 2022 13:19:48 +0100 Subject: [PATCH 18/50] resolve PR comments" --- external/graphdb-service.js | 8 ++++---- .../command/publish/insert-assertion-command.js | 2 +- modules/command/publish/send-assertion-command.js | 2 +- modules/constants.js | 6 ++++++ modules/service/data-service.js | 14 +++++++------- modules/service/publish-service.js | 4 +++- modules/service/query-service.js | 3 ++- 7 files changed, 24 insertions(+), 15 deletions(-) diff --git a/external/graphdb-service.js b/external/graphdb-service.js index 71db7ef674..2630d99f5f 100644 --- a/external/graphdb-service.js +++ b/external/graphdb-service.js @@ -172,7 +172,7 @@ class GraphdbService { switch (quad._predicate.id) { case 'http://schema.org/hasType': result.metadata.type = JSON.parse(quad._object.id); - result.id = quad._subject.id.replace('did:dkg:', ''); + result.id = quad._subject.id.replace(`${constants.DID_PREFIX}:`, ''); break; case 'http://schema.org/hasTimestamp': result.metadata.timestamp = JSON.parse(quad._object.id); @@ -229,7 +229,7 @@ class GraphdbService { async createMetadata(assertion) { const metadata = { '@context': 'https://www.schema.org/', - '@id': `did:dkg:${assertion.id}`, + '@id': `${constants.DID_PREFIX}:${assertion.id}`, hasType: assertion.metadata.type, hasSignature: assertion.signature, hasIssuer: assertion.metadata.issuer, @@ -251,7 +251,7 @@ class GraphdbService { const query = `PREFIX schema: CONSTRUCT { ?s ?p ?o } WHERE { - GRAPH { + GRAPH <${constants.DID_PREFIX}:${uri}> { ?s ?p ?o } }`; @@ -293,7 +293,7 @@ class GraphdbService { } }`; const g = await this.execute(query); - return JSON.parse(g).results.bindings.map((x) => x.g.value.replace('did:dkg:', '')); + return JSON.parse(g).results.bindings.map((x) => x.g.value.replace(`${constants.DID_PREFIX}:`, '')); } async findAssertionsByKeyword(query, options, localQuery) { diff --git a/modules/command/publish/insert-assertion-command.js b/modules/command/publish/insert-assertion-command.js index 4dbdac4e2c..3b127b8354 100644 --- a/modules/command/publish/insert-assertion-command.js +++ b/modules/command/publish/insert-assertion-command.js @@ -20,7 +20,7 @@ class InsertAssertionCommand extends Command { try { // TODO Store to local graph database - await this.dataService.insert(nquads.join('\n'), `did:dkg:${assertion.id}`); + await this.dataService.insert(nquads.join('\n'), `${constants.DID_PREFIX}:${assertion.id}`); this.logger.info(`Assertion ${assertion.id} has been successfully inserted`); await Models.handler_ids.update( { diff --git a/modules/command/publish/send-assertion-command.js b/modules/command/publish/send-assertion-command.js index 280d574072..14ec021913 100644 --- a/modules/command/publish/send-assertion-command.js +++ b/modules/command/publish/send-assertion-command.js @@ -23,7 +23,7 @@ class SendAssertionCommand extends Command { let { nquads, assertion } = await this.fileService.loadJsonFromFile(documentPath); if (!assertion.metadata.visibility) { - nquads = nquads.filter((x) => x.startsWith(' x.startsWith(`<${constants.DID_PREFIX}:`)); } let nodes = []; diff --git a/modules/constants.js b/modules/constants.js index 3143f4719c..6041d01f3e 100644 --- a/modules/constants.js +++ b/modules/constants.js @@ -50,6 +50,12 @@ exports.TRIPLE_STORE_CONNECT_RETRY_FREQUENCY = 10; // 10 seconds */ exports.MAX_FILE_SIZE = 26214400; +/** + * @constant {number} DID_PREFIX + * - DID prefix for graph database + */ +exports.DID_PREFIX = 'did:dkg'; + /** * @constant {object} ERROR_TYPE - * Types of errors supported diff --git a/modules/service/data-service.js b/modules/service/data-service.js index a37bd77299..4cc0fed1ab 100644 --- a/modules/service/data-service.js +++ b/modules/service/data-service.js @@ -95,11 +95,11 @@ class DataService { async resolve(id, localQuery = false, metadataOnly = false) { try { let {nquads, isAsset} = await this.implementation.resolve(id); - if (!localQuery && nquads && nquads.find((x) => x.includes(` "private" .`))) { + if (!localQuery && nquads && nquads.find((x) => x.includes(`<${constants.DID_PREFIX}:${id}> "private" .`))) { return null; } if (metadataOnly) { - nquads = nquads.filter((x) => x.startsWith(``)); + nquads = nquads.filter((x) => x.startsWith(`<${constants.DID_PREFIX}:${id}>`)); } return {nquads, isAsset}; } catch (e) { @@ -112,7 +112,7 @@ class DataService { const data = []; const nquads = []; rawNQuads.forEach((nquad)=>{ - if (nquad.startsWith(' x !== ''); for (let assertionId of assertions) { - assertionId = assertionId.replace('did:dkg:', ''); + assertionId = assertionId.replace(`${constants.DID_PREFIX}:`, ''); const rawRdf = await this.resolve(assertionId, localQuery); if (!rawRdf) continue; @@ -315,7 +315,7 @@ class DataService { const result = []; for (let assertion of assertions) { - const assertionId = assertion.assertionId = assertion.assertionId.value.replace('did:dkg:', ''); + const assertionId = assertion.assertionId = assertion.assertionId.value.replace(`${constants.DID_PREFIX}:`, ''); assertion = await this.resolve(assertion.assertionId, localQuery, true); if (!assertion) continue; @@ -492,7 +492,7 @@ class DataService { async appendBlockchainMetadata(nquads, assertion) { const blockchainMetadata = await this.workerPool.exec('toNQuads', [{ '@context': 'https://www.schema.org/', - '@id': `did:dkg:${assertion.id}`, + '@id': `${constants.DID_PREFIX}:${assertion.id}`, hasBlockchain: assertion.blockchain.name, hasTransactionHash: assertion.blockchain.transactionHash, }]); diff --git a/modules/service/publish-service.js b/modules/service/publish-service.js index 24e2b64c3e..796615983d 100644 --- a/modules/service/publish-service.js +++ b/modules/service/publish-service.js @@ -1,3 +1,5 @@ +const constants = require('../constants') + class PublishService { constructor(ctx) { this.networkService = ctx.networkService; @@ -85,7 +87,7 @@ class PublishService { // todo check root hash on the blockchain if (status) { - await this.dataService.insert(data.nquads.join('\n'), `did:dkg:${data.id}`); + await this.dataService.insert(data.nquads.join('\n'), `${constants.DID_PREFIX}:${data.id}`); this.logger.info(`Assertion ${data.id} has been successfully inserted`); } return status; diff --git a/modules/service/query-service.js b/modules/service/query-service.js index 27aa4303fc..29dd38c953 100644 --- a/modules/service/query-service.js +++ b/modules/service/query-service.js @@ -1,4 +1,5 @@ const Models = require('../../models/index'); +const constants = require('../constants') class QueryService { constructor(ctx) { @@ -21,7 +22,7 @@ class QueryService { const status = await this.dataService.verifyAssertion(assertion.jsonld, assertion.nquads); if (status && load) { - await this.dataService.insert(nquads.join('\n'), `did:dkg:${assertion.json.id}`); + await this.dataService.insert(nquads.join('\n'), `${constants.DID_PREFIX}:${assertion.json.id}`); this.logger.info(`Assertion ${assertion.json.id} has been successfully inserted`); } return status ? {assertion, isAsset} : null; From dd4a93d24dff313c89804ffebe237bb3ab47ca23 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Wed, 9 Feb 2022 13:44:33 +0100 Subject: [PATCH 19/50] New order of publish commands: 1. sendProofs, 2. insertAssertion & 3. sendAssertion --- .../command/publish/insert-assertion-command.js | 15 --------------- modules/command/publish/send-assertion-command.js | 10 ++++++++++ modules/service/publish-service.js | 2 +- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/modules/command/publish/insert-assertion-command.js b/modules/command/publish/insert-assertion-command.js index c3d7b48701..2e1f29a2d2 100644 --- a/modules/command/publish/insert-assertion-command.js +++ b/modules/command/publish/insert-assertion-command.js @@ -25,21 +25,6 @@ class InsertAssertionCommand extends Command { // Store to local graph database await this.dataService.insert(rdf.join('\n'), `did:dkg:${assertion.id}`); this.logger.info(`Assertion ${assertion.id} is successfully inserted`); - // await Models.assertions.create({ - // owner: '', - // hash: assertion.id, - // signature: '', - // topics: keywords.join(','), - // }); - await Models.handler_ids.update( - { - status: 'COMPLETED', - }, { - where: { - handler_id: handlerId, - }, - }, - ); } catch (e) { await this.handleError(handlerId, e, constants.ERROR_TYPE.INSERT_ASSERTION_ERROR, true); } diff --git a/modules/command/publish/send-assertion-command.js b/modules/command/publish/send-assertion-command.js index c2603043d3..e30cd2a078 100644 --- a/modules/command/publish/send-assertion-command.js +++ b/modules/command/publish/send-assertion-command.js @@ -48,6 +48,16 @@ class SendAssertionCommand extends Command { }); } + await Models.handler_ids.update( + { + status: 'COMPLETED', + }, { + where: { + handler_id: handlerId, + }, + }, + ); + return this.continueSequence(command.data, command.sequence); } diff --git a/modules/service/publish-service.js b/modules/service/publish-service.js index 2955823b13..cbd0e55608 100644 --- a/modules/service/publish-service.js +++ b/modules/service/publish-service.js @@ -61,8 +61,8 @@ class PublishService { })); const commandSequence = [ - 'insertAssertionCommand', 'submitProofsCommand', + 'insertAssertionCommand', 'sendAssertionCommand', ]; From fe0f02e63822fb866ce7fd034e65fdd7807ab4fe Mon Sep 17 00:00:00 2001 From: NZT48 Date: Wed, 9 Feb 2022 14:04:31 +0100 Subject: [PATCH 20/50] Triple store implementation names moved to constants --- modules/constants.js | 9 +++++++++ modules/service/data-service.js | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/constants.js b/modules/constants.js index 58c1d6b58e..5c2389ec21 100644 --- a/modules/constants.js +++ b/modules/constants.js @@ -44,6 +44,15 @@ exports.TRIPLE_STORE_CONNECT_MAX_RETRIES = 10; */ exports.TRIPLE_STORE_CONNECT_RETRY_FREQUENCY = 10; // 10 seconds +/** + * @constant {object} TRIPLE_STORE_IMPLEMENTATION - + * Names of available triple store implementations + */ +exports.TRIPLE_STORE_IMPLEMENTATION = { + BLAZEGRAPH: 'Blazegraph', + GRAPHDB: 'GraphDB', +}; + /** * @constant {object} ERROR_TYPE - * Types of errors supported diff --git a/modules/service/data-service.js b/modules/service/data-service.js index 37da954e8f..467db4b49d 100644 --- a/modules/service/data-service.js +++ b/modules/service/data-service.js @@ -18,7 +18,7 @@ class DataService { } async initialize() { - if (this.config.graphDatabase.implementation === 'Blazegraph') { + if (this.config.graphDatabase.implementation === constants.TRIPLE_STORE_IMPLEMENTATION.BLAZEGRAPH) { this.implementation = new Blazegraph({}); } else { this.implementation = new GraphDB({ From a058742419b7e6be55eec9f9491477999c26e5b6 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Wed, 9 Feb 2022 19:06:36 +0100 Subject: [PATCH 21/50] Fix find assertions for get proofs --- modules/controller/rpc-controller.js | 34 +++++++++++++--------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/modules/controller/rpc-controller.js b/modules/controller/rpc-controller.js index 08477592e7..6bc2da1dfa 100644 --- a/modules/controller/rpc-controller.js +++ b/modules/controller/rpc-controller.js @@ -3,17 +3,16 @@ const fileUpload = require('express-fileupload'); const ipfilter = require('express-ipfilter').IpFilter; const fs = require('fs'); const https = require('https'); -const {IpDeniedError} = require('express-ipfilter'); -const path = require('path') -const {v1: uuidv1, v4: uuidv4} = require('uuid'); +const { IpDeniedError } = require('express-ipfilter'); +const path = require('path'); +const { v1: uuidv1, v4: uuidv4 } = require('uuid'); +const sortedStringify = require('json-stable-stringify'); +const validator = require('validator'); const Models = require('../../models/index'); const constants = require('../constants'); const pjson = require('../../package.json'); -const sortedStringify = require('json-stable-stringify'); -const validator = require('validator'); const Utilities = require('../utilities'); - class RpcController { constructor(ctx) { this.config = ctx.config; @@ -543,12 +542,13 @@ class RpcController { return next({code: 400, message: 'Params query and type are necessary.'}); } const operationId = uuidv1(); + const handlerIdCachePath = this.fileService.getHandlerIdCachePath(); try { this.logger.emit({ msg: 'Started measuring execution of proofs command', Event_name: 'proofs_start', Operation_name: 'proofs', - Id_operation: operationId + Id_operation: operationId, }); const inserted_object = await Models.handler_ids.create({ @@ -566,23 +566,21 @@ class RpcController { } } - const nquads = JSON.parse(req.body.nquads); + const reqNquads = JSON.parse(req.body.nquads); const result = []; if (!assertions || assertions.length === 0) { - assertions = await this.dataService.findAssertions(nquads); + assertions = await this.dataService.findAssertions(reqNquads); } for (const assertionId of assertions) { - const content = await this.dataService.resolve(assertionId) + const content = await this.dataService.resolve(assertionId); if (content) { - const {rdf} = await this.dataService.createAssertion(assertionId, content); - const proofs = await this.validationService.getProofs(rdf, nquads); - result.push({assertionId, proofs}); + const { nquads } = await this.dataService.createAssertion(content.nquads); + const proofs = await this.validationService.getProofs(nquads, reqNquads); + result.push({ assertionId, proofs }); } } - const handlerIdCachePath = this.fileService.getHandlerIdCachePath(); - await this.fileService .writeContentsToFile(handlerIdCachePath, handlerId, JSON.stringify(result)); @@ -591,7 +589,7 @@ class RpcController { status: 'COMPLETED', }, { where: { - handler_id: handlerId + handler_id: handlerId, }, }, ); @@ -600,14 +598,14 @@ class RpcController { msg: `Unexpected error at proofs route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.PROOFS_ROUTE_ERROR, Event_value1: e.message, - Id_operation: operationId + Id_operation: operationId, }); } finally { this.logger.emit({ msg: 'Finished measuring execution of proofs command', Event_name: 'proofs_end', Operation_name: 'proofs', - Id_operation: operationId + Id_operation: operationId, }); } }); From 5babfca01f7ec88653a3c2febdc183befe919ba3 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Wed, 9 Feb 2022 19:07:35 +0100 Subject: [PATCH 22/50] Refactor data service and triple store implementations --- external/blazegraph-service.js | 249 +++++++++----------------------- external/graphdb-service.js | 174 ++-------------------- modules/service/data-service.js | 206 ++++++++++++++------------ 3 files changed, 190 insertions(+), 439 deletions(-) diff --git a/external/blazegraph-service.js b/external/blazegraph-service.js index acf180498e..42e7a2abb6 100644 --- a/external/blazegraph-service.js +++ b/external/blazegraph-service.js @@ -1,6 +1,4 @@ const axios = require('axios'); -const jsonld = require('jsonld'); -const N3 = require('n3'); const qs = require('qs'); const constants = require('../modules/constants'); @@ -96,157 +94,44 @@ class BlazegraphService { }); } - async toRDF(jsonContent) { - let canonized = await jsonld.canonize(jsonContent, { - algorithm: 'URDNA2015', - format: 'application/n-quads', - }); - - canonized = canonized.split('\n'); - canonized = canonized.filter((x) => x !== ''); - - return canonized; - } - - async fromRDF(assertion, context, frame) { - const copy = await jsonld.fromRDF(assertion.join('\n'), { - algorithm: 'URDNA2015', - format: 'application/n-quads', - }); - - const framed = await jsonld.frame(copy, frame); - - const compressed = await jsonld.compact(framed, context); - return compressed; - } - - async extractMetadata(rdf) { - return new Promise(async (accept, reject) => { - const parser = new N3.Parser({ format: 'N-Triples', baseIRI: 'http://schema.org/' }); - const result = { - metadata: { - - }, - blockchain: { - - }, - assets: [], - keywords: [], - }; - - const quads = []; - await parser.parse( - rdf.join('\n'), - (error, quad, prefixes) => { - if (error) { - reject(error); - } - if (quad) { - quads.push(quad); - } - }, - ); - - for (const quad of quads) { - try { - switch (quad._predicate.id) { - case 'http://schema.org/hasType': - result.metadata.type = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasTimestamp': - result.metadata.timestamp = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasIssuer': - result.metadata.issuer = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasVisibility': - result.metadata.visibility = !!quad._object.id.includes('true'); - break; - case 'http://schema.org/hasDataHash': - result.metadata.dataHash = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasAsset': - result.assets.push(JSON.parse(quad._object.id)); - break; - case 'http://schema.org/hasKeyword': - result.keywords.push(JSON.parse(quad._object.id)); - break; - case 'http://schema.org/hasSignature': - result.signature = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasRootHash': - result.rootHash = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasBlockchain': - result.blockchain.name = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasTransactionHash': - result.blockchain.transactionHash = JSON.parse(quad._object.id); - break; - default: - break; + async resolve(uri) { + let isAsset = false; + const query = `PREFIX schema: + CONSTRUCT { ?s ?p ?o } + WHERE { + GRAPH <${constants.DID_PREFIX}:${uri}> { + ?s ?p ?o + } + }`; + let nquads = await this.construct(query); + + if (!nquads.length) { + const query = `PREFIX schema: + CONSTRUCT { ?s ?p ?o } + WHERE { + GRAPH ?g { ?s ?p ?o } + { + SELECT ?ng + WHERE { + ?ng schema:hasUALs "${uri}" . } - } catch (e) { - this.logger.error({ msg: `Error in extracting metadata: ${e}. ${e.stack}`, Event_name: constants.ERROR_TYPE.EXTRACT_METADATA_ERROR }); + LIMIT 1 } - } - accept(result); - }); - } - - async createMetadata(assertion) { - const result = await this.toRDF({ - '@context': 'https://www.schema.org/', - hasType: assertion.metadata.type, - hasSignature: assertion.signature, - hasIssuer: assertion.metadata.issuer, - hasTimestamp: assertion.metadata.timestamp, - hasVisibility: assertion.metadata.visibility, - hasDataHash: assertion.metadata.dataHash, - }); - - return result.map((x) => x.replace('_:c14n0', ``)); - } - - async createBlockchainMetadata(assertion) { - const result = await this.toRDF({ - '@context': 'https://www.schema.org/', - hasBlockchain: assertion.blockchain.name, - hasTransactionHash: assertion.blockchain.transactionHash, - }); - - return result.map((x) => x.replace('_:c14n0', ``)); - } - - async createConnections(options) { - const { - assertionId, assets, keywords, rootHash, - } = options; - - const result = await this.toRDF({ - '@context': 'https://www.schema.org/', - hasAsset: assets, - hasKeyword: keywords, - hasRootHash: rootHash, - }); - - return result.map((x) => x.replace('_:c14n0', ``)); - } + FILTER (?g = ?ng) . + }`; + nquads = await this.construct(query); + isAsset = true; + } - async resolve(uri) { - const query = `CONSTRUCT { ?s ?p ?o } - WHERE { - GRAPH ?g { ?s ?p ?o } - FILTER (?g = ) . - }`; - let triples = await this.construct(query); - triples = triples.toString(); - if (triples) { - triples = triples.replace(/_:genid(.){37}/gm, '_:$1'); - triples = triples.split('\n'); - triples = triples.filter((x) => x !== ''); + if (nquads.length) { + nquads = nquads.toString(); + nquads = nquads.replace(/_:genid(.){37}/gm, '_:$1'); + nquads = nquads.split('\n'); + nquads = nquads.filter((x) => x !== ''); + } else { + nquads = null; } - return triples; + return { nquads, isAsset }; } async findAssertions(nquads) { @@ -256,52 +141,52 @@ class BlazegraphService { ${nquads} } }`; - const g = await this.execute(query); - return JSON.parse(g).results.bindings.map((x) => x.g.value.replace('did:dkg:', '')); + let graph = await this.execute(query); + graph = graph.results.bindings.map((x) => x.g.value.replace(`${constants.DID_PREFIX}:`, '')); + if (graph.length && graph[0] === 'http://www.bigdata.com/rdf#nullGraph') { + return []; + } + return graph; } - async searchByQuery(query, options, localQuery) { + async findAssertionsByKeyword(query, options, localQuery) { const sparqlQuery = `PREFIX schema: - SELECT (?outerAssetId AS ?assetId) (GROUP_CONCAT(?assertionId; SEPARATOR=",") AS ?assertions) - WHERE { - ?assertionId schema:hasAsset ?outerAssetId ; - ${!localQuery ? 'schema:hasVisibility true .' : ''} - { SELECT distinct ?assertionId WHERE { - ?assertionId schema:hasKeyword ?keyword ; - schema:hasIssuer ?issuer ; - schema:hasType ?type . - ${options.prefix ? `FILTER contains(lcase(?keyword),'${query.toLowerCase()}')` : `FILTER (lcase(?keyword) = '${query.toLowerCase()}')`} - ${options.issuers ? `FILTER (?issuer IN (${JSON.stringify(options.issuers).slice(1, -1)}))` : ''} - ${options.types ? `FILTER (?type IN (${JSON.stringify(options.types).slice(1, -1)}))` : ''} - } + ?assertionId schema:hasKeywords ?keyword . + ${!localQuery ? ' ?assertionId schema:hasVisibility "public" .' : ''} + ${options.prefix ? `FILTER contains(lcase(?keyword),'${query}')` : `FILTER (lcase(?keyword) = '${query}')`} } - } - group by ?outerAssetId - ${options.limit ? `LIMIT ${options.limit}`: ''}`; - let result = await this.execute(sparqlQuery); - result = result.results.bindings; - return result; + ${options.limit ? `LIMIT ${options.limit}` : ''}`; + const result = await this.execute(sparqlQuery); + return result.results.bindings; } - async searchByIds(ids, options) { + async findAssetsByKeyword(query, options, localQuery) { const sparqlQuery = `PREFIX schema: - SELECT ?assetId (GROUP_CONCAT(?assertionId; SEPARATOR=",") AS ?assertions) + SELECT ?assertionId WHERE { - ?assertionId schema:hasAsset ?assetId ; - schema:hasIssuer ?issuer ; - schema:hasType ?type . - FILTER (?assetId IN (${JSON.stringify(ids).slice(1, -1)})) + ?assertionId schema:hasTimestamp ?timestamp ; + ${!localQuery ? 'schema:hasVisibility "public" ;' : ''} + schema:hasUALs ?assetId . + { + SELECT ?assetId (MAX(?timestamp) AS ?timestamp) + WHERE { + ?assertionId schema:hasKeywords ?keyword ; + schema:hasIssuer ?issuer ; + schema:hasType ?type ; + schema:hasTimestamp ?timestamp ; + schema:hasUALs ?assetId . + ${options.prefix ? `FILTER contains(lcase(?keyword),'${query}')` : `FILTER (lcase(?keyword) = '${query}')`} ${options.issuers ? `FILTER (?issuer IN (${JSON.stringify(options.issuers).slice(1, -1)}))` : ''} ${options.types ? `FILTER (?type IN (${JSON.stringify(options.types).slice(1, -1)}))` : ''} } - group by ?assetId - LIMIT ${options.limit}`; - - let result = await this.execute(sparqlQuery); - result = result.results.bindings; - return result; + } + } + group by ?outerAssetId + ${options.limit ? `LIMIT ${options.limit}` : ''}`; + const result = await this.execute(sparqlQuery); + return result.results.bindings; } async healthCheck() { diff --git a/external/graphdb-service.js b/external/graphdb-service.js index 2630d99f5f..83cdc2ffba 100644 --- a/external/graphdb-service.js +++ b/external/graphdb-service.js @@ -1,13 +1,11 @@ -const {ServerClientConfig, GraphDBServerClient} = require('graphdb').server; -const {RepositoryClientConfig, RepositoryConfig, RepositoryType} = require('graphdb').repository; -const {SparqlXmlResultParser} = require('graphdb').parser; -const {GetQueryPayload, QueryType} = require('graphdb').query; -const {RDFMimeType} = require('graphdb').http; +const { ServerClientConfig, GraphDBServerClient } = require('graphdb').server; +const { RepositoryClientConfig, RepositoryConfig, RepositoryType } = require('graphdb').repository; +const { SparqlXmlResultParser } = require('graphdb').parser; +const { GetQueryPayload, QueryType } = require('graphdb').query; +const { RDFMimeType } = require('graphdb').http; const axios = require('axios'); -const {execSync} = require('child_process'); -const jsonld = require('jsonld'); -const N3 = require('n3'); -const {BufferList} = require('bl'); +const { execSync } = require('child_process'); +const { BufferList } = require('bl'); const constants = require('../modules/constants'); class GraphdbService { @@ -118,134 +116,6 @@ class GraphdbService { }); } - async toRDF(jsonContent) { - let canonized = await jsonld.canonize(jsonContent, { - algorithm: 'URDNA2015', - format: 'application/n-quads', - }); - - canonized = canonized.split('\n'); - canonized = canonized.filter((x) => x !== ''); - - return canonized; - } - - async fromRDF(assertion, context, frame) { - const copy = await jsonld.fromRDF(assertion.join('\n'), { - algorithm: 'URDNA2015', - format: 'application/n-quads', - }); - - const framed = await jsonld.frame(copy, frame); - - const compressed = await jsonld.compact(framed, context); - return compressed; - } - - async extractMetadata(rdf) { - return new Promise(async (accept, reject) => { - const parser = new N3.Parser({format: 'N-Triples', baseIRI: 'http://schema.org/'}); - const result = { - metadata: { - keywords: [], - UALs: [], - }, - blockchain: {}, - }; - - const quads = []; - await parser.parse( - rdf.join('\n'), - (error, quad, prefixes) => { - if (error) { - reject(error); - } - if (quad) { - quads.push(quad); - } - }, - ); - - - for (const quad of quads) { - try { - switch (quad._predicate.id) { - case 'http://schema.org/hasType': - result.metadata.type = JSON.parse(quad._object.id); - result.id = quad._subject.id.replace(`${constants.DID_PREFIX}:`, ''); - break; - case 'http://schema.org/hasTimestamp': - result.metadata.timestamp = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasUALs': - result.metadata.UALs.push(JSON.parse(quad._object.id)); - break; - case 'http://schema.org/hasIssuer': - result.metadata.issuer = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasVisibility': - result.metadata.visibility = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasDataHash': - result.metadata.dataHash = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasKeywords': - result.metadata.keywords.push(JSON.parse(quad._object.id)); - break; - case 'http://schema.org/hasSignature': - result.signature = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasRootHash': - result.rootHash = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasBlockchain': - result.blockchain.name = JSON.parse(quad._object.id); - break; - case 'http://schema.org/hasTransactionHash': - result.blockchain.transactionHash = JSON.parse(quad._object.id); - break; - default: - break; - } - } catch (e) { - this.logger.error({ - msg: `Error in extracting metadata: ${e}. ${e.stack}`, - Event_name: constants.ERROR_TYPE.EXTRACT_METADATA_ERROR - }); - } - } - - result.metadata.keywords.sort(); - if (!result.metadata.UALs.length) - delete result.metadata.UALs; - else - result.metadata.UALs.sort(); - - - accept(result); - }); - } - - async createMetadata(assertion) { - const metadata = { - '@context': 'https://www.schema.org/', - '@id': `${constants.DID_PREFIX}:${assertion.id}`, - hasType: assertion.metadata.type, - hasSignature: assertion.signature, - hasIssuer: assertion.metadata.issuer, - hasTimestamp: assertion.metadata.timestamp, - hasVisibility: assertion.metadata.visibility, - hasDataHash: assertion.metadata.dataHash, - hasKeywords: assertion.metadata.keywords, - }; - - if (assertion.metadata.UALs) - metadata.hasUALs = assertion.metadata.UALs; - - const result = await this.toRDF(metadata); - return result; - } - async resolve(uri) { let isAsset = false; const query = `PREFIX schema: @@ -280,20 +150,21 @@ class GraphdbService { nquads = nquads.replace(/_:genid(.){37}/gm, '_:$1'); nquads = nquads.split('\n'); nquads = nquads.filter((x) => x !== ''); - } else + } else { nquads = null; - return {nquads, isAsset}; + } + return { nquads, isAsset }; } async findAssertions(nquads) { const query = `SELECT ?g WHERE { - GRAPH ?g { + GRAPH ?g { ${nquads} } }`; - const g = await this.execute(query); - return JSON.parse(g).results.bindings.map((x) => x.g.value.replace(`${constants.DID_PREFIX}:`, '')); + const graph = await this.execute(query); + return JSON.parse(graph).results.bindings.map((x) => x.g.value.replace(`${constants.DID_PREFIX}:`, '')); } async findAssertionsByKeyword(query, options, localQuery) { @@ -338,25 +209,6 @@ class GraphdbService { return result; } - async searchByIds(ids, options) { - const sparqlQuery = `PREFIX schema: - SELECT ?assetId (GROUP_CONCAT(?assertionId; SEPARATOR=",") AS ?assertions) - WHERE { - ?assertionId schema:hasAsset ?assetId ; - schema:hasIssuer ?issuer ; - schema:hasType ?type . - FILTER (?assetId IN (${JSON.stringify(ids).slice(1, -1)})) - ${options.issuers ? `FILTER (?issuer IN (${JSON.stringify(options.issuers).slice(1, -1)}))` : ''} - ${options.types ? `FILTER (?type IN (${JSON.stringify(options.types).slice(1, -1)}))` : ''} - } - group by ?assetId - LIMIT ${options.limit}`; - - let result = await this.execute(sparqlQuery); - result = JSON.parse(result).results.bindings; - return result; - } - async healthCheck() { try { const response = await axios.get(`http://localhost:7200/repositories/${this.config.repositoryName}/health`, {}, diff --git a/modules/service/data-service.js b/modules/service/data-service.js index 7da1868d7c..87dddbd0fb 100644 --- a/modules/service/data-service.js +++ b/modules/service/data-service.js @@ -1,10 +1,9 @@ -const {v1: uuidv1} = require('uuid'); -const workerpool = require('workerpool'); +const { v1: uuidv1 } = require('uuid'); +const N3 = require('n3'); const constants = require('../constants'); const GraphDB = require('../../external/graphdb-service'); const Blazegraph = require('../../external/blazegraph-service'); - class DataService { constructor(ctx) { this.config = ctx.config; @@ -41,7 +40,7 @@ class DataService { } if (retries === constants.TRIPLE_STORE_CONNECT_MAX_RETRIES) { this.logger.error({ - msg: `Triple Store (${this.implementation.getName()}) not available, max retries reached.`, + msg: `Triple Store (${this.getName()}) not available, max retries reached.`, Event_name: constants.ERROR_TYPE.TRIPLE_STORE_UNAVAILABLE_ERROR, }); this.nodeService.stop(1); @@ -125,7 +124,7 @@ class DataService { if (!nquad.includes('hasRootHash') && !nquad.includes('hasBlockchain') && !nquad.includes('hasTransactionHash')) nquads.push(nquad); }); - const jsonld = await this.implementation.extractMetadata(metadata); + const jsonld = await this.extractMetadata(metadata); jsonld.data = data; return {jsonld, nquads}; } @@ -241,78 +240,6 @@ class DataService { } } - async searchByIds(ids, options, localQuery = false) { - try { - const assets = await this.implementation.searchByIds(ids, options, localQuery); - if (!assets) return null; - - const result = []; - for (const asset of assets) { - const assertions = asset.assertions.value.split(',').filter((x) => x !== ''); - for (let assertionId of assertions) { - assertionId = assertionId.replace(`${constants.DID_PREFIX}:`, ''); - - const rawRdf = await this.resolve(assertionId, localQuery); - if (!rawRdf) continue; - - if (localQuery) { - const {assertion, rdf} = await this.createAssertion(assertionId, rawRdf); - - let object = result.find((x) => x.type === assertion.metadata.type && x.id === asset.assetId.value); - if (!object) { - object = { - type: assertion.metadata.type, - id: asset.assetId.value, - timestamp: assertion.metadata.timestamp, - data: [], - issuers: [], - assertions: [], - nodes: [this.networkService.getPeerId()], - }; - result.push(object); - } - - if (object.issuers.indexOf(assertion.metadata.issuer) === -1) { - object.issuers.push(assertion.metadata.issuer); - } - - if (object.assertions.indexOf(assertion.id) === -1) { - object.assertions.push(assertion.id); - object.data.push({ - id: assertion.id, - timestamp: assertion.metadata.timestamp, - data: assertion.data, - }); - } - if (new Date(object.timestamp) < new Date(assertion.metadata.timestamp)) { - object.timestamp = assertion.metadata.timestamp; - } - } else { - let object = result.find((x) => x.assetId === asset.assetId.value); - if (!object) { - object = { - assetId: asset.assetId.value, - assertions: [], - }; - result.push(object); - } - if (!object.assertions.find((x) => x.id === assertionId)) { - object.assertions.push({ - id: assertionId, - node: this.networkService.getPeerId(), - rdf: rawRdf, - }); - } - } - } - } - - return result; - } catch (e) { - this.handleUnavailableTripleStoreError(e); - } - } - async searchAssertions(query, options, localQuery = false) { try { const assertions = await this.implementation.findAssertionsByKeyword(query, options, localQuery); @@ -463,23 +390,6 @@ class DataService { return json; } - async frameAsset(data, type, framingCriteria) { - data.sort((a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime()); - let latest = data[0].data; - for (let i = 1; i < data.length; i += 1) { - const next = data[i].data; - - for (const row of latest) { - if (!next.find((x) => x.includes(row.split(' ')[1]))) next.push(row); - } - - latest = next; - } - - const jsonld = await this.fromRDF(latest, type); - return jsonld; - } - healthCheck() { return this.implementation.healthCheck(); } @@ -489,11 +399,31 @@ class DataService { } async appendMetadata(nquads, assertion) { - const metadata = await this.implementation.createMetadata(assertion); + const metadata = await this.createMetadata(assertion); nquads = nquads.concat(metadata); return nquads; } + async createMetadata(assertion) { + const metadata = { + '@context': 'https://www.schema.org/', + '@id': `${constants.DID_PREFIX}:${assertion.id}`, + hasType: assertion.metadata.type, + hasSignature: assertion.signature, + hasIssuer: assertion.metadata.issuer, + hasTimestamp: assertion.metadata.timestamp, + hasVisibility: assertion.metadata.visibility, + hasDataHash: assertion.metadata.dataHash, + hasKeywords: assertion.metadata.keywords, + }; + + if (assertion.metadata.UALs) + metadata.hasUALs = assertion.metadata.UALs; + + const result = await this.workerPool.exec('toNQuads', [metadata]); + return result; + } + async appendBlockchainMetadata(nquads, assertion) { const blockchainMetadata = await this.workerPool.exec('toNQuads', [{ '@context': 'https://www.schema.org/', @@ -505,10 +435,94 @@ class DataService { return nquads; } + async extractMetadata(rdf) { + return new Promise(async (accept, reject) => { + const parser = new N3.Parser({ format: 'N-Triples', baseIRI: 'http://schema.org/' }); + const result = { + metadata: { + keywords: [], + UALs: [], + }, + blockchain: {}, + }; + + const quads = []; + await parser.parse( + rdf.join('\n'), + (error, quad, prefixes) => { + if (error) { + reject(error); + } + if (quad) { + quads.push(quad); + } + }, + ); + + + for (const quad of quads) { + try { + switch (quad._predicate.id) { + case 'http://schema.org/hasType': + result.metadata.type = JSON.parse(quad._object.id); + result.id = quad._subject.id.replace(`${constants.DID_PREFIX}:`, ''); + break; + case 'http://schema.org/hasTimestamp': + result.metadata.timestamp = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasUALs': + result.metadata.UALs.push(JSON.parse(quad._object.id)); + break; + case 'http://schema.org/hasIssuer': + result.metadata.issuer = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasVisibility': + result.metadata.visibility = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasDataHash': + result.metadata.dataHash = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasKeywords': + result.metadata.keywords.push(JSON.parse(quad._object.id)); + break; + case 'http://schema.org/hasSignature': + result.signature = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasRootHash': + result.rootHash = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasBlockchain': + result.blockchain.name = JSON.parse(quad._object.id); + break; + case 'http://schema.org/hasTransactionHash': + result.blockchain.transactionHash = JSON.parse(quad._object.id); + break; + default: + break; + } + } catch (e) { + this.logger.error({ + msg: `Error in extracting metadata: ${e}. ${e.stack}`, + Event_name: constants.ERROR_TYPE.EXTRACT_METADATA_ERROR, + }); + } + } + + result.metadata.keywords.sort(); + if (!result.metadata.UALs.length) { + delete result.metadata.UALs; + } else { + result.metadata.UALs.sort(); + } + + accept(result); + }); + } + handleUnavailableTripleStoreError(e) { if (e.code === 'ECONNREFUSED') { this.logger.error({ - msg: `Triple Store (${this.implementation.getName()}) not available: ${e.message}. ${e.stack}`, + msg: `Triple Store (${this.getName()}) not available: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.TRIPLE_STORE_UNAVAILABLE_ERROR, Event_value1: e.message, }); From b9a97cf5378557c6b9c6c7fa37688866c6df86b0 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Thu, 10 Feb 2022 10:28:40 +0100 Subject: [PATCH 23/50] fix load parameter in /resolve endpoint --- modules/controller/rpc-controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/controller/rpc-controller.js b/modules/controller/rpc-controller.js index 08477592e7..99f12717b4 100644 --- a/modules/controller/rpc-controller.js +++ b/modules/controller/rpc-controller.js @@ -164,8 +164,8 @@ class RpcController { return next({code: 400, message: 'Param ids is required.'}); } - if (!req.query.load) { - req.query.load = true; + if (req.query.load === undefined) { + req.query.load = false; } const operationId = uuidv1(); try { From 71ecfbc65e44ecdd52e41965f4e3f76d8a651146 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Thu, 10 Feb 2022 11:09:04 +0100 Subject: [PATCH 24/50] Implement delay of 60 seconds for default commands --- modules/command/command-executor.js | 2 +- modules/constants.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/command/command-executor.js b/modules/command/command-executor.js index 19b9dcdbef..4b69cab2ff 100644 --- a/modules/command/command-executor.js +++ b/modules/command/command-executor.js @@ -214,7 +214,7 @@ class CommandExecutor { async _startDefaultCommand(name) { await CommandExecutor._delete(name); const handler = this.commandResolver.resolve(name); - await this.add(handler.default(), 0, true); + await this.add(handler.default(), constants.DEFAULT_COMMAND_DELAY_IN_MILLS, true); if (this.verboseLoggingEnabled) { this.logger.trace(`Permanent command ${name} created.`); } diff --git a/modules/constants.js b/modules/constants.js index 84a609f7b7..cb67119495 100644 --- a/modules/constants.js +++ b/modules/constants.js @@ -44,6 +44,11 @@ exports.MAX_COMMAND_DELAY_IN_MILLS = 14400 * 60 * 1000; // 10 days */ exports.DEFAULT_COMMAND_REPEAT_INTERVAL_IN_MILLS = 5000; // 5 seconds +/** + * @constant {number} DEFAULT_COMMAND_DELAY_IN_MILLS - Delay for default commands + */ +exports.DEFAULT_COMMAND_DELAY_IN_MILLS = 60 * 1000; // 60 seconds + /** * @constant {number} TRIPLE_STORE_CONNECT_MAX_RETRIES * - Maximum retries for connecting to triple store From dcf6c7252d4cb155f4d83763647b320e6ffd3faf Mon Sep 17 00:00:00 2001 From: NZT48 Date: Thu, 10 Feb 2022 11:10:04 +0100 Subject: [PATCH 25/50] Wait to data service to be fully initialized to continue with rest of initializations --- modules/command/common/send-telemetry-command.js | 2 +- ot-node.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/command/common/send-telemetry-command.js b/modules/command/common/send-telemetry-command.js index a25904385d..d831edebce 100644 --- a/modules/command/common/send-telemetry-command.js +++ b/modules/command/common/send-telemetry-command.js @@ -62,7 +62,7 @@ class SendTelemetryCommand extends Command { data: { message: '', }, - period: 60 * 60 * 1000, // 5 * 60 * 1000 + period: 60 * 60 * 1000, // 1 hour transactional: false, }; Object.assign(command, map); diff --git a/ot-node.js b/ot-node.js index a2e626b8ee..6e5498a8c9 100644 --- a/ot-node.js +++ b/ot-node.js @@ -102,7 +102,7 @@ class OTNode { async initializeDataModule() { try { const dataService = this.container.resolve('dataService'); - dataService.initialize(); + await dataService.initialize(); this.logger.info(`Data module: ${dataService.getName()} implementation`); db.sequelize.sync(); } catch (e) { From 24196f6d59fad20f2c109659d1274bd2c5b5f761 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Thu, 10 Feb 2022 11:42:56 +0100 Subject: [PATCH 26/50] Set status to failed for unexpected erros at routes --- modules/controller/rpc-controller.js | 82 +++++++++++++++++++++++----- 1 file changed, 67 insertions(+), 15 deletions(-) diff --git a/modules/controller/rpc-controller.js b/modules/controller/rpc-controller.js index 6bc2da1dfa..21806912a8 100644 --- a/modules/controller/rpc-controller.js +++ b/modules/controller/rpc-controller.js @@ -167,6 +167,7 @@ class RpcController { req.query.load = true; } const operationId = uuidv1(); + let handlerId = null; try { this.logger.emit({ msg: 'Started measuring execution of resolve command', @@ -178,7 +179,7 @@ class RpcController { const inserted_object = await Models.handler_ids.create({ status: 'PENDING', }); - const handlerId = inserted_object.dataValues.handler_id; + handlerId = inserted_object.dataValues.handler_id; res.status(202).send({ handler_id: handlerId, }); @@ -263,8 +264,17 @@ class RpcController { }, }, ); - } catch (e) { + Models.handler_ids.update( + { + status: 'FAILED', + data: JSON.stringify({ errorMessage: e.message }), + }, { + where: { + handler_id: handlerId, + }, + }, + ); this.logger.error({ msg: `Unexpected error at resolve route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.RESOLVE_ROUTE_ERROR, @@ -301,6 +311,7 @@ class RpcController { } const operationId = uuidv1(); + let handlerId = null; try { this.logger.emit({ msg: 'Started measuring execution of search command', @@ -311,12 +322,11 @@ class RpcController { const inserted_object = await Models.handler_ids.create({ status: 'PENDING', }); - const handlerId = inserted_object.dataValues.handler_id; + handlerId = inserted_object.dataValues.handler_id; res.status(202).send({ handler_id: handlerId, }); - let response; let nodes = []; response = await this.dataService.searchAssertions(query, {limit, prefix}, true); @@ -349,6 +359,16 @@ class RpcController { }, node); } } catch (e) { + Models.handler_ids.update( + { + status: 'FAILED', + data: JSON.stringify({ errorMessage: e.message }), + }, { + where: { + handler_id: handlerId, + }, + }, + ); this.logger.error({ msg: `Unexpected error at search assertions route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.SEARCH_ASSERTIONS_ROUTE_ERROR, @@ -370,6 +390,7 @@ class RpcController { return next({code: 400, message: 'Params query or ids are necessary.'}); } const operationId = uuidv1(); + let handlerId = null; try { this.logger.emit({ msg: 'Started measuring execution of search command', @@ -408,7 +429,7 @@ class RpcController { const inserted_object = await Models.handler_ids.create({ status: 'PENDING', }); - const handlerId = inserted_object.dataValues.handler_id; + handlerId = inserted_object.dataValues.handler_id; res.status(200).send({ handler_id: handlerId, }); @@ -448,6 +469,16 @@ class RpcController { } } catch (e) { + Models.handler_ids.update( + { + status: 'FAILED', + data: JSON.stringify({ errorMessage: e.message }), + }, { + where: { + handler_id: handlerId, + }, + }, + ); this.logger.error({ msg: `Unexpected error at search entities route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.SEARCH_ENTITIES_ROUTE_ERROR, @@ -473,6 +504,7 @@ class RpcController { return next({code: 400, message: 'Unallowed query type, currently supported types: construct'}); } const operationId = uuidv1(); + let handlerId = null; try { this.logger.emit({ msg: 'Started measuring execution of query command', @@ -485,7 +517,7 @@ class RpcController { const inserted_object = await Models.handler_ids.create({ status: 'PENDING', }); - const handlerId = inserted_object.dataValues.handler_id; + handlerId = inserted_object.dataValues.handler_id; res.status(200).send({ handler_id: handlerId, }); @@ -508,7 +540,7 @@ class RpcController { }, ); } catch (e) { - await Models.handler_ids.update( + Models.handler_ids.update( { status: 'FAILED', data: JSON.stringify({errorMessage: e.message}) @@ -543,6 +575,7 @@ class RpcController { } const operationId = uuidv1(); const handlerIdCachePath = this.fileService.getHandlerIdCachePath(); + let handlerId = null; try { this.logger.emit({ msg: 'Started measuring execution of proofs command', @@ -554,7 +587,7 @@ class RpcController { const inserted_object = await Models.handler_ids.create({ status: 'PENDING', }); - const handlerId = inserted_object.dataValues.handler_id; + handlerId = inserted_object.dataValues.handler_id; res.status(200).send({ handler_id: handlerId, }); @@ -565,7 +598,6 @@ class RpcController { assertions = [...new Set(req.query.assertions)]; } } - const reqNquads = JSON.parse(req.body.nquads); const result = []; @@ -594,6 +626,16 @@ class RpcController { }, ); } catch (e) { + Models.handler_ids.update( + { + status: 'FAILED', + data: JSON.stringify({ errorMessage: e.message }), + }, { + where: { + handler_id: handlerId, + }, + }, + ); this.logger.error({ msg: `Unexpected error at proofs route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.PROOFS_ROUTE_ERROR, @@ -618,11 +660,11 @@ class RpcController { }); } - const {handler_id, operation} = req.params; + const { handler_id, operation } = req.params; if (!validator.isUUID(handler_id)) { return next({ code: 400, - message: 'Handler id is in wrong format' + message: 'Handler id is in wrong format', }); } @@ -635,6 +677,9 @@ class RpcController { let response; if (handlerData) { + if (handlerData.status === 'FAILED') { + return res.status(200).send({ status: handlerData.status, data: JSON.parse(handlerData.data) }); + } const documentPath = this.fileService.getHandlerIdDocumentPath(handler_id); switch (req.params.operation) { case 'entities:search': @@ -714,11 +759,9 @@ class RpcController { break; default: handlerData.data = await this.fileService.loadJsonFromFile(documentPath); - res.status(200).send({status: handlerData.status, data: handlerData.data}); break; } - } else { next({code: 404, message: `Handler with id: ${handler_id} does not exist.`}); } @@ -793,7 +836,6 @@ class RpcController { res.status(202).send({ handler_id: handlerId, }); - const fileContent = req.files.file.data; const fileExtension = path.extname(req.files.file.name).toLowerCase(); const visibility = req.body.visibility ? req.body.visibility.toLowerCase() : 'public'; @@ -826,7 +868,17 @@ class RpcController { }, ); }) - .catch(e => { + .catch((e) => { + Models.handler_ids.update( + { + status: 'FAILED', + data: JSON.stringify({ errorMessage: e.message }), + }, { + where: { + handler_id: handlerId, + }, + }, + ); this.logger.error({ msg: `Unexpected error at publish route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.PUBLISH_ROUTE_ERROR, From 4a08962cb2fe5e44e3559b1cce9ba5dc00877138 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Thu, 10 Feb 2022 11:49:11 +0100 Subject: [PATCH 27/50] Fix query for latest asset's state --- external/graphdb-service.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/external/graphdb-service.js b/external/graphdb-service.js index 2630d99f5f..f6e3b83a81 100644 --- a/external/graphdb-service.js +++ b/external/graphdb-service.js @@ -265,8 +265,10 @@ class GraphdbService { { SELECT ?ng WHERE { - ?ng schema:hasUALs "${uri}" . + ?ng schema:hasUALs "${uri}" ; + schema:hasTimestamp ?timestamp . } + ORDER BY DESC(?timestamp) LIMIT 1 } FILTER (?g = ?ng) . From d01ace1e4c8f82de5ba504ea8552f1adf3aa30a4 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Thu, 10 Feb 2022 11:54:15 +0100 Subject: [PATCH 28/50] Update message when the error is saved for telemetry --- modules/logger/logger.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/logger/logger.js b/modules/logger/logger.js index e686b7e9ca..9bc1e9b165 100644 --- a/modules/logger/logger.js +++ b/modules/logger/logger.js @@ -38,7 +38,7 @@ class Logger { error(obj) { this.pinoLogger.error(obj.msg); this.pinoLogger.emit({ - msg: `Telemetry logging error: ${obj.Event_name}`, + msg: `Found error will be reported to Telemetry: ${obj.Event_name}`, Operation_name: 'Error', Event_name: obj.Event_name, Event_value1: obj.Event_value1 ? obj.Event_value1 : '', From f7345caa38409e3ed676874d4db9673145e6c2b1 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Thu, 10 Feb 2022 11:56:11 +0100 Subject: [PATCH 29/50] Fix blazegraph query for latest asset state --- external/blazegraph-service.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/external/blazegraph-service.js b/external/blazegraph-service.js index 42e7a2abb6..9bc8f583c3 100644 --- a/external/blazegraph-service.js +++ b/external/blazegraph-service.js @@ -113,8 +113,10 @@ class BlazegraphService { { SELECT ?ng WHERE { - ?ng schema:hasUALs "${uri}" . + ?ng schema:hasUALs "${uri}" ; + schema:hasTimestamp ?timestamp . } + ORDER BY DESC(?timestamp) LIMIT 1 } FILTER (?g = ?ng) . From 5a7bd6a3fe61f449d6d26eef6b928cbfd1ef5647 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Thu, 10 Feb 2022 12:08:09 +0100 Subject: [PATCH 30/50] Increment version for release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fb5f545a5f..b91a7e7053 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "6.0.0-beta.1.22", + "version": "6.0.0-beta.1.23", "description": "OTNode v6 Beta 1", "main": "index.js", "scripts": { From 8cd511f42d4430c2c40a5cd3206f0b9006abec67 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Thu, 10 Feb 2022 12:20:37 +0100 Subject: [PATCH 31/50] Stop loggin successful initialization of telemetry module if module is disabled --- ot-node.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ot-node.js b/ot-node.js index 6e5498a8c9..2b431546b8 100644 --- a/ot-node.js +++ b/ot-node.js @@ -185,8 +185,9 @@ class OTNode { async initializeTelemetryHubModule() { try { const telemetryHubModuleManager = this.container.resolve('telemetryHubModuleManager'); - telemetryHubModuleManager.initialize(this.config.telemetryHub, this.logger); - this.logger.info(`Telemetry hub module initialized successfully, using ${telemetryHubModuleManager.config.telemetryHub.packages} package(s)`); + if (telemetryHubModuleManager.initialize(this.config.telemetryHub, this.logger)) { + this.logger.info(`Telemetry hub module initialized successfully, using ${telemetryHubModuleManager.config.telemetryHub.packages} package(s)`); + } } catch (e) { this.logger.error(`Telemetry hub module initialization failed. Error message: ${e.message}`); } From 91d69a875ff201644671d6ddd3bc62ec1d939e4b Mon Sep 17 00:00:00 2001 From: NZT48 Date: Thu, 10 Feb 2022 12:51:40 +0100 Subject: [PATCH 32/50] Refactor handling failed requests status into method --- modules/controller/rpc-controller.js | 83 ++++++++-------------------- 1 file changed, 22 insertions(+), 61 deletions(-) diff --git a/modules/controller/rpc-controller.js b/modules/controller/rpc-controller.js index 21806912a8..1ba10fb65c 100644 --- a/modules/controller/rpc-controller.js +++ b/modules/controller/rpc-controller.js @@ -265,16 +265,7 @@ class RpcController { }, ); } catch (e) { - Models.handler_ids.update( - { - status: 'FAILED', - data: JSON.stringify({ errorMessage: e.message }), - }, { - where: { - handler_id: handlerId, - }, - }, - ); + this.updateFailedHandlerId(handlerId, e); this.logger.error({ msg: `Unexpected error at resolve route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.RESOLVE_ROUTE_ERROR, @@ -359,16 +350,7 @@ class RpcController { }, node); } } catch (e) { - Models.handler_ids.update( - { - status: 'FAILED', - data: JSON.stringify({ errorMessage: e.message }), - }, { - where: { - handler_id: handlerId, - }, - }, - ); + this.updateFailedHandlerId(handlerId, e); this.logger.error({ msg: `Unexpected error at search assertions route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.SEARCH_ASSERTIONS_ROUTE_ERROR, @@ -469,16 +451,7 @@ class RpcController { } } catch (e) { - Models.handler_ids.update( - { - status: 'FAILED', - data: JSON.stringify({ errorMessage: e.message }), - }, { - where: { - handler_id: handlerId, - }, - }, - ); + this.updateFailedHandlerId(handlerId, e); this.logger.error({ msg: `Unexpected error at search entities route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.SEARCH_ENTITIES_ROUTE_ERROR, @@ -540,16 +513,7 @@ class RpcController { }, ); } catch (e) { - Models.handler_ids.update( - { - status: 'FAILED', - data: JSON.stringify({errorMessage: e.message}) - }, { - where: { - handler_id: handlerId, - }, - }, - ); + this.updateFailedHandlerId(handlerId, e); } } catch (e) { this.logger.error({ @@ -626,16 +590,7 @@ class RpcController { }, ); } catch (e) { - Models.handler_ids.update( - { - status: 'FAILED', - data: JSON.stringify({ errorMessage: e.message }), - }, { - where: { - handler_id: handlerId, - }, - }, - ); + this.updateFailedHandlerId(handlerId, e); this.logger.error({ msg: `Unexpected error at proofs route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.PROOFS_ROUTE_ERROR, @@ -869,21 +824,12 @@ class RpcController { ); }) .catch((e) => { - Models.handler_ids.update( - { - status: 'FAILED', - data: JSON.stringify({ errorMessage: e.message }), - }, { - where: { - handler_id: handlerId, - }, - }, - ); + this.updateFailedHandlerId(handlerId, e); this.logger.error({ msg: `Unexpected error at publish route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.PUBLISH_ROUTE_ERROR, Event_value1: e.message, - Id_operation: operationId + Id_operation: operationId, }); }) .then(() => { @@ -895,6 +841,21 @@ class RpcController { }); }); } + + updateFailedHandlerId(handlerId, error) { + if (handlerId !== null) { + Models.handler_ids.update( + { + status: 'FAILED', + data: JSON.stringify({ errorMessage: error.message }), + }, { + where: { + handler_id: handlerId, + }, + }, + ); + } + } } module.exports = RpcController; From 6060684f171448393248ba96a1bf5601e43da390 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Thu, 10 Feb 2022 13:01:09 +0100 Subject: [PATCH 33/50] Handle unexisting handlerId error --- modules/controller/rpc-controller.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/controller/rpc-controller.js b/modules/controller/rpc-controller.js index 1ba10fb65c..28ba493355 100644 --- a/modules/controller/rpc-controller.js +++ b/modules/controller/rpc-controller.js @@ -265,13 +265,13 @@ class RpcController { }, ); } catch (e) { - this.updateFailedHandlerId(handlerId, e); this.logger.error({ msg: `Unexpected error at resolve route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.RESOLVE_ROUTE_ERROR, Event_value1: e.message, Id_operation: operationId }); + this.updateFailedHandlerId(handlerId, e, next); } finally { this.logger.emit({ msg: 'Finished measuring execution of resolve command', @@ -350,13 +350,13 @@ class RpcController { }, node); } } catch (e) { - this.updateFailedHandlerId(handlerId, e); this.logger.error({ msg: `Unexpected error at search assertions route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.SEARCH_ASSERTIONS_ROUTE_ERROR, Event_value1: e.message, Id_operation: operationId }); + this.updateFailedHandlerId(handlerId, e, next); } finally { this.logger.emit({ msg: 'Finished measuring execution of search command', @@ -451,13 +451,13 @@ class RpcController { } } catch (e) { - this.updateFailedHandlerId(handlerId, e); this.logger.error({ msg: `Unexpected error at search entities route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.SEARCH_ENTITIES_ROUTE_ERROR, Event_value1: e.message, Id_operation: operationId }); + this.updateFailedHandlerId(handlerId, e, next); } finally { this.logger.emit({ msg: 'Finished measuring execution of search command', @@ -513,7 +513,7 @@ class RpcController { }, ); } catch (e) { - this.updateFailedHandlerId(handlerId, e); + this.updateFailedHandlerId(handlerId, e, next); } } catch (e) { this.logger.error({ @@ -590,13 +590,13 @@ class RpcController { }, ); } catch (e) { - this.updateFailedHandlerId(handlerId, e); this.logger.error({ msg: `Unexpected error at proofs route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.PROOFS_ROUTE_ERROR, Event_value1: e.message, Id_operation: operationId, }); + this.updateFailedHandlerId(handlerId, e, next); } finally { this.logger.emit({ msg: 'Finished measuring execution of proofs command', @@ -611,7 +611,7 @@ class RpcController { if (!['provision', 'update', 'publish', 'resolve', 'query', 'entities:search', 'assertions:search', 'proofs:get'].includes(req.params.operation)) { return next({ code: 400, - message: 'Unexisting operation, available operations are: publish, resolve, query, proofs and search' + message: 'Unexisting operation, available operations are: provision, update, publish, resolve, entities:search, assertions:search, query and proofs:get', }); } @@ -824,13 +824,13 @@ class RpcController { ); }) .catch((e) => { - this.updateFailedHandlerId(handlerId, e); this.logger.error({ msg: `Unexpected error at publish route: ${e.message}. ${e.stack}`, Event_name: constants.ERROR_TYPE.PUBLISH_ROUTE_ERROR, Event_value1: e.message, Id_operation: operationId, }); + this.updateFailedHandlerId(handlerId, e, next); }) .then(() => { this.logger.emit({ @@ -842,7 +842,7 @@ class RpcController { }); } - updateFailedHandlerId(handlerId, error) { + updateFailedHandlerId(handlerId, error, next) { if (handlerId !== null) { Models.handler_ids.update( { @@ -854,6 +854,11 @@ class RpcController { }, }, ); + } else { + return next({ + code: 400, + message: 'Something went wrong with the requested operation, try again.', + }); } } } From 368f1b5a831ab4c288128adccd3fcf49d0ed7e59 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Thu, 10 Feb 2022 13:20:42 +0100 Subject: [PATCH 34/50] Setup triple store url as config param --- external/blazegraph-service.js | 30 +++++++++++++++++------------- external/graphdb-service.js | 12 +++++++----- modules/service/data-service.js | 5 ++++- 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/external/blazegraph-service.js b/external/blazegraph-service.js index 9bc8f583c3..019d7dd022 100644 --- a/external/blazegraph-service.js +++ b/external/blazegraph-service.js @@ -9,6 +9,10 @@ class BlazegraphService { async initialize(logger) { this.logger = logger; + this.config.axios = { + method: 'post', + url: `${this.config.url}/sparql`, + }; this.logger.info('Blazegraph module initialized successfully'); } @@ -16,16 +20,16 @@ class BlazegraphService { const askQuery = `ASK WHERE { GRAPH <${rootHash}> { ?s ?p ?o } }`; const exists = await this.ask(askQuery); if (!exists) { - const config = { + this.config.axios = { method: 'post', - url: `http://localhost:9999/blazegraph/sparql?context-uri=${rootHash}`, + url: `${this.config.url}/sparql?context-uri=${rootHash}`, headers: { 'Content-Type': 'text/x-nquads', }, data: triples, }; - await axios(config).then((response) => true) + await axios(this.config.axios).then((response) => true) .catch((error) => { this.logger.error(`Failed to write into Blazegraph: ${error} - ${error.stack}`); return false; @@ -39,16 +43,16 @@ class BlazegraphService { const data = qs.stringify({ query, }); - const config = { + this.config.axios = { method: 'post', - url: 'http://localhost:9999/blazegraph/sparql', + url: `${this.config.url}/sparql`, headers: { Accept: 'application/sparql-results+json', 'Content-Type': 'application/x-www-form-urlencoded', }, data, }; - axios(config).then((response) => { + axios(this.config.axios).then((response) => { accept(response.data); }).catch((e) => reject(e)); }); @@ -59,16 +63,16 @@ class BlazegraphService { const data = qs.stringify({ query, }); - const config = { + this.config.axios = { method: 'post', - url: 'http://localhost:9999/blazegraph/sparql', + url: `${this.config.url}/sparql`, headers: { Accept: 'text/x-nquads', 'Content-Type': 'application/x-www-form-urlencoded', }, data, }; - axios(config).then((response) => { + axios(this.config.axios).then((response) => { accept(response.data); }).catch((e) => reject(e)); }); @@ -79,16 +83,16 @@ class BlazegraphService { const data = qs.stringify({ query, }); - const config = { + this.config.axios = { method: 'post', - url: 'http://localhost:9999/blazegraph/sparql', + url: `${this.config.url}/sparql`, headers: { Accept: 'application/json', 'Content-Type': 'application/x-www-form-urlencoded', }, data, }; - axios(config).then((response) => { + axios(this.config.axios).then((response) => { accept(response.data.boolean); }).catch((e) => reject(e)); }); @@ -193,7 +197,7 @@ class BlazegraphService { async healthCheck() { try { - const response = await axios.get('http://localhost:9999/blazegraph/status', {}); + const response = await axios.get(`${this.config.url}/status`, {}); if (response.data !== null) { return true; } diff --git a/external/graphdb-service.js b/external/graphdb-service.js index 83cdc2ffba..a54020b4c4 100644 --- a/external/graphdb-service.js +++ b/external/graphdb-service.js @@ -16,7 +16,7 @@ class GraphdbService { async initialize(logger) { this.logger = logger; this.logger.info(`Data repository name: ${this.config.repositoryName}`); - const serverConfig = new ServerClientConfig('http://localhost:7200/') + const serverConfig = new ServerClientConfig(this.config.url) .setTimeout(40000) .setHeaders({ Accept: RDFMimeType.N_QUADS, @@ -33,8 +33,8 @@ class GraphdbService { const readTimeout = 30000; const writeTimeout = 30000; - const repositoryServerConfig = new RepositoryClientConfig('http://localhost:7200/') - .setEndpoints([`http://localhost:7200/repositories/${this.config.repositoryName}`]) + const repositoryServerConfig = new RepositoryClientConfig(this.config.url) + .setEndpoints([`${this.config.url}/repositories/${this.config.repositoryName}`]) .setHeaders({ Accept: RDFMimeType.N_QUADS, }) @@ -135,8 +135,10 @@ class GraphdbService { { SELECT ?ng WHERE { - ?ng schema:hasUALs "${uri}" . + ?ng schema:hasUALs "${uri}" ; + schema:hasTimestamp ?timestamp . } + ORDER BY DESC(?timestamp) LIMIT 1 } FILTER (?g = ?ng) . @@ -211,7 +213,7 @@ class GraphdbService { async healthCheck() { try { - const response = await axios.get(`http://localhost:7200/repositories/${this.config.repositoryName}/health`, {}, + const response = await axios.get(`${this.config.url}/repositories/${this.config.repositoryName}/health`, {}, { auth: { username: this.config.username, diff --git a/modules/service/data-service.js b/modules/service/data-service.js index 87dddbd0fb..4fad15dd0e 100644 --- a/modules/service/data-service.js +++ b/modules/service/data-service.js @@ -21,12 +21,15 @@ class DataService { async initialize() { if (this.config.graphDatabase.implementation === constants.TRIPLE_STORE_IMPLEMENTATION.BLAZEGRAPH) { - this.implementation = new Blazegraph({}); + this.implementation = new Blazegraph({ + url: this.config.graphDatabase.url, + }); } else { this.implementation = new GraphDB({ repositoryName: this.config.graphDatabase.name, username: this.config.graphDatabase.username, password: this.config.graphDatabase.password, + url: this.config.graphDatabase.url, }); } From 55f66fbf44529965723504d5aa3d36b315ecc910 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Thu, 10 Feb 2022 14:00:30 +0100 Subject: [PATCH 35/50] graphdb url added to default config --- config/config.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/config.json b/config/config.json index 0617496a6a..d4ddfc5d9d 100644 --- a/config/config.json +++ b/config/config.json @@ -18,6 +18,7 @@ ], "graphDatabase": { "implementation": "GraphDB", + "url": "http://localhost:7200", "name": "node0", "username": "admin", "password": "" @@ -58,6 +59,7 @@ ], "graphDatabase": { "implementation": "GraphDB", + "url": "http://localhost:7200", "name": "node0", "username": "admin", "password": "" @@ -93,6 +95,7 @@ "blockchain": [], "graphDatabase": { "implementation": "GraphDB", + "url": "http://localhost:7200", "name": "node0", "username": "admin", "password": "" From 837230ee41311e64c3806469b9a4986810ee3feb Mon Sep 17 00:00:00 2001 From: NZT48 Date: Thu, 10 Feb 2022 14:44:06 +0100 Subject: [PATCH 36/50] Update postman collection uploaded --- postman/DKGv6.postman_collection.json | 225 +++++++++----------------- 1 file changed, 74 insertions(+), 151 deletions(-) diff --git a/postman/DKGv6.postman_collection.json b/postman/DKGv6.postman_collection.json index dbb72b12d4..d94c2cc761 100644 --- a/postman/DKGv6.postman_collection.json +++ b/postman/DKGv6.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "b6a0c71d-0397-4f56-8da6-750dc613207c", + "_postman_id": "17f931a1-6044-4026-b9e4-207ef606463d", "name": "DKGv6", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -22,11 +22,11 @@ { "key": "file", "type": "file", - "src": "/Users/miloskotlar/ot-node-v6-poc/nft-data/axie1.json" + "src": "/Users/nikolatodorovic/v6/ot-node/demo-data/Feynman.json" }, { "key": "keywords", - "value": "[\"Claude\",\"InformationTheory\", \"Cryptographer\"]", + "value": "[\"Feynman\",\"Physics\", \"Scientist\"]", "type": "text" }, { @@ -83,7 +83,7 @@ ] }, "url": { - "raw": "{{HOST}}:8900/api/latest/provision/result/5015fe5c-8b24-4a60-819f-67f50064500c", + "raw": "{{HOST}}:8900/api/latest/provision/result/940e2924-524e-4ed0-8379-503c5504552a", "host": [ "{{HOST}}" ], @@ -93,19 +93,7 @@ "latest", "provision", "result", - "5015fe5c-8b24-4a60-819f-67f50064500c" - ], - "query": [ - { - "key": "ids", - "value": "axie", - "disabled": true - }, - { - "key": "types", - "value": "gs1-epcis", - "disabled": true - } + "940e2924-524e-4ed0-8379-503c5504552a" ] } }, @@ -125,11 +113,11 @@ { "key": "file", "type": "file", - "src": "/Users/miloskotlar/ot-node-v6-poc/nft-data/axie1.json" + "src": "/Users/nikolatodorovic/v6/ot-node/demo-data/Feynman.json" }, { "key": "keywords", - "value": "[\"Claude\",\"InformationTheory\", \"Cryptographer\"]", + "value": "[\"Feynman\",\"Physics\", \"Scientist\"]", "type": "text" }, { @@ -139,7 +127,7 @@ }, { "key": "ual", - "value": "7d943dec383a7fc0e4897a0a99ace2eb2fe06b56aff3abea0757b8883e775f7d", + "value": "c37c86b59ba64ab269850860621b634feaab9f500a73ef5620000b8b55dcb29a", "type": "text" } ] @@ -191,7 +179,7 @@ ] }, "url": { - "raw": "{{HOST}}:8900/api/latest/provision/result/c57908da-6153-4973-a465-098d7f3964f7", + "raw": "{{HOST}}:8900/api/latest/provision/result/36f9c131-130f-4d41-86e4-7cc6781bb51c", "host": [ "{{HOST}}" ], @@ -201,19 +189,7 @@ "latest", "provision", "result", - "c57908da-6153-4973-a465-098d7f3964f7" - ], - "query": [ - { - "key": "ids", - "value": "axie", - "disabled": true - }, - { - "key": "types", - "value": "gs1-epcis", - "disabled": true - } + "36f9c131-130f-4d41-86e4-7cc6781bb51c" ] } }, @@ -238,11 +214,11 @@ { "key": "file", "type": "file", - "src": "/Users/miloskotlar/ot-node-v6-poc/nft-data/axie1.json" + "src": "/Users/nikolatodorovic/v6/ot-node/demo-data/Galileo.json" }, { "key": "keywords", - "value": "[\"Claude\",\"InformationTheory\", \"Cryptographer\"]", + "value": "[\"Galileo\",\"Scientist\", \"Astronomer\"]", "type": "text" }, { @@ -277,29 +253,10 @@ "header": [], "body": { "mode": "formdata", - "formdata": [ - { - "key": "topic", - "value": "blazard1", - "type": "text", - "disabled": true - }, - { - "key": "limit", - "value": "100", - "type": "text", - "disabled": true - }, - { - "key": "offset", - "value": "0", - "type": "text", - "disabled": true - } - ] + "formdata": [] }, "url": { - "raw": "{{HOST}}:8900/api/latest/provision/result/10024045-95fc-4a2f-9ebc-69c55b9a0e9e", + "raw": "{{HOST}}:8900/api/latest/provision/result/c6c3b9af-0f3c-4324-b5bf-0181d49baa04", "host": [ "{{HOST}}" ], @@ -309,7 +266,7 @@ "latest", "provision", "result", - "10024045-95fc-4a2f-9ebc-69c55b9a0e9e" + "c6c3b9af-0f3c-4324-b5bf-0181d49baa04" ], "query": [ { @@ -342,7 +299,7 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}:8900/api/latest/resolve?ids=177930cabcf1399dcb25b4cb907d71097b247247d250eb7a35fffc5974ec732f&&load=true", + "raw": "{{HOST}}:8900/api/latest/resolve?ids=c37c86b59ba64ab269850860621b634feaab9f500a73ef5620000b8b55dcb29a&load=true", "host": [ "{{HOST}}" ], @@ -355,11 +312,7 @@ "query": [ { "key": "ids", - "value": "177930cabcf1399dcb25b4cb907d71097b247247d250eb7a35fffc5974ec732f" - }, - { - "key": null, - "value": null + "value": "c37c86b59ba64ab269850860621b634feaab9f500a73ef5620000b8b55dcb29a" }, { "key": "load", @@ -383,7 +336,7 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}:8900/api/latest/resolve/result/ea5edd69-e612-450b-b4d9-385e3d0eaaef", + "raw": "{{HOST}}:8900/api/latest/resolve/result/22419c1a-d41d-4235-9849-e7e1a22edf4f", "host": [ "{{HOST}}" ], @@ -393,19 +346,7 @@ "latest", "resolve", "result", - "ea5edd69-e612-450b-b4d9-385e3d0eaaef" - ], - "query": [ - { - "key": "ids", - "value": "axie", - "disabled": true - }, - { - "key": "types", - "value": "gs1-epcis", - "disabled": true - } + "22419c1a-d41d-4235-9849-e7e1a22edf4f" ] } }, @@ -443,7 +384,7 @@ ] }, "url": { - "raw": "{{HOST}}:8900/api/latest/assertions:search?query=InformationTheory", + "raw": "{{HOST}}:8900/api/latest/assertions:search?query=scientist", "host": [ "{{HOST}}" ], @@ -455,18 +396,18 @@ ], "query": [ { - "key": "ids", - "value": "axie", - "disabled": true + "key": "query", + "value": "scientist" }, { - "key": "types", - "value": "gs1-epcis", + "key": "prefix", + "value": "true", "disabled": true }, { - "key": "query", - "value": "InformationTheory" + "key": "limit", + "value": "20", + "disabled": true } ] } @@ -505,7 +446,7 @@ ] }, "url": { - "raw": "{{HOST}}:8900/api/latest/assertions:search/result/2ab488b6-c12e-4e3c-959d-a38fef1f84e3", + "raw": "{{HOST}}:8900/api/latest/assertions:search/result/ccf90eba-4a45-4c47-81e0-1a2e1e679f70", "host": [ "{{HOST}}" ], @@ -515,19 +456,7 @@ "latest", "assertions:search", "result", - "2ab488b6-c12e-4e3c-959d-a38fef1f84e3" - ], - "query": [ - { - "key": "ids", - "value": "axie", - "disabled": true - }, - { - "key": "types", - "value": "gs1-epcis", - "disabled": true - } + "ccf90eba-4a45-4c47-81e0-1a2e1e679f70" ] } }, @@ -565,7 +494,7 @@ ] }, "url": { - "raw": "{{HOST}}:8900/api/latest/entities:search?query=InformationTheory", + "raw": "{{HOST}}:8900/api/latest/entities:search?query=feynman", "host": [ "{{HOST}}" ], @@ -583,7 +512,7 @@ }, { "key": "ids", - "value": "axie", + "value": "", "disabled": true }, { @@ -596,9 +525,14 @@ "value": "20", "disabled": true }, + { + "key": "issuers", + "value": null, + "disabled": true + }, { "key": "query", - "value": "InformationTheory" + "value": "feynman" } ] } @@ -615,29 +549,10 @@ "header": [], "body": { "mode": "formdata", - "formdata": [ - { - "key": "topic", - "value": "blazard1", - "type": "text", - "disabled": true - }, - { - "key": "limit", - "value": "100", - "type": "text", - "disabled": true - }, - { - "key": "offset", - "value": "0", - "type": "text", - "disabled": true - } - ] + "formdata": [] }, "url": { - "raw": "{{HOST}}:8900/api/latest/entities:search/result/15857cc9-100b-4420-aadc-c24f8eaa632d", + "raw": "{{HOST}}:8900/api/latest/entities:search/result/b18a819d-d546-4bc2-95c1-242d78c094e7", "host": [ "{{HOST}}" ], @@ -647,7 +562,7 @@ "latest", "entities:search", "result", - "15857cc9-100b-4420-aadc-c24f8eaa632d" + "b18a819d-d546-4bc2-95c1-242d78c094e7" ] } }, @@ -663,7 +578,7 @@ "formdata": [ { "key": "query", - "value": "PREFIX schema: \nCONSTRUCT { ?s schema:name \"Claude Shannon\" }\nWHERE {\n GRAPH ?g { \n ?s schema:name \"Claude Shannon\" .\n }\n}", + "value": "PREFIX schema: \nCONSTRUCT { ?s schema:name \"Richard Feynman\" }\nWHERE {\n GRAPH ?g { \n ?s schema:name \"Richard Feynman\" .\n }\n}", "type": "text" } ] @@ -699,29 +614,10 @@ "header": [], "body": { "mode": "formdata", - "formdata": [ - { - "key": "topic", - "value": "blazard1", - "type": "text", - "disabled": true - }, - { - "key": "limit", - "value": "100", - "type": "text", - "disabled": true - }, - { - "key": "offset", - "value": "0", - "type": "text", - "disabled": true - } - ] + "formdata": [] }, "url": { - "raw": "{{HOST}}:8900/api/latest/query/result/ce1c1ace-3bc7-49b7-8dc8-1fbea25143dc", + "raw": "{{HOST}}:8900/api/latest/query/result/d3480867-d5f7-4f10-9686-8c658c102dcf", "host": [ "{{HOST}}" ], @@ -731,7 +627,7 @@ "latest", "query", "result", - "ce1c1ace-3bc7-49b7-8dc8-1fbea25143dc" + "d3480867-d5f7-4f10-9686-8c658c102dcf" ] } }, @@ -747,7 +643,7 @@ "formdata": [ { "key": "nquads", - "value": "[ \"_:genid2dc4c6c4682460401d8ca7914d9be0ce992dc14n0 \\\"Claude Shannon\\\" .\"\n]", + "value": "[ \"_:t1253 \\\"Richard Feynman\\\" .\"\n]", "type": "text" } ] @@ -780,7 +676,7 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}:8900/api/latest/proofs:get/result/967887f4-96cb-4784-9cd8-fc31a64a8ec8", + "raw": "{{HOST}}:8900/api/latest/proofs:get/result/72d7c0b3-a41e-4f90-91d5-082579f25b65", "host": [ "{{HOST}}" ], @@ -790,7 +686,34 @@ "latest", "proofs:get", "result", - "967887f4-96cb-4784-9cd8-fc31a64a8ec8" + "72d7c0b3-a41e-4f90-91d5-082579f25b65" + ] + } + }, + "response": [] + }, + { + "name": "Info", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "formdata", + "formdata": [] + }, + "url": { + "raw": "{{HOST}}:8900/api/latest/info", + "host": [ + "{{HOST}}" + ], + "port": "8900", + "path": [ + "api", + "latest", + "info" ] } }, From 3aa3c5b06e5f9b4a30c673c5d5a81fa4a49b559c Mon Sep 17 00:00:00 2001 From: NZT48 Date: Thu, 10 Feb 2022 15:55:20 +0100 Subject: [PATCH 37/50] Fix sparql query for finding assets by keyword --- external/blazegraph-service.js | 14 +++++++------- external/graphdb-service.js | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/external/blazegraph-service.js b/external/blazegraph-service.js index 019d7dd022..cddd77fdb5 100644 --- a/external/blazegraph-service.js +++ b/external/blazegraph-service.js @@ -172,11 +172,11 @@ class BlazegraphService { const sparqlQuery = `PREFIX schema: SELECT ?assertionId WHERE { - ?assertionId schema:hasTimestamp ?timestamp ; + ?assertionId schema:hasTimestamp ?latestTimestamp ; ${!localQuery ? 'schema:hasVisibility "public" ;' : ''} schema:hasUALs ?assetId . { - SELECT ?assetId (MAX(?timestamp) AS ?timestamp) + SELECT ?assetId (MAX(?timestamp) AS ?latestTimestamp) WHERE { ?assertionId schema:hasKeywords ?keyword ; schema:hasIssuer ?issuer ; @@ -186,11 +186,11 @@ class BlazegraphService { ${options.prefix ? `FILTER contains(lcase(?keyword),'${query}')` : `FILTER (lcase(?keyword) = '${query}')`} ${options.issuers ? `FILTER (?issuer IN (${JSON.stringify(options.issuers).slice(1, -1)}))` : ''} ${options.types ? `FILTER (?type IN (${JSON.stringify(options.types).slice(1, -1)}))` : ''} - } - } - } - group by ?outerAssetId - ${options.limit ? `LIMIT ${options.limit}` : ''}`; + } + GROUP BY ?assetId + ${options.limit ? `LIMIT ${options.limit}` : ''} + } + }`; const result = await this.execute(sparqlQuery); return result.results.bindings; } diff --git a/external/graphdb-service.js b/external/graphdb-service.js index a54020b4c4..b471d4cb19 100644 --- a/external/graphdb-service.js +++ b/external/graphdb-service.js @@ -187,11 +187,11 @@ class GraphdbService { const sparqlQuery = `PREFIX schema: SELECT ?assertionId WHERE { - ?assertionId schema:hasTimestamp ?timestamp ; + ?assertionId schema:hasTimestamp ?latestTimestamp ; ${!localQuery ? 'schema:hasVisibility "public" ;' : ''} schema:hasUALs ?assetId . { - SELECT ?assetId (MAX(?timestamp) AS ?timestamp) + SELECT ?assetId (MAX(?timestamp) AS ?latestTimestamp) WHERE { ?assertionId schema:hasKeywords ?keyword ; schema:hasIssuer ?issuer ; From c62800a264e390d679488ce9dbde7cb194f8a4b9 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Thu, 10 Feb 2022 16:02:32 +0100 Subject: [PATCH 38/50] Update telemetry plugin version, remove nodemon from dependencies --- package-lock.json | 585 +++++++--------------------------------------- package.json | 3 +- 2 files changed, 91 insertions(+), 497 deletions(-) diff --git a/package-lock.json b/package-lock.json index 38ec76f571..cc6bf7c665 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "6.0.0-beta.1.19", + "version": "6.0.0-beta.1.23", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1142,14 +1142,6 @@ "uri-js": "^4.2.2" } }, - "ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "requires": { - "string-width": "^4.1.0" - } - }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -1183,15 +1175,6 @@ "native-abort-controller": "^1.0.3" } }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, "app-root-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.0.0.tgz", @@ -1338,9 +1321,9 @@ "dev": true }, "async": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.1.tgz", - "integrity": "sha512-XdD5lRO/87udXCMC9meWdYiR+Nq6ZjUfXidViUZGu2F1MO4T3XwZ1et0hb2++BgLfhyJwy44BGB/yx80ABx8hg==" + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", + "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==" }, "async-limiter": { "version": "1.0.1", @@ -1470,11 +1453,6 @@ "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" - }, "bindings": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", @@ -1558,59 +1536,6 @@ } } }, - "boxen": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", - "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", - "requires": { - "ansi-align": "^3.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.1.0", - "cli-boxes": "^2.2.1", - "string-width": "^4.2.2", - "type-fest": "^0.20.2", - "widest-line": "^3.1.0", - "wrap-ansi": "^7.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "camelcase": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", - "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==" - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - } - } - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1620,14 +1545,6 @@ "concat-map": "0.0.1" } }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { - "fill-range": "^7.0.1" - } - }, "brolog": { "version": "1.12.4", "resolved": "https://registry.npmjs.org/brolog/-/brolog-1.12.4.tgz", @@ -1882,6 +1799,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -1891,6 +1809,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -1899,6 +1818,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { "color-name": "~1.1.4" } @@ -1906,17 +1826,20 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -1931,31 +1854,11 @@ "rotating-file-stream": "^1.4.2" } }, - "chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, "chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" - }, "cids": { "version": "0.7.5", "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", @@ -2018,11 +1921,6 @@ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" }, - "cli-boxes": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==" - }, "cli-color": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.1.tgz", @@ -2115,19 +2013,6 @@ "proto-list": "~1.2.1" } }, - "configstore": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", - "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", - "requires": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - } - }, "confusing-browser-globals": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", @@ -2245,17 +2130,20 @@ } }, "cross-fetch": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.4.tgz", - "integrity": "sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", "requires": { - "node-fetch": "2.6.1" + "node-fetch": "2.6.7" }, "dependencies": { "node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + } } } }, @@ -2292,11 +2180,6 @@ "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" }, - "crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==" - }, "d": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", @@ -2475,14 +2358,6 @@ "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" }, - "dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "requires": { - "is-obj": "^2.0.0" - } - }, "dotenv": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", @@ -2704,9 +2579,9 @@ } }, "es6-promisify": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-6.1.1.tgz", - "integrity": "sha512-HBL8I3mIki5C1Cc9QjKUenHtnG0A5/xA8Q/AllRcfiwl2CZFXGK7ddBiCoRwAix4i2KxcQfjtIVcrVbB3vbmwg==" + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-7.0.0.tgz", + "integrity": "sha512-ginqzK3J90Rd4/Yz7qRrqUeIpe3TwSXTPPZtPne7tGBPeAaQiU8qt4fpKApnxHcq1AwtUdHVg5P77x/yrggG8Q==" }, "es6-symbol": { "version": "3.1.3", @@ -2734,11 +2609,6 @@ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, - "escape-goat": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", - "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==" - }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -3447,14 +3317,6 @@ "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, "finalhandler": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", @@ -3588,12 +3450,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "optional": true - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -3678,6 +3534,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, "requires": { "is-glob": "^4.0.1" } @@ -3691,21 +3548,6 @@ "process": "^0.11.10" } }, - "global-dirs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", - "requires": { - "ini": "2.0.0" - }, - "dependencies": { - "ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==" - } - } - }, "globals": { "version": "13.11.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", @@ -3865,11 +3707,6 @@ "has-symbols": "^1.0.2" } }, - "has-yarn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", - "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==" - }, "hash-base": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", @@ -4005,11 +3842,6 @@ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, - "ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=" - }, "import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -4020,15 +3852,11 @@ "resolve-from": "^4.0.0" } }, - "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=" - }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true }, "indent-string": { "version": "4.0.0", @@ -4177,14 +4005,6 @@ "has-bigints": "^1.0.1" } }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "requires": { - "binary-extensions": "^2.0.0" - } - }, "is-boolean-object": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", @@ -4204,14 +4024,6 @@ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==" }, - "is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "requires": { - "ci-info": "^2.0.0" - } - }, "is-core-module": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", @@ -4236,7 +4048,8 @@ "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true }, "is-fullwidth-code-point": { "version": "3.0.0", @@ -4260,6 +4073,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -4269,15 +4083,6 @@ "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" }, - "is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "requires": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - } - }, "is-ip": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-ip/-/is-ip-3.1.0.tgz", @@ -4296,16 +4101,6 @@ "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" }, - "is-npm": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", - "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==" - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - }, "is-number-object": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", @@ -4314,21 +4109,11 @@ "has-tostringtag": "^1.0.0" } }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" - }, "is-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==" }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==" - }, "is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -4396,11 +4181,6 @@ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, - "is-yarn-global": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", - "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==" - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -4506,14 +4286,14 @@ } }, "it-map": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/it-map/-/it-map-1.0.5.tgz", - "integrity": "sha512-EElupuWhHVStUgUY+OfTJIS2MZed96lDrAXzJUuqiiqLnIKoBRqtX1ZG2oR0bGDsSppmz83MtzCeKLZ9TVAUxQ==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/it-map/-/it-map-1.0.6.tgz", + "integrity": "sha512-XT4/RM6UHIFG9IobGlQPFQUrlEKkU4eBUFG3qhWhfAdh1JfF2x11ShCrKCdmZ0OiZppPfoLuzcfA4cey6q3UAQ==" }, "it-merge": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-1.0.3.tgz", - "integrity": "sha512-FTIcv8VGOkSnq5WGoepN+ag/DVdSVZk7pALuduxyGlErH7uzcvZD3IXHXY47ViptHQFbga2rU9SPlFmC7ttRBA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-1.0.4.tgz", + "integrity": "sha512-DcL6GksTD2HQ7+5/q3JznXaLNfwjyG3/bObaF98da+oHfUiPmdo64oJlT9J8R8G5sJRU7thwaY5zxoAKCn7FJw==", "requires": { "it-pushable": "^1.4.0" } @@ -4845,14 +4625,6 @@ "language-subtag-registry": "~0.3.2" } }, - "latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", - "requires": { - "package-json": "^6.3.0" - } - }, "leven": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", @@ -4869,20 +4641,21 @@ } }, "libp2p": { - "version": "0.32.4", - "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-0.32.4.tgz", - "integrity": "sha512-GSImpWJmjFqjXrv9sgJfwaWhMF+J07nNZJknobvgWXXki9W/1a5UsNVyw/1Z2licvsc+aUmCxDgV92lbUvTeSw==", + "version": "0.32.5", + "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-0.32.5.tgz", + "integrity": "sha512-G21yQUdq4LaGDvjMi3ySmcx1cESl8ZsTG1BAfjzjx65DsZJKQ5GPZlamcv+Rwppk3OIplWoRnCu6gam/fI//bw==", "requires": { "@motrix/nat-api": "^0.3.1", "@vascosantos/moving-average": "^1.1.0", "abort-controller": "^3.0.0", + "abortable-iterator": "^3.0.0", "aggregate-error": "^3.1.0", "any-signal": "^2.1.1", "bignumber.js": "^9.0.1", "class-is": "^1.1.0", "debug": "^4.3.1", "err-code": "^3.0.0", - "es6-promisify": "^6.1.1", + "es6-promisify": "^7.0.0", "events": "^3.3.0", "hashlru": "^2.3.0", "interface-datastore": "^5.1.1", @@ -5186,21 +4959,6 @@ "multiaddr": "^10.0.0" } }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -5582,9 +5340,9 @@ "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=" }, "nanoid": { - "version": "3.1.25", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", - "integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", + "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==" }, "native-abort-controller": { "version": "1.0.3", @@ -5651,38 +5409,6 @@ "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==", "dev": true }, - "nodemon": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.15.tgz", - "integrity": "sha512-gdHMNx47Gw7b3kWxJV64NI+Q5nfl0y5DgDbiVtShiwa7Z0IZ07Ll4RLFo6AjrhzMtoEZn5PDE3/c2AbVsiCkpA==", - "requires": { - "chokidar": "^3.5.2", - "debug": "^3.2.7", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.0.4", - "pstree.remy": "^1.1.8", - "semver": "^5.7.1", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5", - "update-notifier": "^5.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "requires": { - "ms": "^2.1.1" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, "nopt": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", @@ -5711,11 +5437,6 @@ } } }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" - }, "normalize-url": { "version": "4.5.1", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", @@ -5862,9 +5583,9 @@ } }, "ot-telemetry-collector": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ot-telemetry-collector/-/ot-telemetry-collector-1.0.1.tgz", - "integrity": "sha512-EtEtixFzNGGODNi3zANoQGF1Tkh23MiSoR6Hi59kRCkh7MEhurcllXRRPg73TZwGq3yMbiCG4kcNHMynBrZQJg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ot-telemetry-collector/-/ot-telemetry-collector-1.0.3.tgz", + "integrity": "sha512-FGbqokUloapHOzZSEWp24l0aITwf2RXQuvQq9dLNbcmFu+MtX19nvcwenrL+qooZb0uXckQ2gKCfBT4Kaf9i9w==", "requires": { "axios": "^0.24.0", "form-data": "^4.0.0", @@ -6013,24 +5734,6 @@ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, - "package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", - "requires": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, "pad-right": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/pad-right/-/pad-right-0.2.2.tgz", @@ -6163,11 +5866,6 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, - "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" - }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -6386,11 +6084,6 @@ "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" }, - "pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" - }, "public-encrypt": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", @@ -6418,19 +6111,14 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, - "pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "qs": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", "requires": { - "escape-goat": "^2.0.0" + "side-channel": "^1.0.4" } }, - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" - }, "query-string": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", @@ -6600,14 +6288,6 @@ "util-deprecate": "^1.0.1" } }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "requires": { - "picomatch": "^2.2.1" - } - }, "real-require": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.1.0.tgz", @@ -6664,22 +6344,6 @@ "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, - "registry-auth-token": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", - "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", - "requires": { - "rc": "^1.2.8" - } - }, - "registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", - "requires": { - "rc": "^1.2.8" - } - }, "relative-to-absolute-iri": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/relative-to-absolute-iri/-/relative-to-absolute-iri-1.0.6.tgz", @@ -6728,6 +6392,11 @@ "mime-types": "^2.1.12" } }, + "qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" + }, "uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -6938,21 +6607,6 @@ "lru-cache": "^6.0.0" } }, - "semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", - "requires": { - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, "send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", @@ -7157,9 +6811,9 @@ "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" }, "simple-get": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", - "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.2.tgz", + "integrity": "sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw==", "requires": { "decompress-response": "^3.3.0", "once": "^1.3.1", @@ -7770,14 +7424,6 @@ "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "requires": { - "is-number": "^7.0.0" - } - }, "toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", @@ -7788,24 +7434,6 @@ "resolved": "https://registry.npmjs.org/toposort-class/-/toposort-class-1.0.1.tgz", "integrity": "sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg=" }, - "touch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", - "requires": { - "nopt": "~1.0.10" - }, - "dependencies": { - "nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", - "requires": { - "abbrev": "1" - } - } - } - }, "tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -7815,6 +7443,11 @@ "punycode": "^2.1.1" } }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, "truncate-utf8-bytes": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", @@ -7870,7 +7503,8 @@ "type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true }, "type-is": { "version": "1.6.18", @@ -7921,24 +7555,11 @@ "which-boxed-primitive": "^1.0.2" } }, - "undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" - }, "underscore": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==" }, - "unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "requires": { - "crypto-random-string": "^2.0.0" - } - }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -7954,27 +7575,6 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, - "update-notifier": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", - "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", - "requires": { - "boxen": "^5.0.0", - "chalk": "^4.1.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.1.0", - "pupa": "^2.1.1", - "semver": "^7.3.4", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" - } - }, "upper-case-first": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-2.0.2.tgz", @@ -8591,6 +8191,11 @@ "web3-net": "1.6.0" } }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, "websocket": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", @@ -8619,6 +8224,15 @@ } } }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "wherearewe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wherearewe/-/wherearewe-1.0.0.tgz", @@ -8665,14 +8279,6 @@ "is-typed-array": "^1.1.7" } }, - "widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", - "requires": { - "string-width": "^4.0.0" - } - }, "wkx": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/wkx/-/wkx-0.5.0.tgz", @@ -8687,6 +8293,11 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, + "workerpool": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", + "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==" + }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -8725,17 +8336,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, - "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, "ws": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", @@ -8746,11 +8346,6 @@ "ultron": "~1.1.0" } }, - "xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==" - }, "xhr": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", @@ -8807,9 +8402,9 @@ "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" }, "xsalsa20": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xsalsa20/-/xsalsa20-1.1.0.tgz", - "integrity": "sha512-zd3ytX2cm+tcSndRU+krm0eL4TMMpZE7evs5hLRAoOy6gviqLfe3qOlkjF3i5SeAkQUCeJk0lJZrEU56kHRfWw==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/xsalsa20/-/xsalsa20-1.2.0.tgz", + "integrity": "sha512-FIr/DEeoHfj7ftfylnoFt3rAIRoWXpx2AoDfrT2qD2wtp7Dp+COajvs/Icb7uHqRW9m60f5iXZwdsJJO3kvb7w==" }, "xtend": { "version": "4.0.2", diff --git a/package.json b/package.json index b91a7e7053..9cb74b004d 100644 --- a/package.json +++ b/package.json @@ -75,8 +75,7 @@ "multiformats": "^9.4.7", "mysql2": "^2.3.3", "n3": "^1.12.2", - "nodemon": "^2.0.15", - "ot-telemetry-collector": "^1.0.2", + "ot-telemetry-collector": "^1.0.3", "p-iteration": "^1.1.8", "peer-id": "^0.15.3", "pino": "^7.5.1", From 5332ad2f523c592e42c115c9b34b77cc3980f868 Mon Sep 17 00:00:00 2001 From: zeroxbt Date: Thu, 10 Feb 2022 16:20:49 +0100 Subject: [PATCH 39/50] make installer work with any graphdb version --- installer/data/graphdb.service | 6 +++--- installer/installer.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/installer/data/graphdb.service b/installer/data/graphdb.service index 2a3b25dcad..9877a621b4 100755 --- a/installer/data/graphdb.service +++ b/installer/data/graphdb.service @@ -2,14 +2,14 @@ [Unit] Description=GraphDB - OriginTrail V6 Stage 1 Beta Node -Documentation=https://github.com/OriginTrail/ot-node/tree/v6/release%2Ftestnet +Documentation=https://github.com/OriginTrail/ot-node After=network.target [Service] Type=simple User=root -WorkingDirectory=/root/graphdb-free-9.10.1/bin/ -ExecStart=/root/graphdb-free-9.10.1/bin/graphdb +WorkingDirectory=/root/$(ls /root | grep graphdb-free | grep -v .zip)/bin/ +ExecStart=/root/$(ls /root | grep graphdb-free | grep -v .zip)/bin/graphdb Restart=on-failure [Install] diff --git a/installer/installer.sh b/installer/installer.sh index 57bc3b2ebe..d654f92285 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -1,7 +1,7 @@ #!/bin/bash OS_VERSION=$(lsb_release -sr) -GRAPHDB_FILE="/root/graphdb-free-9.10.1-dist.zip" +GRAPHDB_FILE=$(ls /root | grep graphdb-free | grep .zip) OTNODE_DIR="/root/ot-node" N1=$'\n' GREEN='\033[0;32m' @@ -423,4 +423,4 @@ echo -n "Logs will be displayed. Press ctrl+c to exit the logs. The node WILL st echo " " read -p "Press enter to continue..." -journalctl -u otnode -f +journalctl -u otnode --output cat -fn 100 From c5ae730f2954d47345d1dfb2e59c851a83032d84 Mon Sep 17 00:00:00 2001 From: zeroxbt Date: Thu, 10 Feb 2022 16:52:04 +0100 Subject: [PATCH 40/50] removed os check --- installer/installer.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/installer/installer.sh b/installer/installer.sh index d654f92285..e68f11bf0e 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -10,15 +10,7 @@ NC='\033[0m' # No Color clear -echo -n "${N1}Checking that the OS is Ubuntu 20.04 or newer: " - -if [[ $OS_VERSION != 20.04 ]] || [[ $OS_VERSION != 21.04 ]] || [[ $OS_VERSION != 21.10 ]]; then - echo -e "${RED}FAILED${NC}" - echo "This installer requires Ubuntu 20.04 or newer. Destroy this VPS and remake using Ubuntu 20.04 or newer." - exit 1 -else - echo -e "${GREEN}SUCCESS${NC}" -fi +cd /root/ot-node echo -n "Checking that we are in /root directory: " From 1b561f434ccc17054d2745c325dfe016f510c431 Mon Sep 17 00:00:00 2001 From: zeroxbt <89495162+zeroxbt@users.noreply.github.com> Date: Thu, 10 Feb 2022 17:09:17 +0100 Subject: [PATCH 41/50] small fix --- installer/installer.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/installer/installer.sh b/installer/installer.sh index e68f11bf0e..4170553401 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -10,17 +10,7 @@ NC='\033[0m' # No Color clear -cd /root/ot-node - -echo -n "Checking that we are in /root directory: " - -if [ $PWD != "$OTNODE_DIR" ]; then - echo -e "${RED}FAILED${NC}" - echo "${N1}This installer requires the user to be logged in as root (NOT a regular user using sudo) and in the root directory. Npm install will fail if using sudo.${N1}" - exit -else - echo -e "${GREEN}SUCCESS${NC}" -fi +cd /root echo -n "Checking that the GraphDB file is present in /root: " From 932deee9b3109362e8993c9182d9cdf101627c4a Mon Sep 17 00:00:00 2001 From: zeroxbt <89495162+zeroxbt@users.noreply.github.com> Date: Thu, 10 Feb 2022 17:17:39 +0100 Subject: [PATCH 42/50] changed graphdb service working and start dir --- installer/data/graphdb.service | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/installer/data/graphdb.service b/installer/data/graphdb.service index 9877a621b4..bd3482c90b 100755 --- a/installer/data/graphdb.service +++ b/installer/data/graphdb.service @@ -8,9 +8,9 @@ After=network.target [Service] Type=simple User=root -WorkingDirectory=/root/$(ls /root | grep graphdb-free | grep -v .zip)/bin/ -ExecStart=/root/$(ls /root | grep graphdb-free | grep -v .zip)/bin/graphdb +WorkingDirectory=/root/graphdb-free-9.10.1/bin/ +ExecStart=/root/graphdb-free-9.10.1/bin/graphdb Restart=on-failure [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target From 6c112b5bdae80f18513da091c0ad405c37a51794 Mon Sep 17 00:00:00 2001 From: zeroxbt Date: Fri, 11 Feb 2022 10:01:41 +0100 Subject: [PATCH 43/50] removed versioning from rpc URIs --- modules/controller/rpc-controller.js | 20 ++++++++-------- postman/DKGv6.postman_collection.json | 34 +++++++++++++-------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/modules/controller/rpc-controller.js b/modules/controller/rpc-controller.js index 7ef7b02a6f..c18fac2b20 100644 --- a/modules/controller/rpc-controller.js +++ b/modules/controller/rpc-controller.js @@ -142,13 +142,13 @@ class RpcController { initializeServiceApi() { this.logger.info(`Service API module enabled, server running on port ${this.config.rpcPort}`); - this.app.post('/api/latest/publish', async (req, res, next) => { + this.app.post('/publish', async (req, res, next) => { await this.publish(req, res, next, {isAsset: false}); }); - this.app.post('/api/latest/provision', async (req, res, next) => { + this.app.post('/provision', async (req, res, next) => { await this.publish(req, res, next, {isAsset: true, ual: null}); }); - this.app.post('/api/latest/update', async (req, res, next) => { + this.app.post('/update', async (req, res, next) => { if (!req.body.ual) { return next({ code: 400, @@ -158,7 +158,7 @@ class RpcController { await this.publish(req, res, next, {isAsset: true, ual: req.body.ual}); }); - this.app.get('/api/latest/resolve', async (req, res, next) => { + this.app.get('/resolve', async (req, res, next) => { if (!req.query.ids) { return next({code: 400, message: 'Param ids is required.'}); } @@ -282,7 +282,7 @@ class RpcController { } }); - this.app.get('/api/latest/assertions::search', async (req, res, next) => { + this.app.get('/assertions::search', async (req, res, next) => { if (!req.query.query || req.params.search !== 'search') { return next({code: 400, message: 'Params query is necessary.'}); } @@ -367,7 +367,7 @@ class RpcController { } }); - this.app.get('/api/latest/entities::search', async (req, res, next) => { + this.app.get('/entities::search', async (req, res, next) => { if (!req.query.query || req.params.search !== 'search') { return next({code: 400, message: 'Params query or ids are necessary.'}); } @@ -468,7 +468,7 @@ class RpcController { } }); - this.app.post('/api/latest/query', async (req, res, next) => { + this.app.post('/query', async (req, res, next) => { if (!req.body.query || !req.query.type) { return next({code: 400, message: 'Params query and type are necessary.'}); } @@ -533,7 +533,7 @@ class RpcController { } }); - this.app.post('/api/latest/proofs::get', async (req, res, next) => { + this.app.post('/proofs::get', async (req, res, next) => { if (!req.body.nquads) { return next({code: 400, message: 'Params query and type are necessary.'}); } @@ -607,7 +607,7 @@ class RpcController { } }); - this.app.get('/api/latest/:operation/result/:handler_id', async (req, res, next) => { + this.app.get('/:operation/result/:handler_id', async (req, res, next) => { if (!['provision', 'update', 'publish', 'resolve', 'query', 'entities:search', 'assertions:search', 'proofs:get'].includes(req.params.operation)) { return next({ code: 400, @@ -732,7 +732,7 @@ class RpcController { } }); - this.app.get('/api/latest/info', async (req, res, next) => { + this.app.get('/info', async (req, res, next) => { try { let version = pjson.version; diff --git a/postman/DKGv6.postman_collection.json b/postman/DKGv6.postman_collection.json index d94c2cc761..e062f6fa88 100644 --- a/postman/DKGv6.postman_collection.json +++ b/postman/DKGv6.postman_collection.json @@ -37,7 +37,7 @@ ] }, "url": { - "raw": "{{HOST}}:8900/api/latest/provision", + "raw": "{{HOST}}:8900/provision", "host": [ "{{HOST}}" ], @@ -83,7 +83,7 @@ ] }, "url": { - "raw": "{{HOST}}:8900/api/latest/provision/result/940e2924-524e-4ed0-8379-503c5504552a", + "raw": "{{HOST}}:8900/provision/result/940e2924-524e-4ed0-8379-503c5504552a", "host": [ "{{HOST}}" ], @@ -133,7 +133,7 @@ ] }, "url": { - "raw": "{{HOST}}:8900/api/latest/update", + "raw": "{{HOST}}:8900/update", "host": [ "{{HOST}}" ], @@ -179,7 +179,7 @@ ] }, "url": { - "raw": "{{HOST}}:8900/api/latest/provision/result/36f9c131-130f-4d41-86e4-7cc6781bb51c", + "raw": "{{HOST}}:8900/provision/result/36f9c131-130f-4d41-86e4-7cc6781bb51c", "host": [ "{{HOST}}" ], @@ -229,7 +229,7 @@ ] }, "url": { - "raw": "{{HOST}}:8900/api/latest/publish", + "raw": "{{HOST}}:8900/publish", "host": [ "{{HOST}}" ], @@ -256,7 +256,7 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}:8900/api/latest/provision/result/c6c3b9af-0f3c-4324-b5bf-0181d49baa04", + "raw": "{{HOST}}:8900/provision/result/c6c3b9af-0f3c-4324-b5bf-0181d49baa04", "host": [ "{{HOST}}" ], @@ -299,7 +299,7 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}:8900/api/latest/resolve?ids=c37c86b59ba64ab269850860621b634feaab9f500a73ef5620000b8b55dcb29a&load=true", + "raw": "{{HOST}}:8900/resolve?ids=c37c86b59ba64ab269850860621b634feaab9f500a73ef5620000b8b55dcb29a&load=true", "host": [ "{{HOST}}" ], @@ -336,7 +336,7 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}:8900/api/latest/resolve/result/22419c1a-d41d-4235-9849-e7e1a22edf4f", + "raw": "{{HOST}}:8900/resolve/result/22419c1a-d41d-4235-9849-e7e1a22edf4f", "host": [ "{{HOST}}" ], @@ -384,7 +384,7 @@ ] }, "url": { - "raw": "{{HOST}}:8900/api/latest/assertions:search?query=scientist", + "raw": "{{HOST}}:8900/assertions:search?query=scientist", "host": [ "{{HOST}}" ], @@ -446,7 +446,7 @@ ] }, "url": { - "raw": "{{HOST}}:8900/api/latest/assertions:search/result/ccf90eba-4a45-4c47-81e0-1a2e1e679f70", + "raw": "{{HOST}}:8900/assertions:search/result/ccf90eba-4a45-4c47-81e0-1a2e1e679f70", "host": [ "{{HOST}}" ], @@ -494,7 +494,7 @@ ] }, "url": { - "raw": "{{HOST}}:8900/api/latest/entities:search?query=feynman", + "raw": "{{HOST}}:8900/entities:search?query=feynman", "host": [ "{{HOST}}" ], @@ -552,7 +552,7 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}:8900/api/latest/entities:search/result/b18a819d-d546-4bc2-95c1-242d78c094e7", + "raw": "{{HOST}}:8900/entities:search/result/b18a819d-d546-4bc2-95c1-242d78c094e7", "host": [ "{{HOST}}" ], @@ -584,7 +584,7 @@ ] }, "url": { - "raw": "{{HOST}}:8900/api/latest/query?type=construct", + "raw": "{{HOST}}:8900/query?type=construct", "host": [ "{{HOST}}" ], @@ -617,7 +617,7 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}:8900/api/latest/query/result/d3480867-d5f7-4f10-9686-8c658c102dcf", + "raw": "{{HOST}}:8900/query/result/d3480867-d5f7-4f10-9686-8c658c102dcf", "host": [ "{{HOST}}" ], @@ -649,7 +649,7 @@ ] }, "url": { - "raw": "{{HOST}}:8900/api/latest/proofs:get", + "raw": "{{HOST}}:8900/proofs:get", "host": [ "{{HOST}}" ], @@ -676,7 +676,7 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}:8900/api/latest/proofs:get/result/72d7c0b3-a41e-4f90-91d5-082579f25b65", + "raw": "{{HOST}}:8900/proofs:get/result/72d7c0b3-a41e-4f90-91d5-082579f25b65", "host": [ "{{HOST}}" ], @@ -705,7 +705,7 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}:8900/api/latest/info", + "raw": "{{HOST}}:8900/info", "host": [ "{{HOST}}" ], From c80c9354a5a63224bba7310464ced7f488b0348e Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Fri, 11 Feb 2022 10:08:17 +0100 Subject: [PATCH 44/50] first commit --- build/contracts/DKGcontract.json | 4065 +++-- build/contracts/Migrations.json | 10 +- build/contracts/OwnershipManager.json | 336 + build/contracts/UAIRegistry.json | 12966 ++++++++++++++++ config/config.json | 8 +- external/merkle-validation-service.js | 1 + external/web3-blockchain-service.js | 75 +- .../command/publish/send-assertion-command.js | 2 +- .../command/publish/submit-proofs-command.js | 19 +- modules/controller/rpc-controller.js | 23 +- modules/service/blockchain-service.js | 18 +- modules/service/data-service.js | 55 +- modules/service/publish-service.js | 5 +- modules/service/query-service.js | 4 +- 14 files changed, 15317 insertions(+), 2270 deletions(-) create mode 100644 build/contracts/OwnershipManager.json create mode 100644 build/contracts/UAIRegistry.json diff --git a/build/contracts/DKGcontract.json b/build/contracts/DKGcontract.json index 84af5322ad..7645328077 100644 --- a/build/contracts/DKGcontract.json +++ b/build/contracts/DKGcontract.json @@ -366,65 +366,82 @@ "constant": true } ], - "metadata": "{\"compiler\":{\"version\":\"0.6.10+commit.00c0fcaf\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token_address\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assertionIssuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assertionTimeToLive\",\"type\":\"uint256\"}],\"name\":\"AssertionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenAddressSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensCollected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationFailed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"TRAC_TOKEN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assertionTimeToLive\",\"type\":\"uint256\"}],\"name\":\"createAssertionRecord\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionIssuer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionNumberOfEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionRootHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"name\":\"getAssertionTask\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"task\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionTimeToLive\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timeToLive\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"epochAssertionProof\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"epochNumber\",\"type\":\"uint256\"}],\"name\":\"submitHoldingProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"epochAssertionProof\",\"type\":\"bytes32\"}],\"name\":\"verifyAssertionProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"proofValid\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"project:/contracts/DKGcontract.sol\":\"DKGcontract\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/access/Ownable.sol\":{\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://90faf5851c02f9bd42c5bfb54d4f0421a2612f50ab80b2c4fa24fa3792071cc2\",\"dweb:/ipfs/QmRGM4F2PcGVF85aTfaA9YBhCHHDqrMhRjyp6fGeBTtirb\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"openzeppelin-solidity/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"project:/contracts/DKGcontract.sol\":{\"keccak256\":\"0xfa24b77f960260a7c18ffaa7baad79dd0445e41dad18b362c426fac931181f79\",\"urls\":[\"bzz-raw://a93e453a11a03c2e599a5ed89c37b4a20d62ec8bed33765c8f5fde0cb7912922\",\"dweb:/ipfs/QmSPqJ2bsC7vKfv292LBWU9otbuT9EacCAYboWBEKQBFUW\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516110673803806110678339818101604052602081101561003357600080fd5b810190808051906020019092919050505060006100546101f760201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561012c57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fd82cad5fdc98633445b90f806f2e1a61a5409f92187ee9cd87f1da18c906926660405160405180910390a2506101ff565b600033905090565b610e598061020e6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80638da5cb5b116100715780638da5cb5b1461025b5780638f9cd32b146102a55780639e50e72c146102ef578063b934b4e414610331578063ce64c64314610373578063f2fde38b146103b5576100b4565b80630828e9f3146100b957806308c4933b14610127578063193f9c7e146101735780636988bc03146101c3578063715018a61461020557806373a773891461020f575b600080fd5b6100e5600480360360208110156100cf57600080fd5b81019080803590602001909291905050506103f9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61015d6004803603604081101561013d57600080fd5b810190808035906020019092919080359060200190929190505050610436565b6040518082815260200191505060405180910390f35b6101a96004803603604081101561018957600080fd5b810190808035906020019092919080359060200190929190505050610441565b604051808215151515815260200191505060405180910390f35b6101ef600480360360208110156101d957600080fd5b810190808035906020019092919050505061044d565b6040518082815260200191505060405180910390f35b61020d61046d565b005b6102596004803603608081101561022557600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803590602001909291905050506105db565b005b61026361097e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102ad6109a7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61031b6004803603602081101561030557600080fd5b81019080803590602001909291905050506109cd565b6040518082815260200191505060405180910390f35b61035d6004803603602081101561034757600080fd5b81019080803590602001909291905050506109ed565b6040518082815260200191505060405180910390f35b6103b36004803603606081101561038957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610a0d565b005b6103f7600480360360208110156103cb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b92565b005b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600043905092915050565b60006001905092915050565b600060036000838152602001908152602001600020600001549050919050565b610475610d85565b73ffffffffffffffffffffffffffffffffffffffff1661049361097e565b73ffffffffffffffffffffffffffffffffffffffff161461051c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000801b841415610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b8314156106cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f726f6f744861736820686173682063616e6e6f74206265207a65726f0000000081525060200191505060405180910390fd5b6000821415610727576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610e026022913960400191505060405180910390fd5b6000811415610781576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610d8e6027913960400191505060405180910390fd5b600060036000868152602001908152602001600020600201541461080d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f417373657274696f6e20616c726561647920657869737473210000000000000081525060200191505060405180910390fd5b816003600086815260200190815260200160002060010181905550806003600086815260200190815260200160002060000181905550426003600086815260200190815260200160002060020181905550826003600086815260200190815260200160002060040181905550336003600086815260200190815260200160002060030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550336004600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff1683857f25e2604032d2f5a218a9bed084fc10fd98b83e3b86a79ba39c214095984250168585604051808381526020018281526020019250505060405180910390a450505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000838152602001908152602001600020600101549050919050565b600060036000838152602001908152602001600020600401549050919050565b6000801b831415610a86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b821415610ae2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610ddb6027913960400191505060405180910390fd5b610aec8383610441565b15610b4757803373ffffffffffffffffffffffffffffffffffffffff16847fce001fcd900079c312eaa96f5c1c389ffe207eb41e90197f5a011668b58ef598607b6040518082815260200191505060405180910390a4610b8d565b803373ffffffffffffffffffffffffffffffffffffffff16847f37d4188105d31e43e2177257c4e9cc2c8eda5c0783943eb00abe942ac687b03a60405160405180910390a45b505050565b610b9a610d85565b73ffffffffffffffffffffffffffffffffffffffff16610bb861097e565b73ffffffffffffffffffffffffffffffffffffffff1614610c41576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610cc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610db56026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737365706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726fa2646970667358221220d151e176ae4d67c504e535c636330af1f8b3721ef6dd169fa6e164193c3cb83164736f6c634300060a0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80638da5cb5b116100715780638da5cb5b1461025b5780638f9cd32b146102a55780639e50e72c146102ef578063b934b4e414610331578063ce64c64314610373578063f2fde38b146103b5576100b4565b80630828e9f3146100b957806308c4933b14610127578063193f9c7e146101735780636988bc03146101c3578063715018a61461020557806373a773891461020f575b600080fd5b6100e5600480360360208110156100cf57600080fd5b81019080803590602001909291905050506103f9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61015d6004803603604081101561013d57600080fd5b810190808035906020019092919080359060200190929190505050610436565b6040518082815260200191505060405180910390f35b6101a96004803603604081101561018957600080fd5b810190808035906020019092919080359060200190929190505050610441565b604051808215151515815260200191505060405180910390f35b6101ef600480360360208110156101d957600080fd5b810190808035906020019092919050505061044d565b6040518082815260200191505060405180910390f35b61020d61046d565b005b6102596004803603608081101561022557600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803590602001909291905050506105db565b005b61026361097e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102ad6109a7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61031b6004803603602081101561030557600080fd5b81019080803590602001909291905050506109cd565b6040518082815260200191505060405180910390f35b61035d6004803603602081101561034757600080fd5b81019080803590602001909291905050506109ed565b6040518082815260200191505060405180910390f35b6103b36004803603606081101561038957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610a0d565b005b6103f7600480360360208110156103cb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b92565b005b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600043905092915050565b60006001905092915050565b600060036000838152602001908152602001600020600001549050919050565b610475610d85565b73ffffffffffffffffffffffffffffffffffffffff1661049361097e565b73ffffffffffffffffffffffffffffffffffffffff161461051c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000801b841415610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b8314156106cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f726f6f744861736820686173682063616e6e6f74206265207a65726f0000000081525060200191505060405180910390fd5b6000821415610727576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610e026022913960400191505060405180910390fd5b6000811415610781576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610d8e6027913960400191505060405180910390fd5b600060036000868152602001908152602001600020600201541461080d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f417373657274696f6e20616c726561647920657869737473210000000000000081525060200191505060405180910390fd5b816003600086815260200190815260200160002060010181905550806003600086815260200190815260200160002060000181905550426003600086815260200190815260200160002060020181905550826003600086815260200190815260200160002060040181905550336003600086815260200190815260200160002060030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550336004600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff1683857f25e2604032d2f5a218a9bed084fc10fd98b83e3b86a79ba39c214095984250168585604051808381526020018281526020019250505060405180910390a450505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000838152602001908152602001600020600101549050919050565b600060036000838152602001908152602001600020600401549050919050565b6000801b831415610a86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b821415610ae2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610ddb6027913960400191505060405180910390fd5b610aec8383610441565b15610b4757803373ffffffffffffffffffffffffffffffffffffffff16847fce001fcd900079c312eaa96f5c1c389ffe207eb41e90197f5a011668b58ef598607b6040518082815260200191505060405180910390a4610b8d565b803373ffffffffffffffffffffffffffffffffffffffff16847f37d4188105d31e43e2177257c4e9cc2c8eda5c0783943eb00abe942ac687b03a60405160405180910390a45b505050565b610b9a610d85565b73ffffffffffffffffffffffffffffffffffffffff16610bb861097e565b73ffffffffffffffffffffffffffffffffffffffff1614610c41576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610cc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610db56026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737365706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726fa2646970667358221220d151e176ae4d67c504e535c636330af1f8b3721ef6dd169fa6e164193c3cb83164736f6c634300060a0033", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token_address\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assertionIssuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assertionTimeToLive\",\"type\":\"uint256\"}],\"name\":\"AssertionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenAddressSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensCollected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationFailed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"TRAC_TOKEN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assertionTimeToLive\",\"type\":\"uint256\"}],\"name\":\"createAssertionRecord\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionIssuer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionNumberOfEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionRootHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"name\":\"getAssertionTask\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"task\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionTimeToLive\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timeToLive\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"epochAssertionProof\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"epochNumber\",\"type\":\"uint256\"}],\"name\":\"submitHoldingProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"epochAssertionProof\",\"type\":\"bytes32\"}],\"name\":\"verifyAssertionProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"proofValid\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/DKGcontract.sol\":\"DKGcontract\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/access/Ownable.sol\":{\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://90faf5851c02f9bd42c5bfb54d4f0421a2612f50ab80b2c4fa24fa3792071cc2\",\"dweb:/ipfs/QmRGM4F2PcGVF85aTfaA9YBhCHHDqrMhRjyp6fGeBTtirb\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"openzeppelin-solidity/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"project:/contracts/DKGcontract.sol\":{\"keccak256\":\"0xbcf9626ce20959efd101eb22aa1e3baf00e0f3174ea883e38e4fd60c09ce0b04\",\"urls\":[\"bzz-raw://d362a7308bfcdb308316868e5c31e43a38ea2f004523f0b32d4dbc44787d40ea\",\"dweb:/ipfs/QmbwTjuMNtaQRKKDzeK41EQmf1gChTso1dnGeYBrrfwVKF\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516110213803806110218339818101604052602081101561003357600080fd5b810190808051906020019092919050505060006100546101f760201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561012c57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fd82cad5fdc98633445b90f806f2e1a61a5409f92187ee9cd87f1da18c906926660405160405180910390a2506101ff565b600033905090565b610e138061020e6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80638da5cb5b116100715780638da5cb5b146102435780638f9cd32b146102775780639e50e72c146102ab578063b934b4e4146102ed578063ce64c6431461032f578063f2fde38b14610371576100b4565b80630828e9f3146100b957806308c4933b14610111578063193f9c7e1461015d5780636988bc03146101ab578063715018a6146101ed57806373a77389146101f7575b600080fd5b6100e5600480360360208110156100cf57600080fd5b81019080803590602001909291905050506103b5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101476004803603604081101561012757600080fd5b8101908080359060200190929190803590602001909291905050506103f2565b6040518082815260200191505060405180910390f35b6101936004803603604081101561017357600080fd5b8101908080359060200190929190803590602001909291905050506103fd565b60405180821515815260200191505060405180910390f35b6101d7600480360360208110156101c157600080fd5b8101908080359060200190929190505050610409565b6040518082815260200191505060405180910390f35b6101f5610429565b005b6102416004803603608081101561020d57600080fd5b8101908080359060200190929190803590602001909291908035906020019092919080359060200190929190505050610596565b005b61024b610939565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61027f610962565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102d7600480360360208110156102c157600080fd5b8101908080359060200190929190505050610988565b6040518082815260200191505060405180910390f35b6103196004803603602081101561030357600080fd5b81019080803590602001909291905050506109a8565b6040518082815260200191505060405180910390f35b61036f6004803603606081101561034557600080fd5b810190808035906020019092919080359060200190929190803590602001909291905050506109c8565b005b6103b36004803603602081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b4d565b005b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600043905092915050565b60006001905092915050565b600060036000838152602001908152602001600020600001549050919050565b610431610d3f565b73ffffffffffffffffffffffffffffffffffffffff1661044f610939565b73ffffffffffffffffffffffffffffffffffffffff16146104d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000801b84141561060f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b831415610688576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f726f6f744861736820686173682063616e6e6f74206265207a65726f0000000081525060200191505060405180910390fd5b60008214156106e2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610dbc6022913960400191505060405180910390fd5b600081141561073c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610d486027913960400191505060405180910390fd5b60006003600086815260200190815260200160002060020154146107c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f417373657274696f6e20616c726561647920657869737473210000000000000081525060200191505060405180910390fd5b816003600086815260200190815260200160002060010181905550806003600086815260200190815260200160002060000181905550426003600086815260200190815260200160002060020181905550826003600086815260200190815260200160002060040181905550336003600086815260200190815260200160002060030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550336004600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff1683857f25e2604032d2f5a218a9bed084fc10fd98b83e3b86a79ba39c214095984250168585604051808381526020018281526020019250505060405180910390a450505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000838152602001908152602001600020600101549050919050565b600060036000838152602001908152602001600020600401549050919050565b6000801b831415610a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b821415610a9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610d956027913960400191505060405180910390fd5b610aa783836103fd565b15610b0257803373ffffffffffffffffffffffffffffffffffffffff16847fce001fcd900079c312eaa96f5c1c389ffe207eb41e90197f5a011668b58ef598607b6040518082815260200191505060405180910390a4610b48565b803373ffffffffffffffffffffffffffffffffffffffff16847f37d4188105d31e43e2177257c4e9cc2c8eda5c0783943eb00abe942ac687b03a60405160405180910390a45b505050565b610b55610d3f565b73ffffffffffffffffffffffffffffffffffffffff16610b73610939565b73ffffffffffffffffffffffffffffffffffffffff1614610bfc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610d6f6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737365706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726fa2646970667358221220e9906c02530535e52f51357b5e50a4b090c7f3d6115a48819444a950a43b31cc64736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80638da5cb5b116100715780638da5cb5b146102435780638f9cd32b146102775780639e50e72c146102ab578063b934b4e4146102ed578063ce64c6431461032f578063f2fde38b14610371576100b4565b80630828e9f3146100b957806308c4933b14610111578063193f9c7e1461015d5780636988bc03146101ab578063715018a6146101ed57806373a77389146101f7575b600080fd5b6100e5600480360360208110156100cf57600080fd5b81019080803590602001909291905050506103b5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101476004803603604081101561012757600080fd5b8101908080359060200190929190803590602001909291905050506103f2565b6040518082815260200191505060405180910390f35b6101936004803603604081101561017357600080fd5b8101908080359060200190929190803590602001909291905050506103fd565b60405180821515815260200191505060405180910390f35b6101d7600480360360208110156101c157600080fd5b8101908080359060200190929190505050610409565b6040518082815260200191505060405180910390f35b6101f5610429565b005b6102416004803603608081101561020d57600080fd5b8101908080359060200190929190803590602001909291908035906020019092919080359060200190929190505050610596565b005b61024b610939565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61027f610962565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102d7600480360360208110156102c157600080fd5b8101908080359060200190929190505050610988565b6040518082815260200191505060405180910390f35b6103196004803603602081101561030357600080fd5b81019080803590602001909291905050506109a8565b6040518082815260200191505060405180910390f35b61036f6004803603606081101561034557600080fd5b810190808035906020019092919080359060200190929190803590602001909291905050506109c8565b005b6103b36004803603602081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b4d565b005b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600043905092915050565b60006001905092915050565b600060036000838152602001908152602001600020600001549050919050565b610431610d3f565b73ffffffffffffffffffffffffffffffffffffffff1661044f610939565b73ffffffffffffffffffffffffffffffffffffffff16146104d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000801b84141561060f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b831415610688576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f726f6f744861736820686173682063616e6e6f74206265207a65726f0000000081525060200191505060405180910390fd5b60008214156106e2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610dbc6022913960400191505060405180910390fd5b600081141561073c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610d486027913960400191505060405180910390fd5b60006003600086815260200190815260200160002060020154146107c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f417373657274696f6e20616c726561647920657869737473210000000000000081525060200191505060405180910390fd5b816003600086815260200190815260200160002060010181905550806003600086815260200190815260200160002060000181905550426003600086815260200190815260200160002060020181905550826003600086815260200190815260200160002060040181905550336003600086815260200190815260200160002060030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550336004600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff1683857f25e2604032d2f5a218a9bed084fc10fd98b83e3b86a79ba39c214095984250168585604051808381526020018281526020019250505060405180910390a450505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000838152602001908152602001600020600101549050919050565b600060036000838152602001908152602001600020600401549050919050565b6000801b831415610a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b821415610a9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610d956027913960400191505060405180910390fd5b610aa783836103fd565b15610b0257803373ffffffffffffffffffffffffffffffffffffffff16847fce001fcd900079c312eaa96f5c1c389ffe207eb41e90197f5a011668b58ef598607b6040518082815260200191505060405180910390a4610b48565b803373ffffffffffffffffffffffffffffffffffffffff16847f37d4188105d31e43e2177257c4e9cc2c8eda5c0783943eb00abe942ac687b03a60405160405180910390a45b505050565b610b55610d3f565b73ffffffffffffffffffffffffffffffffffffffff16610b73610939565b73ffffffffffffffffffffffffffffffffffffffff1614610bfc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610d6f6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737365706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726fa2646970667358221220e9906c02530535e52f51357b5e50a4b090c7f3d6115a48819444a950a43b31cc64736f6c63430007060033", "immutableReferences": {}, - "sourceMap": "278:3619:4:-:0;;;1347:199;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;884:17:0;904:12;:10;;;:12;;:::i;:::-;884:32;;935:9;926:6;;:18;;;;;;;;;;;;;;;;;;992:9;959:43;;988:1;959:43;;;;;;;;;;;;850:159;1425:1:4;1402:25;;:13;:25;;;;1394:34;;;;;;1447:13;1432:5;;:29;;;;;;;;;;;;;;;;;;1486:13;1465:18;;:34;;;;;;;;;;;;;;;;;;1527:13;1511:30;;;;;;;;;;;;1347:199;278:3619;;598:104:3;651:15;685:10;678:17;;598:104;:::o;278:3619:4:-;;;;;;;", - "deployedSourceMap": "278:3619:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3177:129;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3771:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3038:134;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3451:156;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1717:145:0;;;:::i;:::-;;1559:990:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1085:85:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;360:33:4;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3609:159;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3308:141;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2564:469;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2011:240:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3177:129:4;3247:15;3274;:28;3290:11;3274:28;;;;;;;;;;;;;;;;;;;;;3267:35;;3177:129;;;:::o;3771:123::-;3854:12;3878;3871:19;;3771:123;;;;:::o;3038:134::-;3136:15;3163:4;3156:11;;3038:134;;;;:::o;3451:156::-;3525:18;3555:15;:28;3571:11;3555:28;;;;;;;;;;;:48;;;3548:55;;3451:156;;;:::o;1717:145:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1823:1:::1;1786:40;;1807:6;::::0;::::1;;;;;;;;;1786:40;;;;;;;;;;;;1853:1;1836:6:::0;::::1;:19;;;;;;;;;;;;;;;;;;1717:145::o:0;1559:990:4:-;1716:1;1701:16;;:11;:16;;1693:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1777:1;1765:13;;:8;:13;;1757:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1841:1;1823:14;:19;;1815:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1916:1;1893:19;:24;;1885:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2016:1;1973:15;:28;1989:11;1973:28;;;;;;;;;;;:41;;;:44;1965:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2151:14;2105:15;:28;2121:11;2105:28;;;;;;;;;;;:43;;:60;;;;2220:19;2169:15;:28;2185:11;2169:28;;;;;;;;;;;:48;;:70;;;;2287:15;2243;:28;2259:11;2243:28;;;;;;;;;;;:41;;:59;;;;2346:8;2306:15;:28;2322:11;2306:28;;;;;;;;;;;:37;;:48;;;;2396:10;2358:15;:28;2374:11;2358:28;;;;;;;;;;;:35;;;:48;;;;;;;;;;;;;;;;;;2441:10;2410:15;:28;2426:11;2410:28;;;;;;;;;;;;:41;;;;;;;;;;;;;;;;;;2499:10;2461:84;;2490:8;2478:11;2461:84;2510:14;2525:19;2461:84;;;;;;;;;;;;;;;;;;;;;;;;1559:990;;;;:::o;1085:85:0:-;1131:7;1157:6;;;;;;;;;;;1150:13;;1085:85;:::o;360:33:4:-;;;;;;;;;;;;;:::o;3609:159::-;3687:22;3721:15;:28;3737:11;3721:28;;;;;;;;;;;:43;;;3714:50;;3609:159;;;:::o;3308:141::-;3380:16;3408:15;:28;3424:11;3408:28;;;;;;;;;;;:37;;;3401:44;;3308:141;;;:::o;2564:469::-;2699:1;2684:16;;:11;:16;;2676:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2771:1;2748:24;;:19;:24;;2740:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2825:54;2846:11;2859:19;2825:20;:54::i;:::-;2821:208;;;2929:11;2918:10;2890:56;;2906:11;2890:56;2942:3;2890:56;;;;;;;;;;;;;;;;;;2821:208;;;3011:11;3000:10;2969:54;;2988:11;2969:54;;;;;;;;;;2821:208;2564:469;;;:::o;2011:240:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2119:1:::1;2099:22;;:8;:22;;;;2091:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2208:8;2179:38;;2200:6;::::0;::::1;;;;;;;;;2179:38;;;;;;;;;;;;2236:8;2227:6;::::0;:17:::1;;;;;;;;;;;;;;;;;;2011:240:::0;:::o;598:104:3:-;651:15;685:10;678:17;;598:104;:::o", - "source": "pragma solidity 0.6.10;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/access/Ownable.sol\";\n\n\n// mock contract for now, we will add the hub and the rest later\ncontract DKGcontract is Ownable {\n\n\n\tusing SafeMath for uint256;\n\tIERC20 token;\n\n\taddress public TRAC_TOKEN_ADDRESS;\n\n\tstruct AssertionRecord{\n\t\t// bytes32 assertionID; // hash (multihash) of the assertion\n\t\tuint256 assertionTimeToLive;\n\t\tuint256 numberOfEpochs;\n\t\tuint256 creationTime;\n\t\taddress issuer;\n\t\tbytes32 rootHash;\n\t\tbytes32 data; // for extensibility\n\t\t// TODO: include Token management\n\t}\n\n\tmapping(bytes32 => AssertionRecord) internal assertionRecord; // assertionRecord[assertionID] , formerly offer[offerID]\n\tmapping(bytes32 => address) internal assertionIssuer; // mapping assertionID -> assertionIssuer\n\n\n\t// events\n\tevent TokenAddressSet(address indexed token);\n\tevent AssertionCreated(bytes32 indexed assertionID, bytes32 indexed rootHash, address indexed assertionIssuer, uint256 numberOfEpochs, uint256 assertionTimeToLive);\n\tevent TokensCollected(bytes32 indexed assertionID, address indexed prover, uint256 indexed epoch, uint256 amount);\n\tevent VerificationFailed(bytes32 indexed assertionID, address indexed prover, uint256 indexed epoch);\n\n\n\n\tconstructor(address token_address) public {\n\t\trequire(token_address!=address(0));\n\t\ttoken = IERC20(token_address);\n\t\tTRAC_TOKEN_ADDRESS = token_address;\n\t\t\n\t\temit TokenAddressSet(token_address);\n\n\t}\n\n\t/* DC */\n\tfunction createAssertionRecord(bytes32 assertionID, bytes32 rootHash, uint256 numberOfEpochs, uint256 assertionTimeToLive) public {\n\t\trequire(assertionID != 0, \"assertionID hash cannot be zero\");\n\t\trequire(rootHash != 0, \"rootHash hash cannot be zero\");\n\t\trequire(numberOfEpochs != 0, \"numberOfEpochs hash cannot be zero\");\n\t\trequire(assertionTimeToLive != 0, \"assertionTimeToLive hash cannot be zero\");\n\t\trequire(assertionRecord[assertionID].creationTime==0, \"Assertion already exists!\");\n\n\t\t// transfer token to contract here (next version)\n\n\t\tassertionRecord[assertionID].numberOfEpochs = numberOfEpochs;\n\t\tassertionRecord[assertionID].assertionTimeToLive = assertionTimeToLive;\n\t\tassertionRecord[assertionID].creationTime = block.timestamp;\n\t\tassertionRecord[assertionID].rootHash = rootHash;\n\t\tassertionRecord[assertionID].issuer = msg.sender;\n\t\tassertionIssuer[assertionID] = msg.sender;\n\n\t\temit AssertionCreated(assertionID,rootHash,msg.sender,numberOfEpochs,assertionTimeToLive);\n\t}\n\n\n\t/* DH */\n\n\tfunction submitHoldingProof(bytes32 assertionID, bytes32 epochAssertionProof, uint256 epochNumber) \n\tpublic {\n\t\trequire(assertionID != 0, \"assertionID hash cannot be zero\");\n\t\trequire(epochAssertionProof != 0, \"epochAssertionProof hash cannot be zero\");\n\n\t\tif (verifyAssertionProof(assertionID, epochAssertionProof)){\n\t\t\temit TokensCollected(assertionID,msg.sender,epochNumber, 123);\n\t\t\t} else {\n\t\t\t\temit VerificationFailed(assertionID,msg.sender,epochNumber);\n\t\t\t}\n\n\t}\n\n\n\n\tfunction verifyAssertionProof(bytes32 assertionID, bytes32 epochAssertionProof) \n\t\tpublic returns(bool proofValid){\n\t\treturn true;\n\n\t}\n\n\n\n\tfunction getAssertionIssuer(bytes32 assertionID)\n\tpublic view returns(address creator){\n\t\treturn assertionIssuer[assertionID];\n\t}\n\tfunction getAssertionRootHash(bytes32 assertionID)\n\tpublic view returns(bytes32 rootHash){\n\t\treturn assertionRecord[assertionID].rootHash;\n\t}\n\tfunction getAssertionTimeToLive(bytes32 assertionID)\n\tpublic view returns(uint256 timeToLive){\n\t\treturn assertionRecord[assertionID].assertionTimeToLive;\n\t}\n\tfunction getAssertionNumberOfEpochs(bytes32 assertionID)\n\tpublic view returns(uint256 numberOfEpochs){\n\t\treturn assertionRecord[assertionID].numberOfEpochs;\n\t}\n\n\tfunction getAssertionTask(bytes32 assertionID, uint256 epoch)\n\tpublic view returns(uint256 task){\n\t\treturn block.number;\n\t}\n\n}", + "generatedSources": [], + "deployedGeneratedSources": [], + "sourceMap": "286:3619:7:-:0;;;1355:199;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;884:17:0;904:12;:10;;;:12;;:::i;:::-;884:32;;935:9;926:6;;:18;;;;;;;;;;;;;;;;;;992:9;959:43;;988:1;959:43;;;;;;;;;;;;850:159;1433:1:7;1410:25;;:13;:25;;;;1402:34;;;;;;1455:13;1440:5;;:29;;;;;;;;;;;;;;;;;;1494:13;1473:18;;:34;;;;;;;;;;;;;;;;;;1535:13;1519:30;;;;;;;;;;;;1355:199;286:3619;;598:104:6;651:15;685:10;678:17;;598:104;:::o;286:3619:7:-;;;;;;;", + "deployedSourceMap": "286:3619:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3185:129;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3779:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3046:134;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3459:156;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1717:145:0;;;:::i;:::-;;1567:990:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1085:85:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;368:33:7;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3617:159;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3316:141;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2572:469;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2011:240:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3185:129:7;3255:15;3282;:28;3298:11;3282:28;;;;;;;;;;;;;;;;;;;;;3275:35;;3185:129;;;:::o;3779:123::-;3862:12;3886;3879:19;;3779:123;;;;:::o;3046:134::-;3144:15;3171:4;3164:11;;3046:134;;;;:::o;3459:156::-;3533:18;3563:15;:28;3579:11;3563:28;;;;;;;;;;;:48;;;3556:55;;3459:156;;;:::o;1717:145:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1823:1:::1;1786:40;;1807:6;::::0;::::1;;;;;;;;1786:40;;;;;;;;;;;;1853:1;1836:6:::0;::::1;:19;;;;;;;;;;;;;;;;;;1717:145::o:0;1567:990:7:-;1724:1;1709:16;;:11;:16;;1701:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1785:1;1773:13;;:8;:13;;1765:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1849:1;1831:14;:19;;1823:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1924:1;1901:19;:24;;1893:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2024:1;1981:15;:28;1997:11;1981:28;;;;;;;;;;;:41;;;:44;1973:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2159:14;2113:15;:28;2129:11;2113:28;;;;;;;;;;;:43;;:60;;;;2228:19;2177:15;:28;2193:11;2177:28;;;;;;;;;;;:48;;:70;;;;2295:15;2251;:28;2267:11;2251:28;;;;;;;;;;;:41;;:59;;;;2354:8;2314:15;:28;2330:11;2314:28;;;;;;;;;;;:37;;:48;;;;2404:10;2366:15;:28;2382:11;2366:28;;;;;;;;;;;:35;;;:48;;;;;;;;;;;;;;;;;;2449:10;2418:15;:28;2434:11;2418:28;;;;;;;;;;;;:41;;;;;;;;;;;;;;;;;;2507:10;2469:84;;2498:8;2486:11;2469:84;2518:14;2533:19;2469:84;;;;;;;;;;;;;;;;;;;;;;;;1567:990;;;;:::o;1085:85:0:-;1131:7;1157:6;;;;;;;;;;;1150:13;;1085:85;:::o;368:33:7:-;;;;;;;;;;;;;:::o;3617:159::-;3695:22;3729:15;:28;3745:11;3729:28;;;;;;;;;;;:43;;;3722:50;;3617:159;;;:::o;3316:141::-;3388:16;3416:15;:28;3432:11;3416:28;;;;;;;;;;;:37;;;3409:44;;3316:141;;;:::o;2572:469::-;2707:1;2692:16;;:11;:16;;2684:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2779:1;2756:24;;:19;:24;;2748:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2833:54;2854:11;2867:19;2833:20;:54::i;:::-;2829:208;;;2937:11;2926:10;2898:56;;2914:11;2898:56;2950:3;2898:56;;;;;;;;;;;;;;;;;;2829:208;;;3019:11;3008:10;2977:54;;2996:11;2977:54;;;;;;;;;;2829:208;2572:469;;;:::o;2011:240:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2119:1:::1;2099:22;;:8;:22;;;;2091:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2208:8;2179:38;;2200:6;::::0;::::1;;;;;;;;2179:38;;;;;;;;;;;;2236:8;2227:6;::::0;:17:::1;;;;;;;;;;;;;;;;;;2011:240:::0;:::o;598:104:6:-;651:15;685:10;678:17;;598:104;:::o", + "source": "pragma solidity >=0.6.0 <0.8.0;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/access/Ownable.sol\";\n\n\n// mock contract for now, we will add the hub and the rest later\ncontract DKGcontract is Ownable {\n\n\n\tusing SafeMath for uint256;\n\tIERC20 token;\n\n\taddress public TRAC_TOKEN_ADDRESS;\n\n\tstruct AssertionRecord{\n\t\t// bytes32 assertionID; // hash (multihash) of the assertion\n\t\tuint256 assertionTimeToLive;\n\t\tuint256 numberOfEpochs;\n\t\tuint256 creationTime;\n\t\taddress issuer;\n\t\tbytes32 rootHash;\n\t\tbytes32 data; // for extensibility\n\t\t// TODO: include Token management\n\t}\n\n\tmapping(bytes32 => AssertionRecord) internal assertionRecord; // assertionRecord[assertionID] , formerly offer[offerID]\n\tmapping(bytes32 => address) internal assertionIssuer; // mapping assertionID -> assertionIssuer\n\n\n\t// events\n\tevent TokenAddressSet(address indexed token);\n\tevent AssertionCreated(bytes32 indexed assertionID, bytes32 indexed rootHash, address indexed assertionIssuer, uint256 numberOfEpochs, uint256 assertionTimeToLive);\n\tevent TokensCollected(bytes32 indexed assertionID, address indexed prover, uint256 indexed epoch, uint256 amount);\n\tevent VerificationFailed(bytes32 indexed assertionID, address indexed prover, uint256 indexed epoch);\n\n\n\n\tconstructor(address token_address) public {\n\t\trequire(token_address!=address(0));\n\t\ttoken = IERC20(token_address);\n\t\tTRAC_TOKEN_ADDRESS = token_address;\n\t\t\n\t\temit TokenAddressSet(token_address);\n\n\t}\n\n\t/* DC */\n\tfunction createAssertionRecord(bytes32 assertionID, bytes32 rootHash, uint256 numberOfEpochs, uint256 assertionTimeToLive) public {\n\t\trequire(assertionID != 0, \"assertionID hash cannot be zero\");\n\t\trequire(rootHash != 0, \"rootHash hash cannot be zero\");\n\t\trequire(numberOfEpochs != 0, \"numberOfEpochs hash cannot be zero\");\n\t\trequire(assertionTimeToLive != 0, \"assertionTimeToLive hash cannot be zero\");\n\t\trequire(assertionRecord[assertionID].creationTime==0, \"Assertion already exists!\");\n\n\t\t// transfer token to contract here (next version)\n\n\t\tassertionRecord[assertionID].numberOfEpochs = numberOfEpochs;\n\t\tassertionRecord[assertionID].assertionTimeToLive = assertionTimeToLive;\n\t\tassertionRecord[assertionID].creationTime = block.timestamp;\n\t\tassertionRecord[assertionID].rootHash = rootHash;\n\t\tassertionRecord[assertionID].issuer = msg.sender;\n\t\tassertionIssuer[assertionID] = msg.sender;\n\n\t\temit AssertionCreated(assertionID,rootHash,msg.sender,numberOfEpochs,assertionTimeToLive);\n\t}\n\n\n\t/* DH */\n\n\tfunction submitHoldingProof(bytes32 assertionID, bytes32 epochAssertionProof, uint256 epochNumber) \n\tpublic {\n\t\trequire(assertionID != 0, \"assertionID hash cannot be zero\");\n\t\trequire(epochAssertionProof != 0, \"epochAssertionProof hash cannot be zero\");\n\n\t\tif (verifyAssertionProof(assertionID, epochAssertionProof)){\n\t\t\temit TokensCollected(assertionID,msg.sender,epochNumber, 123);\n\t\t\t} else {\n\t\t\t\temit VerificationFailed(assertionID,msg.sender,epochNumber);\n\t\t\t}\n\n\t}\n\n\n\n\tfunction verifyAssertionProof(bytes32 assertionID, bytes32 epochAssertionProof) \n\t\tpublic returns(bool proofValid){\n\t\treturn true;\n\n\t}\n\n\n\n\tfunction getAssertionIssuer(bytes32 assertionID)\n\tpublic view returns(address creator){\n\t\treturn assertionIssuer[assertionID];\n\t}\n\tfunction getAssertionRootHash(bytes32 assertionID)\n\tpublic view returns(bytes32 rootHash){\n\t\treturn assertionRecord[assertionID].rootHash;\n\t}\n\tfunction getAssertionTimeToLive(bytes32 assertionID)\n\tpublic view returns(uint256 timeToLive){\n\t\treturn assertionRecord[assertionID].assertionTimeToLive;\n\t}\n\tfunction getAssertionNumberOfEpochs(bytes32 assertionID)\n\tpublic view returns(uint256 numberOfEpochs){\n\t\treturn assertionRecord[assertionID].numberOfEpochs;\n\t}\n\n\tfunction getAssertionTask(bytes32 assertionID, uint256 epoch)\n\tpublic view returns(uint256 task){\n\t\treturn block.number;\n\t}\n\n}", "sourcePath": "/Users/miloskotlar/dkg-onchain-module-v6/contracts/DKGcontract.sol", "ast": { "absolutePath": "project:/contracts/DKGcontract.sol", "exportedSymbols": { + "Context": [ + 815 + ], "DKGcontract": [ - 889 + 1139 + ], + "IERC20": [ + 676 + ], + "Ownable": [ + 109 + ], + "SafeMath": [ + 476 ] }, - "id": 890, - "license": null, + "id": 1140, "nodeType": "SourceUnit", "nodes": [ { - "id": 567, + "id": 817, "literals": [ "solidity", + ">=", "0.6", - ".10" + ".0", + "<", + "0.8", + ".0" ], "nodeType": "PragmaDirective", - "src": "0:23:4" + "src": "0:31:7" }, { "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", - "id": 568, + "id": 818, "nodeType": "ImportDirective", - "scope": 890, - "sourceUnit": 543, - "src": "25:64:4", + "scope": 1140, + "sourceUnit": 677, + "src": "33:64:7", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "id": 569, + "id": 819, "nodeType": "ImportDirective", - "scope": 890, - "sourceUnit": 465, - "src": "90:59:4", + "scope": 1140, + "sourceUnit": 477, + "src": "98:59:7", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "openzeppelin-solidity/contracts/access/Ownable.sol", "file": "openzeppelin-solidity/contracts/access/Ownable.sol", - "id": 570, + "id": 820, "nodeType": "ImportDirective", - "scope": 890, + "scope": 1140, "sourceUnit": 110, - "src": "150:60:4", + "src": "158:60:7", "symbolAliases": [], "unitAlias": "" }, @@ -432,61 +449,57 @@ "abstract": false, "baseContracts": [ { - "arguments": null, "baseName": { - "contractScope": null, - "id": 571, + "id": 821, "name": "Ownable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 109, - "src": "302:7:4", + "src": "310:7:7", "typeDescriptions": { "typeIdentifier": "t_contract$_Ownable_$109", "typeString": "contract Ownable" } }, - "id": 572, + "id": 822, "nodeType": "InheritanceSpecifier", - "src": "302:7:4" + "src": "310:7:7" } ], "contractDependencies": [ 109, - 565 + 815 ], "contractKind": "contract", - "documentation": null, "fullyImplemented": true, - "id": 889, + "id": 1139, "linearizedBaseContracts": [ - 889, + 1139, 109, - 565 + 815 ], "name": "DKGcontract", "nodeType": "ContractDefinition", "nodes": [ { - "id": 575, + "id": 825, "libraryName": { - "contractScope": null, - "id": 573, + "id": 823, "name": "SafeMath", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 464, - "src": "321:8:4", + "referencedDeclaration": 476, + "src": "329:8:7", "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$464", + "typeIdentifier": "t_contract$_SafeMath_$476", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", - "src": "315:27:4", + "src": "323:27:7", "typeName": { - "id": 574, + "id": 824, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "334:7:4", + "src": "342:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -495,44 +508,40 @@ }, { "constant": false, - "id": 577, + "id": 827, "mutability": "mutable", "name": "token", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 889, - "src": "344:12:4", + "scope": 1139, + "src": "352:12:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$542", + "typeIdentifier": "t_contract$_IERC20_$676", "typeString": "contract IERC20" }, "typeName": { - "contractScope": null, - "id": 576, + "id": 826, "name": "IERC20", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 542, - "src": "344:6:4", + "referencedDeclaration": 676, + "src": "352:6:7", "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$542", + "typeIdentifier": "t_contract$_IERC20_$676", "typeString": "contract IERC20" } }, - "value": null, "visibility": "internal" }, { "constant": false, "functionSelector": "8f9cd32b", - "id": 579, + "id": 829, "mutability": "mutable", "name": "TRAC_TOKEN_ADDRESS", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 889, - "src": "360:33:4", + "scope": 1139, + "src": "368:33:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -540,32 +549,30 @@ "typeString": "address" }, "typeName": { - "id": 578, + "id": 828, "name": "address", "nodeType": "ElementaryTypeName", - "src": "360:7:4", + "src": "368:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "public" }, { "canonicalName": "DKGcontract.AssertionRecord", - "id": 592, + "id": 842, "members": [ { "constant": false, - "id": 581, + "id": 831, "mutability": "mutable", "name": "assertionTimeToLive", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 592, - "src": "486:27:4", + "scope": 842, + "src": "494:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -573,27 +580,25 @@ "typeString": "uint256" }, "typeName": { - "id": 580, + "id": 830, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "486:7:4", + "src": "494:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 583, + "id": 833, "mutability": "mutable", "name": "numberOfEpochs", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 592, - "src": "517:22:4", + "scope": 842, + "src": "525:22:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -601,27 +606,25 @@ "typeString": "uint256" }, "typeName": { - "id": 582, + "id": 832, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "517:7:4", + "src": "525:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 585, + "id": 835, "mutability": "mutable", "name": "creationTime", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 592, - "src": "543:20:4", + "scope": 842, + "src": "551:20:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -629,27 +632,25 @@ "typeString": "uint256" }, "typeName": { - "id": 584, + "id": 834, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "543:7:4", + "src": "551:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 587, + "id": 837, "mutability": "mutable", "name": "issuer", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 592, - "src": "567:14:4", + "scope": 842, + "src": "575:14:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -657,28 +658,26 @@ "typeString": "address" }, "typeName": { - "id": 586, + "id": 836, "name": "address", "nodeType": "ElementaryTypeName", - "src": "567:7:4", + "src": "575:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 589, + "id": 839, "mutability": "mutable", "name": "rootHash", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 592, - "src": "585:16:4", + "scope": 842, + "src": "593:16:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -686,27 +685,25 @@ "typeString": "bytes32" }, "typeName": { - "id": 588, + "id": 838, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "585:7:4", + "src": "593:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 591, + "id": 841, "mutability": "mutable", "name": "data", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 592, - "src": "605:12:4", + "scope": 842, + "src": "613:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -714,83 +711,78 @@ "typeString": "bytes32" }, "typeName": { - "id": 590, + "id": 840, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "605:7:4", + "src": "613:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], "name": "AssertionRecord", "nodeType": "StructDefinition", - "scope": 889, - "src": "397:281:4", + "scope": 1139, + "src": "405:281:7", "visibility": "public" }, { "constant": false, - "id": 596, + "id": 846, "mutability": "mutable", "name": "assertionRecord", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 889, - "src": "681:60:4", + "scope": 1139, + "src": "689:60:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord)" }, "typeName": { - "id": 595, + "id": 845, "keyType": { - "id": 593, + "id": 843, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "689:7:4", + "src": "697:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "681:35:4", + "src": "689:35:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord)" }, "valueType": { - "contractScope": null, - "id": 594, + "id": 844, "name": "AssertionRecord", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 592, - "src": "700:15:4", + "referencedDeclaration": 842, + "src": "708:15:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage_ptr", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage_ptr", "typeString": "struct DKGcontract.AssertionRecord" } } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 600, + "id": 850, "mutability": "mutable", "name": "assertionIssuer", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 889, - "src": "802:52:4", + "scope": 1139, + "src": "810:52:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -798,28 +790,28 @@ "typeString": "mapping(bytes32 => address)" }, "typeName": { - "id": 599, + "id": 849, "keyType": { - "id": 597, + "id": 847, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "810:7:4", + "src": "818:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "802:27:4", + "src": "810:27:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", "typeString": "mapping(bytes32 => address)" }, "valueType": { - "id": 598, + "id": 848, "name": "address", "nodeType": "ElementaryTypeName", - "src": "821:7:4", + "src": "829:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -827,29 +819,26 @@ } } }, - "value": null, "visibility": "internal" }, { "anonymous": false, - "documentation": null, - "id": 604, + "id": 854, "name": "TokenAddressSet", "nodeType": "EventDefinition", "parameters": { - "id": 603, + "id": 853, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 602, + "id": 852, "indexed": true, "mutability": "mutable", "name": "token", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 604, - "src": "934:21:4", + "scope": 854, + "src": "942:21:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -857,44 +846,41 @@ "typeString": "address" }, "typeName": { - "id": 601, + "id": 851, "name": "address", "nodeType": "ElementaryTypeName", - "src": "934:7:4", + "src": "942:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "933:23:4" + "src": "941:23:7" }, - "src": "912:45:4" + "src": "920:45:7" }, { "anonymous": false, - "documentation": null, - "id": 616, + "id": 866, "name": "AssertionCreated", "nodeType": "EventDefinition", "parameters": { - "id": 615, + "id": 865, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 606, + "id": 856, "indexed": true, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 616, - "src": "982:27:4", + "scope": 866, + "src": "990:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -902,28 +888,26 @@ "typeString": "bytes32" }, "typeName": { - "id": 605, + "id": 855, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "982:7:4", + "src": "990:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 608, + "id": 858, "indexed": true, "mutability": "mutable", "name": "rootHash", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 616, - "src": "1011:24:4", + "scope": 866, + "src": "1019:24:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -931,28 +915,26 @@ "typeString": "bytes32" }, "typeName": { - "id": 607, + "id": 857, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1011:7:4", + "src": "1019:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 610, + "id": 860, "indexed": true, "mutability": "mutable", "name": "assertionIssuer", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 616, - "src": "1037:31:4", + "scope": 866, + "src": "1045:31:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -960,29 +942,27 @@ "typeString": "address" }, "typeName": { - "id": 609, + "id": 859, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1037:7:4", + "src": "1045:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 612, + "id": 862, "indexed": false, "mutability": "mutable", "name": "numberOfEpochs", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 616, - "src": "1070:22:4", + "scope": 866, + "src": "1078:22:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -990,28 +970,26 @@ "typeString": "uint256" }, "typeName": { - "id": 611, + "id": 861, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1070:7:4", + "src": "1078:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 614, + "id": 864, "indexed": false, "mutability": "mutable", "name": "assertionTimeToLive", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 616, - "src": "1094:27:4", + "scope": 866, + "src": "1102:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1019,43 +997,40 @@ "typeString": "uint256" }, "typeName": { - "id": 613, + "id": 863, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1094:7:4", + "src": "1102:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "981:141:4" + "src": "989:141:7" }, - "src": "959:164:4" + "src": "967:164:7" }, { "anonymous": false, - "documentation": null, - "id": 626, + "id": 876, "name": "TokensCollected", "nodeType": "EventDefinition", "parameters": { - "id": 625, + "id": 875, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 618, + "id": 868, "indexed": true, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 626, - "src": "1147:27:4", + "scope": 876, + "src": "1155:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1063,28 +1038,26 @@ "typeString": "bytes32" }, "typeName": { - "id": 617, + "id": 867, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1147:7:4", + "src": "1155:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 620, + "id": 870, "indexed": true, "mutability": "mutable", "name": "prover", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 626, - "src": "1176:22:4", + "scope": 876, + "src": "1184:22:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1092,29 +1065,27 @@ "typeString": "address" }, "typeName": { - "id": 619, + "id": 869, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1176:7:4", + "src": "1184:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 622, + "id": 872, "indexed": true, "mutability": "mutable", "name": "epoch", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 626, - "src": "1200:21:4", + "scope": 876, + "src": "1208:21:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1122,28 +1093,26 @@ "typeString": "uint256" }, "typeName": { - "id": 621, + "id": 871, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1200:7:4", + "src": "1208:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 624, + "id": 874, "indexed": false, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 626, - "src": "1223:14:4", + "scope": 876, + "src": "1231:14:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1151,43 +1120,40 @@ "typeString": "uint256" }, "typeName": { - "id": 623, + "id": 873, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1223:7:4", + "src": "1231:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "1146:92:4" + "src": "1154:92:7" }, - "src": "1125:114:4" + "src": "1133:114:7" }, { "anonymous": false, - "documentation": null, - "id": 634, + "id": 884, "name": "VerificationFailed", "nodeType": "EventDefinition", "parameters": { - "id": 633, + "id": 883, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 628, + "id": 878, "indexed": true, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 634, - "src": "1266:27:4", + "scope": 884, + "src": "1274:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1195,28 +1161,26 @@ "typeString": "bytes32" }, "typeName": { - "id": 627, + "id": 877, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1266:7:4", + "src": "1274:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 630, + "id": 880, "indexed": true, "mutability": "mutable", "name": "prover", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 634, - "src": "1295:22:4", + "scope": 884, + "src": "1303:22:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1224,29 +1188,27 @@ "typeString": "address" }, "typeName": { - "id": 629, + "id": 879, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1295:7:4", + "src": "1303:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 632, + "id": 882, "indexed": true, "mutability": "mutable", "name": "epoch", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 634, - "src": "1319:21:4", + "scope": 884, + "src": "1327:21:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1254,52 +1216,48 @@ "typeString": "uint256" }, "typeName": { - "id": 631, + "id": 881, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1319:7:4", + "src": "1327:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "1265:76:4" + "src": "1273:76:7" }, - "src": "1241:101:4" + "src": "1249:101:7" }, { "body": { - "id": 662, + "id": 912, "nodeType": "Block", - "src": "1390:156:4", + "src": "1398:156:7", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, - "id": 645, + "id": 895, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 640, + "id": 890, "name": "token_address", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 636, - "src": "1402:13:4", + "referencedDeclaration": 886, + "src": "1410:13:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1308,20 +1266,17 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "hexValue": "30", - "id": 643, + "id": 893, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1425:1:4", - "subdenomination": null, + "src": "1433:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" @@ -1336,29 +1291,26 @@ "typeString": "int_const 0" } ], - "id": 642, + "id": 892, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "1417:7:4", + "src": "1425:7:7", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 641, + "id": 891, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1417:7:4", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } + "src": "1425:7:7", + "typeDescriptions": {} } }, - "id": 644, + "id": 894, "isConstant": false, "isLValue": false, "isPure": true, @@ -1366,14 +1318,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1417:10:4", + "src": "1425:10:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "src": "1402:25:4", + "src": "1410:25:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1387,21 +1339,21 @@ "typeString": "bool" } ], - "id": 639, + "id": 889, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, - "src": "1394:7:4", + "referencedDeclaration": 4294967278, + "src": "1402:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 646, + "id": 896, "isConstant": false, "isLValue": false, "isPure": false, @@ -1409,51 +1361,47 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1394:34:4", + "src": "1402:34:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 647, + "id": 897, "nodeType": "ExpressionStatement", - "src": "1394:34:4" + "src": "1402:34:7" }, { "expression": { - "argumentTypes": null, - "id": 652, + "id": 902, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 648, + "id": 898, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 577, - "src": "1432:5:4", + "referencedDeclaration": 827, + "src": "1440:5:7", "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$542", + "typeIdentifier": "t_contract$_IERC20_$676", "typeString": "contract IERC20" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 650, + "id": 900, "name": "token_address", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 636, - "src": "1447:13:4", + "referencedDeclaration": 886, + "src": "1455:13:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1467,18 +1415,18 @@ "typeString": "address" } ], - "id": 649, + "id": 899, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 542, - "src": "1440:6:4", + "referencedDeclaration": 676, + "src": "1448:6:7", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$542_$", + "typeIdentifier": "t_type$_t_contract$_IERC20_$676_$", "typeString": "type(contract IERC20)" } }, - "id": 651, + "id": 901, "isConstant": false, "isLValue": false, "isPure": false, @@ -1486,39 +1434,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1440:21:4", + "src": "1448:21:7", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$542", + "typeIdentifier": "t_contract$_IERC20_$676", "typeString": "contract IERC20" } }, - "src": "1432:29:4", + "src": "1440:29:7", "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$542", + "typeIdentifier": "t_contract$_IERC20_$676", "typeString": "contract IERC20" } }, - "id": 653, + "id": 903, "nodeType": "ExpressionStatement", - "src": "1432:29:4" + "src": "1440:29:7" }, { "expression": { - "argumentTypes": null, - "id": 656, + "id": 906, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 654, + "id": 904, "name": "TRAC_TOKEN_ADDRESS", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 579, - "src": "1465:18:4", + "referencedDeclaration": 829, + "src": "1473:18:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1527,40 +1473,37 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "id": 655, + "id": 905, "name": "token_address", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 636, - "src": "1486:13:4", + "referencedDeclaration": 886, + "src": "1494:13:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "1465:34:4", + "src": "1473:34:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 657, + "id": 907, "nodeType": "ExpressionStatement", - "src": "1465:34:4" + "src": "1473:34:7" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 659, + "id": 909, "name": "token_address", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 636, - "src": "1527:13:4", + "referencedDeclaration": 886, + "src": "1535:13:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1574,18 +1517,18 @@ "typeString": "address" } ], - "id": 658, + "id": 908, "name": "TokenAddressSet", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 604, - "src": "1511:15:4", + "referencedDeclaration": 854, + "src": "1519:15:7", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, - "id": 660, + "id": 910, "isConstant": false, "isLValue": false, "isPure": false, @@ -1593,40 +1536,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1511:30:4", + "src": "1519:30:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 661, + "id": 911, "nodeType": "EmitStatement", - "src": "1506:35:4" + "src": "1514:35:7" } ] }, - "documentation": null, - "id": 663, + "id": 913, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 637, + "id": 887, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 636, + "id": 886, "mutability": "mutable", "name": "token_address", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 663, - "src": "1359:21:4", + "scope": 913, + "src": "1367:21:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1634,63 +1574,59 @@ "typeString": "address" }, "typeName": { - "id": 635, + "id": 885, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1359:7:4", + "src": "1367:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "1358:23:4" + "src": "1366:23:7" }, "returnParameters": { - "id": 638, + "id": 888, "nodeType": "ParameterList", "parameters": [], - "src": "1390:0:4" + "src": "1398:0:7" }, - "scope": 889, - "src": "1347:199:4", + "scope": 1139, + "src": "1355:199:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { - "id": 765, + "id": 1015, "nodeType": "Block", - "src": "1689:860:4", + "src": "1697:860:7", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 677, + "id": 927, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 675, + "id": 925, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "1701:11:4", + "referencedDeclaration": 915, + "src": "1709:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1699,41 +1635,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 676, + "id": 926, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1716:1:4", - "subdenomination": null, + "src": "1724:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "1701:16:4", + "src": "1709:16:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "617373657274696f6e494420686173682063616e6e6f74206265207a65726f", - "id": 678, + "id": 928, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1719:33:4", - "subdenomination": null, + "src": "1727:33:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_649a3d58a096eb864e1646a68edf6e493c6de795be271ef6a8cd2b478518591c", "typeString": "literal_string \"assertionID hash cannot be zero\"" @@ -1752,21 +1684,21 @@ "typeString": "literal_string \"assertionID hash cannot be zero\"" } ], - "id": 674, + "id": 924, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, - "src": "1693:7:4", + "referencedDeclaration": 4294967278, + "src": "1701:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 679, + "id": 929, "isConstant": false, "isLValue": false, "isPure": false, @@ -1774,40 +1706,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1693:60:4", + "src": "1701:60:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 680, + "id": 930, "nodeType": "ExpressionStatement", - "src": "1693:60:4" + "src": "1701:60:7" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 684, + "id": 934, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 682, + "id": 932, "name": "rootHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 667, - "src": "1765:8:4", + "referencedDeclaration": 917, + "src": "1773:8:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1816,41 +1745,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 683, + "id": 933, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1777:1:4", - "subdenomination": null, + "src": "1785:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "1765:13:4", + "src": "1773:13:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "726f6f744861736820686173682063616e6e6f74206265207a65726f", - "id": 685, + "id": 935, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1780:30:4", - "subdenomination": null, + "src": "1788:30:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_224e5e3aafad117a551900ad41b6b8fd4124c64978d6cb6f2d999d30b5a7caf6", "typeString": "literal_string \"rootHash hash cannot be zero\"" @@ -1869,21 +1794,21 @@ "typeString": "literal_string \"rootHash hash cannot be zero\"" } ], - "id": 681, + "id": 931, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, - "src": "1757:7:4", + "referencedDeclaration": 4294967278, + "src": "1765:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 686, + "id": 936, "isConstant": false, "isLValue": false, "isPure": false, @@ -1891,40 +1816,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1757:54:4", + "src": "1765:54:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 687, + "id": 937, "nodeType": "ExpressionStatement", - "src": "1757:54:4" + "src": "1765:54:7" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 691, + "id": 941, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 689, + "id": 939, "name": "numberOfEpochs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 669, - "src": "1823:14:4", + "referencedDeclaration": 919, + "src": "1831:14:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1933,41 +1855,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 690, + "id": 940, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1841:1:4", - "subdenomination": null, + "src": "1849:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "1823:19:4", + "src": "1831:19:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726f", - "id": 692, + "id": 942, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1844:36:4", - "subdenomination": null, + "src": "1852:36:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_fa4af5b2a5d3b443608ae031fd9009eab2ce4cb844577b417eed67d3d60328f1", "typeString": "literal_string \"numberOfEpochs hash cannot be zero\"" @@ -1986,21 +1904,21 @@ "typeString": "literal_string \"numberOfEpochs hash cannot be zero\"" } ], - "id": 688, + "id": 938, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, - "src": "1815:7:4", + "referencedDeclaration": 4294967278, + "src": "1823:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 693, + "id": 943, "isConstant": false, "isLValue": false, "isPure": false, @@ -2008,40 +1926,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1815:66:4", + "src": "1823:66:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 694, + "id": 944, "nodeType": "ExpressionStatement", - "src": "1815:66:4" + "src": "1823:66:7" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 698, + "id": 948, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 696, + "id": 946, "name": "assertionTimeToLive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 671, - "src": "1893:19:4", + "referencedDeclaration": 921, + "src": "1901:19:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2050,41 +1965,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 697, + "id": 947, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1916:1:4", - "subdenomination": null, + "src": "1924:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "1893:24:4", + "src": "1901:24:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f", - "id": 699, + "id": 949, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1919:41:4", - "subdenomination": null, + "src": "1927:41:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_069e2edd21d0b2ae0e0fdeacec1cd50fed913131221cbb295c527db83a0001af", "typeString": "literal_string \"assertionTimeToLive hash cannot be zero\"" @@ -2103,21 +2014,21 @@ "typeString": "literal_string \"assertionTimeToLive hash cannot be zero\"" } ], - "id": 695, + "id": 945, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, - "src": "1885:7:4", + "referencedDeclaration": 4294967278, + "src": "1893:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 700, + "id": 950, "isConstant": false, "isLValue": false, "isPure": false, @@ -2125,58 +2036,52 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1885:76:4", + "src": "1893:76:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 701, + "id": 951, "nodeType": "ExpressionStatement", - "src": "1885:76:4" + "src": "1893:76:7" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 708, + "id": 958, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 703, + "id": 953, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "1973:15:4", + "referencedDeclaration": 846, + "src": "1981:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 705, + "id": 955, "indexExpression": { - "argumentTypes": null, - "id": 704, + "id": 954, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "1989:11:4", + "referencedDeclaration": 915, + "src": "1997:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2187,21 +2092,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1973:28:4", + "src": "1981:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 706, + "id": 956, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "creationTime", "nodeType": "MemberAccess", - "referencedDeclaration": 585, - "src": "1973:41:4", + "referencedDeclaration": 835, + "src": "1981:41:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2210,41 +2115,37 @@ "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 707, + "id": 957, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2016:1:4", - "subdenomination": null, + "src": "2024:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "1973:44:4", + "src": "1981:44:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "417373657274696f6e20616c72656164792065786973747321", - "id": 709, + "id": 959, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2019:27:4", - "subdenomination": null, + "src": "2027:27:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_533fbfe4d9ec6c5b4aac3ac2c85a5993318086c6dfacddd0ec06ea4b669082d1", "typeString": "literal_string \"Assertion already exists!\"" @@ -2263,21 +2164,21 @@ "typeString": "literal_string \"Assertion already exists!\"" } ], - "id": 702, + "id": 952, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, - "src": "1965:7:4", + "referencedDeclaration": 4294967278, + "src": "1973:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 710, + "id": 960, "isConstant": false, "isLValue": false, "isPure": false, @@ -2285,51 +2186,46 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1965:82:4", + "src": "1973:82:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 711, + "id": 961, "nodeType": "ExpressionStatement", - "src": "1965:82:4" + "src": "1973:82:7" }, { "expression": { - "argumentTypes": null, - "id": 717, + "id": 967, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 712, + "id": 962, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "2105:15:4", + "referencedDeclaration": 846, + "src": "2113:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 714, + "id": 964, "indexExpression": { - "argumentTypes": null, - "id": 713, + "id": 963, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "2121:11:4", + "referencedDeclaration": 915, + "src": "2129:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2340,21 +2236,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2105:28:4", + "src": "2113:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 715, + "id": 965, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "numberOfEpochs", "nodeType": "MemberAccess", - "referencedDeclaration": 583, - "src": "2105:43:4", + "referencedDeclaration": 833, + "src": "2113:43:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2363,62 +2259,56 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "id": 716, + "id": 966, "name": "numberOfEpochs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 669, - "src": "2151:14:4", + "referencedDeclaration": 919, + "src": "2159:14:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2105:60:4", + "src": "2113:60:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 718, + "id": 968, "nodeType": "ExpressionStatement", - "src": "2105:60:4" + "src": "2113:60:7" }, { "expression": { - "argumentTypes": null, - "id": 724, + "id": 974, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 719, + "id": 969, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "2169:15:4", + "referencedDeclaration": 846, + "src": "2177:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 721, + "id": 971, "indexExpression": { - "argumentTypes": null, - "id": 720, + "id": 970, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "2185:11:4", + "referencedDeclaration": 915, + "src": "2193:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2429,21 +2319,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2169:28:4", + "src": "2177:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 722, + "id": 972, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "assertionTimeToLive", "nodeType": "MemberAccess", - "referencedDeclaration": 581, - "src": "2169:48:4", + "referencedDeclaration": 831, + "src": "2177:48:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2452,62 +2342,56 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "id": 723, + "id": 973, "name": "assertionTimeToLive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 671, - "src": "2220:19:4", + "referencedDeclaration": 921, + "src": "2228:19:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2169:70:4", + "src": "2177:70:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 725, + "id": 975, "nodeType": "ExpressionStatement", - "src": "2169:70:4" + "src": "2177:70:7" }, { "expression": { - "argumentTypes": null, - "id": 732, + "id": 982, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 726, + "id": 976, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "2243:15:4", + "referencedDeclaration": 846, + "src": "2251:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 728, + "id": 978, "indexExpression": { - "argumentTypes": null, - "id": 727, + "id": 977, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "2259:11:4", + "referencedDeclaration": 915, + "src": "2267:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2518,21 +2402,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2243:28:4", + "src": "2251:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 729, + "id": 979, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "creationTime", "nodeType": "MemberAccess", - "referencedDeclaration": 585, - "src": "2243:41:4", + "referencedDeclaration": 835, + "src": "2251:41:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2541,78 +2425,70 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 730, + "id": 980, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "2287:5:4", + "referencedDeclaration": 4294967292, + "src": "2295:5:7", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 731, + "id": 981, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2287:15:4", + "src": "2295:15:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2243:59:4", + "src": "2251:59:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 733, + "id": 983, "nodeType": "ExpressionStatement", - "src": "2243:59:4" + "src": "2251:59:7" }, { "expression": { - "argumentTypes": null, - "id": 739, + "id": 989, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 734, + "id": 984, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "2306:15:4", + "referencedDeclaration": 846, + "src": "2314:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 736, + "id": 986, "indexExpression": { - "argumentTypes": null, - "id": 735, + "id": 985, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "2322:11:4", + "referencedDeclaration": 915, + "src": "2330:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2623,21 +2499,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2306:28:4", + "src": "2314:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 737, + "id": 987, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "rootHash", "nodeType": "MemberAccess", - "referencedDeclaration": 589, - "src": "2306:37:4", + "referencedDeclaration": 839, + "src": "2314:37:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2646,62 +2522,56 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "id": 738, + "id": 988, "name": "rootHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 667, - "src": "2346:8:4", + "referencedDeclaration": 917, + "src": "2354:8:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "src": "2306:48:4", + "src": "2314:48:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "id": 740, + "id": 990, "nodeType": "ExpressionStatement", - "src": "2306:48:4" + "src": "2314:48:7" }, { "expression": { - "argumentTypes": null, - "id": 747, + "id": 997, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 741, + "id": 991, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "2358:15:4", + "referencedDeclaration": 846, + "src": "2366:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 743, + "id": 993, "indexExpression": { - "argumentTypes": null, - "id": 742, + "id": 992, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "2374:11:4", + "referencedDeclaration": 915, + "src": "2382:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2712,21 +2582,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2358:28:4", + "src": "2366:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 744, + "id": 994, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "issuer", "nodeType": "MemberAccess", - "referencedDeclaration": 587, - "src": "2358:35:4", + "referencedDeclaration": 837, + "src": "2366:35:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2735,76 +2605,69 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 745, + "id": 995, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "2396:3:4", + "referencedDeclaration": 4294967281, + "src": "2404:3:7", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 746, + "id": 996, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2396:10:4", + "src": "2404:10:7", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "src": "2358:48:4", + "src": "2366:48:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 748, + "id": 998, "nodeType": "ExpressionStatement", - "src": "2358:48:4" + "src": "2366:48:7" }, { "expression": { - "argumentTypes": null, - "id": 754, + "id": 1004, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 749, + "id": 999, "name": "assertionIssuer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 600, - "src": "2410:15:4", + "referencedDeclaration": 850, + "src": "2418:15:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", "typeString": "mapping(bytes32 => address)" } }, - "id": 751, + "id": 1001, "indexExpression": { - "argumentTypes": null, - "id": 750, + "id": 1000, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "2426:11:4", + "referencedDeclaration": 915, + "src": "2434:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2815,7 +2678,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "2410:28:4", + "src": "2418:28:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2824,124 +2687,113 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 752, + "id": 1002, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "2441:3:4", + "referencedDeclaration": 4294967281, + "src": "2449:3:7", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 753, + "id": 1003, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2441:10:4", + "src": "2449:10:7", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "src": "2410:41:4", + "src": "2418:41:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 755, + "id": 1005, "nodeType": "ExpressionStatement", - "src": "2410:41:4" + "src": "2418:41:7" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 757, + "id": 1007, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 665, - "src": "2478:11:4", + "referencedDeclaration": 915, + "src": "2486:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "argumentTypes": null, - "id": 758, + "id": 1008, "name": "rootHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 667, - "src": "2490:8:4", + "referencedDeclaration": 917, + "src": "2498:8:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 759, + "id": 1009, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "2499:3:4", + "referencedDeclaration": 4294967281, + "src": "2507:3:7", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 760, + "id": 1010, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2499:10:4", + "src": "2507:10:7", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { - "argumentTypes": null, - "id": 761, + "id": 1011, "name": "numberOfEpochs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 669, - "src": "2510:14:4", + "referencedDeclaration": 919, + "src": "2518:14:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, - "id": 762, + "id": 1012, "name": "assertionTimeToLive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 671, - "src": "2525:19:4", + "referencedDeclaration": 921, + "src": "2533:19:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2971,18 +2823,18 @@ "typeString": "uint256" } ], - "id": 756, + "id": 1006, "name": "AssertionCreated", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 616, - "src": "2461:16:4", + "referencedDeclaration": 866, + "src": "2469:16:7", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (bytes32,bytes32,address,uint256,uint256)" } }, - "id": 763, + "id": 1013, "isConstant": false, "isLValue": false, "isPure": false, @@ -2990,41 +2842,38 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2461:84:4", + "src": "2469:84:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 764, + "id": 1014, "nodeType": "EmitStatement", - "src": "2456:89:4" + "src": "2464:89:7" } ] }, - "documentation": null, "functionSelector": "73a77389", - "id": 766, + "id": 1016, "implemented": true, "kind": "function", "modifiers": [], "name": "createAssertionRecord", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 672, + "id": 922, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 665, + "id": 915, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 766, - "src": "1590:19:4", + "scope": 1016, + "src": "1598:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3032,27 +2881,25 @@ "typeString": "bytes32" }, "typeName": { - "id": 664, + "id": 914, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1590:7:4", + "src": "1598:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 667, + "id": 917, "mutability": "mutable", "name": "rootHash", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 766, - "src": "1611:16:4", + "scope": 1016, + "src": "1619:16:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3060,27 +2907,25 @@ "typeString": "bytes32" }, "typeName": { - "id": 666, + "id": 916, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1611:7:4", + "src": "1619:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 669, + "id": 919, "mutability": "mutable", "name": "numberOfEpochs", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 766, - "src": "1629:22:4", + "scope": 1016, + "src": "1637:22:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3088,27 +2933,25 @@ "typeString": "uint256" }, "typeName": { - "id": 668, + "id": 918, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1629:7:4", + "src": "1637:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 671, + "id": 921, "mutability": "mutable", "name": "assertionTimeToLive", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 766, - "src": "1653:27:4", + "scope": 1016, + "src": "1661:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3116,62 +2959,58 @@ "typeString": "uint256" }, "typeName": { - "id": 670, + "id": 920, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1653:7:4", + "src": "1661:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "1589:92:4" + "src": "1597:92:7" }, "returnParameters": { - "id": 673, + "id": 923, "nodeType": "ParameterList", "parameters": [], - "src": "1689:0:4" + "src": "1697:0:7" }, - "scope": 889, - "src": "1559:990:4", + "scope": 1139, + "src": "1567:990:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { - "id": 811, + "id": 1061, "nodeType": "Block", - "src": "2672:361:4", + "src": "2680:361:7", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 778, + "id": 1028, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 776, + "id": 1026, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 768, - "src": "2684:11:4", + "referencedDeclaration": 1018, + "src": "2692:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3180,41 +3019,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 777, + "id": 1027, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2699:1:4", - "subdenomination": null, + "src": "2707:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "2684:16:4", + "src": "2692:16:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "617373657274696f6e494420686173682063616e6e6f74206265207a65726f", - "id": 779, + "id": 1029, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2702:33:4", - "subdenomination": null, + "src": "2710:33:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_649a3d58a096eb864e1646a68edf6e493c6de795be271ef6a8cd2b478518591c", "typeString": "literal_string \"assertionID hash cannot be zero\"" @@ -3233,21 +3068,21 @@ "typeString": "literal_string \"assertionID hash cannot be zero\"" } ], - "id": 775, + "id": 1025, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, - "src": "2676:7:4", + "referencedDeclaration": 4294967278, + "src": "2684:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 780, + "id": 1030, "isConstant": false, "isLValue": false, "isPure": false, @@ -3255,40 +3090,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2676:60:4", + "src": "2684:60:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 781, + "id": 1031, "nodeType": "ExpressionStatement", - "src": "2676:60:4" + "src": "2684:60:7" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 785, + "id": 1035, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 783, + "id": 1033, "name": "epochAssertionProof", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 770, - "src": "2748:19:4", + "referencedDeclaration": 1020, + "src": "2756:19:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3297,41 +3129,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 784, + "id": 1034, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2771:1:4", - "subdenomination": null, + "src": "2779:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "2748:24:4", + "src": "2756:24:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "65706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f", - "id": 786, + "id": 1036, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2774:41:4", - "subdenomination": null, + "src": "2782:41:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_51a89ccd247a0e5232bbda470ea88b3fa7ebe5c9c4e686866df3ae98cc738613", "typeString": "literal_string \"epochAssertionProof hash cannot be zero\"" @@ -3350,21 +3178,21 @@ "typeString": "literal_string \"epochAssertionProof hash cannot be zero\"" } ], - "id": 782, + "id": 1032, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, - "src": "2740:7:4", + "referencedDeclaration": 4294967278, + "src": "2748:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 787, + "id": 1037, "isConstant": false, "isLValue": false, "isPure": false, @@ -3372,42 +3200,39 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2740:76:4", + "src": "2748:76:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 788, + "id": 1038, "nodeType": "ExpressionStatement", - "src": "2740:76:4" + "src": "2748:76:7" }, { "condition": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 790, + "id": 1040, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 768, - "src": "2846:11:4", + "referencedDeclaration": 1018, + "src": "2854:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "argumentTypes": null, - "id": 791, + "id": 1041, "name": "epochAssertionProof", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 770, - "src": "2859:19:4", + "referencedDeclaration": 1020, + "src": "2867:19:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3425,18 +3250,18 @@ "typeString": "bytes32" } ], - "id": 789, + "id": 1039, "name": "verifyAssertionProof", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 824, - "src": "2825:20:4", + "referencedDeclaration": 1074, + "src": "2833:20:7", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$_t_bool_$", "typeString": "function (bytes32,bytes32) returns (bool)" } }, - "id": 792, + "id": 1042, "isConstant": false, "isLValue": false, "isPure": false, @@ -3444,7 +3269,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2825:54:4", + "src": "2833:54:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -3452,64 +3277,58 @@ } }, "falseBody": { - "id": 809, + "id": 1059, "nodeType": "Block", - "src": "2958:71:4", + "src": "2966:71:7", "statements": [ { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 803, + "id": 1053, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 768, - "src": "2988:11:4", + "referencedDeclaration": 1018, + "src": "2996:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 804, + "id": 1054, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "3000:3:4", + "referencedDeclaration": 4294967281, + "src": "3008:3:7", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 805, + "id": 1055, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3000:10:4", + "src": "3008:10:7", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { - "argumentTypes": null, - "id": 806, + "id": 1056, "name": "epochNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 772, - "src": "3011:11:4", + "referencedDeclaration": 1022, + "src": "3019:11:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3531,18 +3350,18 @@ "typeString": "uint256" } ], - "id": 802, + "id": 1052, "name": "VerificationFailed", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 634, - "src": "2969:18:4", + "referencedDeclaration": 884, + "src": "2977:18:7", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (bytes32,address,uint256)" } }, - "id": 807, + "id": 1057, "isConstant": false, "isLValue": false, "isPure": false, @@ -3550,98 +3369,90 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2969:54:4", + "src": "2977:54:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 808, + "id": 1058, "nodeType": "EmitStatement", - "src": "2964:59:4" + "src": "2972:59:7" } ] }, - "id": 810, + "id": 1060, "nodeType": "IfStatement", - "src": "2821:208:4", + "src": "2829:208:7", "trueBody": { - "id": 801, + "id": 1051, "nodeType": "Block", - "src": "2880:72:4", + "src": "2888:72:7", "statements": [ { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 794, + "id": 1044, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 768, - "src": "2906:11:4", + "referencedDeclaration": 1018, + "src": "2914:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 795, + "id": 1045, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "2918:3:4", + "referencedDeclaration": 4294967281, + "src": "2926:3:7", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 796, + "id": 1046, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2918:10:4", + "src": "2926:10:7", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { - "argumentTypes": null, - "id": 797, + "id": 1047, "name": "epochNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 772, - "src": "2929:11:4", + "referencedDeclaration": 1022, + "src": "2937:11:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, "hexValue": "313233", - "id": 798, + "id": 1048, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2942:3:4", - "subdenomination": null, + "src": "2950:3:7", "typeDescriptions": { "typeIdentifier": "t_rational_123_by_1", "typeString": "int_const 123" @@ -3668,18 +3479,18 @@ "typeString": "int_const 123" } ], - "id": 793, + "id": 1043, "name": "TokensCollected", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "2890:15:4", + "referencedDeclaration": 876, + "src": "2898:15:7", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (bytes32,address,uint256,uint256)" } }, - "id": 799, + "id": 1049, "isConstant": false, "isLValue": false, "isPure": false, @@ -3687,44 +3498,41 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2890:56:4", + "src": "2898:56:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 800, + "id": 1050, "nodeType": "EmitStatement", - "src": "2885:61:4" + "src": "2893:61:7" } ] } } ] }, - "documentation": null, "functionSelector": "ce64c643", - "id": 812, + "id": 1062, "implemented": true, "kind": "function", "modifiers": [], "name": "submitHoldingProof", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 773, + "id": 1023, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 768, + "id": 1018, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 812, - "src": "2592:19:4", + "scope": 1062, + "src": "2600:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3732,27 +3540,25 @@ "typeString": "bytes32" }, "typeName": { - "id": 767, + "id": 1017, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2592:7:4", + "src": "2600:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 770, + "id": 1020, "mutability": "mutable", "name": "epochAssertionProof", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 812, - "src": "2613:27:4", + "scope": 1062, + "src": "2621:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3760,27 +3566,25 @@ "typeString": "bytes32" }, "typeName": { - "id": 769, + "id": 1019, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2613:7:4", + "src": "2621:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 772, + "id": 1022, "mutability": "mutable", "name": "epochNumber", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 812, - "src": "2642:19:4", + "scope": 1062, + "src": "2650:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3788,87 +3592,81 @@ "typeString": "uint256" }, "typeName": { - "id": 771, + "id": 1021, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2642:7:4", + "src": "2650:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "2591:71:4" + "src": "2599:71:7" }, "returnParameters": { - "id": 774, + "id": 1024, "nodeType": "ParameterList", "parameters": [], - "src": "2672:0:4" + "src": "2680:0:7" }, - "scope": 889, - "src": "2564:469:4", + "scope": 1139, + "src": "2572:469:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { - "id": 823, + "id": 1073, "nodeType": "Block", - "src": "3152:20:4", + "src": "3160:20:7", "statements": [ { "expression": { - "argumentTypes": null, "hexValue": "74727565", - "id": 821, + "id": 1071, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "3163:4:4", - "subdenomination": null, + "src": "3171:4:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, - "functionReturnParameters": 820, - "id": 822, + "functionReturnParameters": 1070, + "id": 1072, "nodeType": "Return", - "src": "3156:11:4" + "src": "3164:11:7" } ] }, - "documentation": null, "functionSelector": "193f9c7e", - "id": 824, + "id": 1074, "implemented": true, "kind": "function", "modifiers": [], "name": "verifyAssertionProof", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 817, + "id": 1067, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 814, + "id": 1064, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 824, - "src": "3068:19:4", + "scope": 1074, + "src": "3076:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3876,27 +3674,25 @@ "typeString": "bytes32" }, "typeName": { - "id": 813, + "id": 1063, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3068:7:4", + "src": "3076:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 816, + "id": 1066, "mutability": "mutable", "name": "epochAssertionProof", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 824, - "src": "3089:27:4", + "scope": 1074, + "src": "3097:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3904,34 +3700,32 @@ "typeString": "bytes32" }, "typeName": { - "id": 815, + "id": 1065, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3089:7:4", + "src": "3097:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "3067:50:4" + "src": "3075:50:7" }, "returnParameters": { - "id": 820, + "id": 1070, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 819, + "id": 1069, "mutability": "mutable", "name": "proofValid", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 824, - "src": "3136:15:4", + "scope": 1074, + "src": "3144:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3939,58 +3733,54 @@ "typeString": "bool" }, "typeName": { - "id": 818, + "id": 1068, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "3136:4:4", + "src": "3144:4:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "value": null, "visibility": "internal" } ], - "src": "3135:17:4" + "src": "3143:17:7" }, - "scope": 889, - "src": "3038:134:4", + "scope": 1139, + "src": "3046:134:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { - "id": 835, + "id": 1085, "nodeType": "Block", - "src": "3263:43:4", + "src": "3271:43:7", "statements": [ { "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 831, + "id": 1081, "name": "assertionIssuer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 600, - "src": "3274:15:4", + "referencedDeclaration": 850, + "src": "3282:15:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", "typeString": "mapping(bytes32 => address)" } }, - "id": 833, + "id": 1083, "indexExpression": { - "argumentTypes": null, - "id": 832, + "id": 1082, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 826, - "src": "3290:11:4", + "referencedDeclaration": 1076, + "src": "3298:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4001,41 +3791,38 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3274:28:4", + "src": "3282:28:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "functionReturnParameters": 830, - "id": 834, + "functionReturnParameters": 1080, + "id": 1084, "nodeType": "Return", - "src": "3267:35:4" + "src": "3275:35:7" } ] }, - "documentation": null, "functionSelector": "0828e9f3", - "id": 836, + "id": 1086, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssertionIssuer", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 827, + "id": 1077, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 826, + "id": 1076, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 836, - "src": "3205:19:4", + "scope": 1086, + "src": "3213:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4043,34 +3830,32 @@ "typeString": "bytes32" }, "typeName": { - "id": 825, + "id": 1075, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3205:7:4", + "src": "3213:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "3204:21:4" + "src": "3212:21:7" }, "returnParameters": { - "id": 830, + "id": 1080, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 829, + "id": 1079, "mutability": "mutable", "name": "creator", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 836, - "src": "3247:15:4", + "scope": 1086, + "src": "3255:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4078,61 +3863,56 @@ "typeString": "address" }, "typeName": { - "id": 828, + "id": 1078, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3247:7:4", + "src": "3255:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "3246:17:4" + "src": "3254:17:7" }, - "scope": 889, - "src": "3177:129:4", + "scope": 1139, + "src": "3185:129:7", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 848, + "id": 1098, "nodeType": "Block", - "src": "3397:52:4", + "src": "3405:52:7", "statements": [ { "expression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 843, + "id": 1093, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "3408:15:4", + "referencedDeclaration": 846, + "src": "3416:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 845, + "id": 1095, "indexExpression": { - "argumentTypes": null, - "id": 844, + "id": 1094, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 838, - "src": "3424:11:4", + "referencedDeclaration": 1088, + "src": "3432:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4143,55 +3923,52 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3408:28:4", + "src": "3416:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 846, + "id": 1096, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "rootHash", "nodeType": "MemberAccess", - "referencedDeclaration": 589, - "src": "3408:37:4", + "referencedDeclaration": 839, + "src": "3416:37:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "functionReturnParameters": 842, - "id": 847, + "functionReturnParameters": 1092, + "id": 1097, "nodeType": "Return", - "src": "3401:44:4" + "src": "3409:44:7" } ] }, - "documentation": null, "functionSelector": "b934b4e4", - "id": 849, + "id": 1099, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssertionRootHash", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 839, + "id": 1089, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 838, + "id": 1088, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 849, - "src": "3338:19:4", + "scope": 1099, + "src": "3346:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4199,34 +3976,32 @@ "typeString": "bytes32" }, "typeName": { - "id": 837, + "id": 1087, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3338:7:4", + "src": "3346:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "3337:21:4" + "src": "3345:21:7" }, "returnParameters": { - "id": 842, + "id": 1092, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 841, + "id": 1091, "mutability": "mutable", "name": "rootHash", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 849, - "src": "3380:16:4", + "scope": 1099, + "src": "3388:16:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4234,60 +4009,55 @@ "typeString": "bytes32" }, "typeName": { - "id": 840, + "id": 1090, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3380:7:4", + "src": "3388:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "3379:18:4" + "src": "3387:18:7" }, - "scope": 889, - "src": "3308:141:4", + "scope": 1139, + "src": "3316:141:7", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 861, + "id": 1111, "nodeType": "Block", - "src": "3544:63:4", + "src": "3552:63:7", "statements": [ { "expression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 856, + "id": 1106, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "3555:15:4", + "referencedDeclaration": 846, + "src": "3563:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 858, + "id": 1108, "indexExpression": { - "argumentTypes": null, - "id": 857, + "id": 1107, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 851, - "src": "3571:11:4", + "referencedDeclaration": 1101, + "src": "3579:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4298,55 +4068,52 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3555:28:4", + "src": "3563:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 859, + "id": 1109, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "assertionTimeToLive", "nodeType": "MemberAccess", - "referencedDeclaration": 581, - "src": "3555:48:4", + "referencedDeclaration": 831, + "src": "3563:48:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 855, - "id": 860, + "functionReturnParameters": 1105, + "id": 1110, "nodeType": "Return", - "src": "3548:55:4" + "src": "3556:55:7" } ] }, - "documentation": null, "functionSelector": "6988bc03", - "id": 862, + "id": 1112, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssertionTimeToLive", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 852, + "id": 1102, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 851, + "id": 1101, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 862, - "src": "3483:19:4", + "scope": 1112, + "src": "3491:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4354,34 +4121,32 @@ "typeString": "bytes32" }, "typeName": { - "id": 850, + "id": 1100, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3483:7:4", + "src": "3491:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "3482:21:4" + "src": "3490:21:7" }, "returnParameters": { - "id": 855, + "id": 1105, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 854, + "id": 1104, "mutability": "mutable", "name": "timeToLive", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 862, - "src": "3525:18:4", + "scope": 1112, + "src": "3533:18:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4389,60 +4154,55 @@ "typeString": "uint256" }, "typeName": { - "id": 853, + "id": 1103, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3525:7:4", + "src": "3533:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "3524:20:4" + "src": "3532:20:7" }, - "scope": 889, - "src": "3451:156:4", + "scope": 1139, + "src": "3459:156:7", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 874, + "id": 1124, "nodeType": "Block", - "src": "3710:58:4", + "src": "3718:58:7", "statements": [ { "expression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 869, + "id": 1119, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 596, - "src": "3721:15:4", + "referencedDeclaration": 846, + "src": "3729:15:7", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$592_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 871, + "id": 1121, "indexExpression": { - "argumentTypes": null, - "id": 870, + "id": 1120, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 864, - "src": "3737:11:4", + "referencedDeclaration": 1114, + "src": "3745:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4453,55 +4213,52 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3721:28:4", + "src": "3729:28:7", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssertionRecord_$592_storage", + "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 872, + "id": 1122, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "numberOfEpochs", "nodeType": "MemberAccess", - "referencedDeclaration": 583, - "src": "3721:43:4", + "referencedDeclaration": 833, + "src": "3729:43:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 868, - "id": 873, + "functionReturnParameters": 1118, + "id": 1123, "nodeType": "Return", - "src": "3714:50:4" + "src": "3722:50:7" } ] }, - "documentation": null, "functionSelector": "9e50e72c", - "id": 875, + "id": 1125, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssertionNumberOfEpochs", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 865, + "id": 1115, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 864, + "id": 1114, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 875, - "src": "3645:19:4", + "scope": 1125, + "src": "3653:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4509,34 +4266,32 @@ "typeString": "bytes32" }, "typeName": { - "id": 863, + "id": 1113, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3645:7:4", + "src": "3653:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "3644:21:4" + "src": "3652:21:7" }, "returnParameters": { - "id": 868, + "id": 1118, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 867, + "id": 1117, "mutability": "mutable", "name": "numberOfEpochs", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 875, - "src": "3687:22:4", + "scope": 1125, + "src": "3695:22:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4544,92 +4299,85 @@ "typeString": "uint256" }, "typeName": { - "id": 866, + "id": 1116, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3687:7:4", + "src": "3695:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "3686:24:4" + "src": "3694:24:7" }, - "scope": 889, - "src": "3609:159:4", + "scope": 1139, + "src": "3617:159:7", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 887, + "id": 1137, "nodeType": "Block", - "src": "3867:27:4", + "src": "3875:27:7", "statements": [ { "expression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 884, + "id": 1134, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "3878:5:4", + "referencedDeclaration": 4294967292, + "src": "3886:5:7", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 885, + "id": 1135, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "number", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3878:12:4", + "src": "3886:12:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 883, - "id": 886, + "functionReturnParameters": 1133, + "id": 1136, "nodeType": "Return", - "src": "3871:19:4" + "src": "3879:19:7" } ] }, - "documentation": null, "functionSelector": "08c4933b", - "id": 888, + "id": 1138, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssertionTask", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 880, + "id": 1130, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 877, + "id": 1127, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 888, - "src": "3797:19:4", + "scope": 1138, + "src": "3805:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4637,27 +4385,25 @@ "typeString": "bytes32" }, "typeName": { - "id": 876, + "id": 1126, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3797:7:4", + "src": "3805:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 879, + "id": 1129, "mutability": "mutable", "name": "epoch", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 888, - "src": "3818:13:4", + "scope": 1138, + "src": "3826:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4665,34 +4411,32 @@ "typeString": "uint256" }, "typeName": { - "id": 878, + "id": 1128, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3818:7:4", + "src": "3826:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "3796:36:4" + "src": "3804:36:7" }, "returnParameters": { - "id": 883, + "id": 1133, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 882, + "id": 1132, "mutability": "mutable", "name": "task", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 888, - "src": "3854:12:4", + "scope": 1138, + "src": "3862:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4700,198 +4444,204 @@ "typeString": "uint256" }, "typeName": { - "id": 881, + "id": 1131, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3854:7:4", + "src": "3862:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "3853:14:4" + "src": "3861:14:7" }, - "scope": 889, - "src": "3771:123:4", + "scope": 1139, + "src": "3779:123:7", "stateMutability": "view", "virtual": false, "visibility": "public" } ], - "scope": 890, - "src": "278:3619:4" + "scope": 1140, + "src": "286:3619:7" } ], - "src": "0:3897:4" + "src": "0:3905:7" }, "legacyAST": { "attributes": { "absolutePath": "project:/contracts/DKGcontract.sol", "exportedSymbols": { + "Context": [ + 815 + ], "DKGcontract": [ - 889 + 1139 + ], + "IERC20": [ + 676 + ], + "Ownable": [ + 109 + ], + "SafeMath": [ + 476 ] - }, - "license": null + } }, "children": [ { "attributes": { "literals": [ "solidity", + ">=", "0.6", - ".10" + ".0", + "<", + "0.8", + ".0" ] }, - "id": 567, + "id": 817, "name": "PragmaDirective", - "src": "0:23:4" + "src": "0:31:7" }, { "attributes": { - "SourceUnit": 543, + "SourceUnit": 677, "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", - "scope": 890, + "scope": 1140, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 568, + "id": 818, "name": "ImportDirective", - "src": "25:64:4" + "src": "33:64:7" }, { "attributes": { - "SourceUnit": 465, + "SourceUnit": 477, "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "scope": 890, + "scope": 1140, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 569, + "id": 819, "name": "ImportDirective", - "src": "90:59:4" + "src": "98:59:7" }, { "attributes": { "SourceUnit": 110, "absolutePath": "openzeppelin-solidity/contracts/access/Ownable.sol", "file": "openzeppelin-solidity/contracts/access/Ownable.sol", - "scope": 890, + "scope": 1140, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 570, + "id": 820, "name": "ImportDirective", - "src": "150:60:4" + "src": "158:60:7" }, { "attributes": { "abstract": false, "contractDependencies": [ 109, - 565 + 815 ], "contractKind": "contract", - "documentation": null, "fullyImplemented": true, "linearizedBaseContracts": [ - 889, + 1139, 109, - 565 + 815 ], "name": "DKGcontract", - "scope": 890 + "scope": 1140 }, "children": [ { - "attributes": { - "arguments": null - }, + "attributes": {}, "children": [ { "attributes": { - "contractScope": null, "name": "Ownable", "referencedDeclaration": 109, "type": "contract Ownable" }, - "id": 571, + "id": 821, "name": "UserDefinedTypeName", - "src": "302:7:4" + "src": "310:7:7" } ], - "id": 572, + "id": 822, "name": "InheritanceSpecifier", - "src": "302:7:4" + "src": "310:7:7" }, { "children": [ { "attributes": { - "contractScope": null, "name": "SafeMath", - "referencedDeclaration": 464, + "referencedDeclaration": 476, "type": "library SafeMath" }, - "id": 573, + "id": 823, "name": "UserDefinedTypeName", - "src": "321:8:4" + "src": "329:8:7" }, { "attributes": { "name": "uint256", "type": "uint256" }, - "id": 574, + "id": 824, "name": "ElementaryTypeName", - "src": "334:7:4" + "src": "342:7:7" } ], - "id": 575, + "id": 825, "name": "UsingForDirective", - "src": "315:27:4" + "src": "323:27:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "token", - "overrides": null, - "scope": 889, + "scope": 1139, "stateVariable": true, "storageLocation": "default", "type": "contract IERC20", - "value": null, "visibility": "internal" }, "children": [ { "attributes": { - "contractScope": null, "name": "IERC20", - "referencedDeclaration": 542, + "referencedDeclaration": 676, "type": "contract IERC20" }, - "id": 576, + "id": 826, "name": "UserDefinedTypeName", - "src": "344:6:4" + "src": "352:6:7" } ], - "id": 577, + "id": 827, "name": "VariableDeclaration", - "src": "344:12:4" + "src": "352:12:7" }, { "attributes": { @@ -4899,12 +4649,10 @@ "functionSelector": "8f9cd32b", "mutability": "mutable", "name": "TRAC_TOKEN_ADDRESS", - "overrides": null, - "scope": 889, + "scope": 1139, "stateVariable": true, "storageLocation": "default", "type": "address", - "value": null, "visibility": "public" }, "children": [ @@ -4914,20 +4662,20 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 578, + "id": 828, "name": "ElementaryTypeName", - "src": "360:7:4" + "src": "368:7:7" } ], - "id": 579, + "id": 829, "name": "VariableDeclaration", - "src": "360:33:4" + "src": "368:33:7" }, { "attributes": { "canonicalName": "DKGcontract.AssertionRecord", "name": "AssertionRecord", - "scope": 889, + "scope": 1139, "visibility": "public" }, "children": [ @@ -4936,12 +4684,10 @@ "constant": false, "mutability": "mutable", "name": "assertionTimeToLive", - "overrides": null, - "scope": 592, + "scope": 842, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -4950,26 +4696,24 @@ "name": "uint256", "type": "uint256" }, - "id": 580, + "id": 830, "name": "ElementaryTypeName", - "src": "486:7:4" + "src": "494:7:7" } ], - "id": 581, + "id": 831, "name": "VariableDeclaration", - "src": "486:27:4" + "src": "494:27:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "numberOfEpochs", - "overrides": null, - "scope": 592, + "scope": 842, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -4978,26 +4722,24 @@ "name": "uint256", "type": "uint256" }, - "id": 582, + "id": 832, "name": "ElementaryTypeName", - "src": "517:7:4" + "src": "525:7:7" } ], - "id": 583, + "id": 833, "name": "VariableDeclaration", - "src": "517:22:4" + "src": "525:22:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "creationTime", - "overrides": null, - "scope": 592, + "scope": 842, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -5006,26 +4748,24 @@ "name": "uint256", "type": "uint256" }, - "id": 584, + "id": 834, "name": "ElementaryTypeName", - "src": "543:7:4" + "src": "551:7:7" } ], - "id": 585, + "id": 835, "name": "VariableDeclaration", - "src": "543:20:4" + "src": "551:20:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "issuer", - "overrides": null, - "scope": 592, + "scope": 842, "stateVariable": false, "storageLocation": "default", "type": "address", - "value": null, "visibility": "internal" }, "children": [ @@ -5035,26 +4775,24 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 586, + "id": 836, "name": "ElementaryTypeName", - "src": "567:7:4" + "src": "575:7:7" } ], - "id": 587, + "id": 837, "name": "VariableDeclaration", - "src": "567:14:4" + "src": "575:14:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "rootHash", - "overrides": null, - "scope": 592, + "scope": 842, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -5063,26 +4801,24 @@ "name": "bytes32", "type": "bytes32" }, - "id": 588, + "id": 838, "name": "ElementaryTypeName", - "src": "585:7:4" + "src": "593:7:7" } ], - "id": 589, + "id": 839, "name": "VariableDeclaration", - "src": "585:16:4" + "src": "593:16:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "data", - "overrides": null, - "scope": 592, + "scope": 842, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -5091,31 +4827,29 @@ "name": "bytes32", "type": "bytes32" }, - "id": 590, + "id": 840, "name": "ElementaryTypeName", - "src": "605:7:4" + "src": "613:7:7" } ], - "id": 591, + "id": 841, "name": "VariableDeclaration", - "src": "605:12:4" + "src": "613:12:7" } ], - "id": 592, + "id": 842, "name": "StructDefinition", - "src": "397:281:4" + "src": "405:281:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "assertionRecord", - "overrides": null, - "scope": 889, + "scope": 1139, "stateVariable": true, "storageLocation": "default", "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord)", - "value": null, "visibility": "internal" }, "children": [ @@ -5129,42 +4863,39 @@ "name": "bytes32", "type": "bytes32" }, - "id": 593, + "id": 843, "name": "ElementaryTypeName", - "src": "689:7:4" + "src": "697:7:7" }, { "attributes": { - "contractScope": null, "name": "AssertionRecord", - "referencedDeclaration": 592, + "referencedDeclaration": 842, "type": "struct DKGcontract.AssertionRecord" }, - "id": 594, + "id": 844, "name": "UserDefinedTypeName", - "src": "700:15:4" + "src": "708:15:7" } ], - "id": 595, + "id": 845, "name": "Mapping", - "src": "681:35:4" + "src": "689:35:7" } ], - "id": 596, + "id": 846, "name": "VariableDeclaration", - "src": "681:60:4" + "src": "689:60:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "assertionIssuer", - "overrides": null, - "scope": 889, + "scope": 1139, "stateVariable": true, "storageLocation": "default", "type": "mapping(bytes32 => address)", - "value": null, "visibility": "internal" }, "children": [ @@ -5178,9 +4909,9 @@ "name": "bytes32", "type": "bytes32" }, - "id": 597, + "id": 847, "name": "ElementaryTypeName", - "src": "810:7:4" + "src": "818:7:7" }, { "attributes": { @@ -5188,24 +4919,23 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 598, + "id": 848, "name": "ElementaryTypeName", - "src": "821:7:4" + "src": "829:7:7" } ], - "id": 599, + "id": 849, "name": "Mapping", - "src": "802:27:4" + "src": "810:27:7" } ], - "id": 600, + "id": 850, "name": "VariableDeclaration", - "src": "802:52:4" + "src": "810:52:7" }, { "attributes": { "anonymous": false, - "documentation": null, "name": "TokenAddressSet" }, "children": [ @@ -5217,12 +4947,10 @@ "indexed": true, "mutability": "mutable", "name": "token", - "overrides": null, - "scope": 604, + "scope": 854, "stateVariable": false, "storageLocation": "default", "type": "address", - "value": null, "visibility": "internal" }, "children": [ @@ -5232,29 +4960,28 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 601, + "id": 851, "name": "ElementaryTypeName", - "src": "934:7:4" + "src": "942:7:7" } ], - "id": 602, + "id": 852, "name": "VariableDeclaration", - "src": "934:21:4" + "src": "942:21:7" } ], - "id": 603, + "id": 853, "name": "ParameterList", - "src": "933:23:4" + "src": "941:23:7" } ], - "id": 604, + "id": 854, "name": "EventDefinition", - "src": "912:45:4" + "src": "920:45:7" }, { "attributes": { "anonymous": false, - "documentation": null, "name": "AssertionCreated" }, "children": [ @@ -5266,12 +4993,10 @@ "indexed": true, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 616, + "scope": 866, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -5280,14 +5005,14 @@ "name": "bytes32", "type": "bytes32" }, - "id": 605, + "id": 855, "name": "ElementaryTypeName", - "src": "982:7:4" + "src": "990:7:7" } ], - "id": 606, + "id": 856, "name": "VariableDeclaration", - "src": "982:27:4" + "src": "990:27:7" }, { "attributes": { @@ -5295,12 +5020,10 @@ "indexed": true, "mutability": "mutable", "name": "rootHash", - "overrides": null, - "scope": 616, + "scope": 866, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -5309,14 +5032,14 @@ "name": "bytes32", "type": "bytes32" }, - "id": 607, + "id": 857, "name": "ElementaryTypeName", - "src": "1011:7:4" + "src": "1019:7:7" } ], - "id": 608, + "id": 858, "name": "VariableDeclaration", - "src": "1011:24:4" + "src": "1019:24:7" }, { "attributes": { @@ -5324,12 +5047,10 @@ "indexed": true, "mutability": "mutable", "name": "assertionIssuer", - "overrides": null, - "scope": 616, + "scope": 866, "stateVariable": false, "storageLocation": "default", "type": "address", - "value": null, "visibility": "internal" }, "children": [ @@ -5339,14 +5060,14 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 609, + "id": 859, "name": "ElementaryTypeName", - "src": "1037:7:4" + "src": "1045:7:7" } ], - "id": 610, + "id": 860, "name": "VariableDeclaration", - "src": "1037:31:4" + "src": "1045:31:7" }, { "attributes": { @@ -5354,12 +5075,10 @@ "indexed": false, "mutability": "mutable", "name": "numberOfEpochs", - "overrides": null, - "scope": 616, + "scope": 866, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -5368,14 +5087,14 @@ "name": "uint256", "type": "uint256" }, - "id": 611, + "id": 861, "name": "ElementaryTypeName", - "src": "1070:7:4" + "src": "1078:7:7" } ], - "id": 612, + "id": 862, "name": "VariableDeclaration", - "src": "1070:22:4" + "src": "1078:22:7" }, { "attributes": { @@ -5383,12 +5102,10 @@ "indexed": false, "mutability": "mutable", "name": "assertionTimeToLive", - "overrides": null, - "scope": 616, + "scope": 866, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -5397,29 +5114,28 @@ "name": "uint256", "type": "uint256" }, - "id": 613, + "id": 863, "name": "ElementaryTypeName", - "src": "1094:7:4" + "src": "1102:7:7" } ], - "id": 614, + "id": 864, "name": "VariableDeclaration", - "src": "1094:27:4" + "src": "1102:27:7" } ], - "id": 615, + "id": 865, "name": "ParameterList", - "src": "981:141:4" + "src": "989:141:7" } ], - "id": 616, + "id": 866, "name": "EventDefinition", - "src": "959:164:4" + "src": "967:164:7" }, { "attributes": { "anonymous": false, - "documentation": null, "name": "TokensCollected" }, "children": [ @@ -5431,12 +5147,10 @@ "indexed": true, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 626, + "scope": 876, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -5445,14 +5159,14 @@ "name": "bytes32", "type": "bytes32" }, - "id": 617, + "id": 867, "name": "ElementaryTypeName", - "src": "1147:7:4" + "src": "1155:7:7" } ], - "id": 618, + "id": 868, "name": "VariableDeclaration", - "src": "1147:27:4" + "src": "1155:27:7" }, { "attributes": { @@ -5460,12 +5174,10 @@ "indexed": true, "mutability": "mutable", "name": "prover", - "overrides": null, - "scope": 626, + "scope": 876, "stateVariable": false, "storageLocation": "default", "type": "address", - "value": null, "visibility": "internal" }, "children": [ @@ -5475,14 +5187,14 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 619, + "id": 869, "name": "ElementaryTypeName", - "src": "1176:7:4" + "src": "1184:7:7" } ], - "id": 620, + "id": 870, "name": "VariableDeclaration", - "src": "1176:22:4" + "src": "1184:22:7" }, { "attributes": { @@ -5490,12 +5202,10 @@ "indexed": true, "mutability": "mutable", "name": "epoch", - "overrides": null, - "scope": 626, + "scope": 876, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -5504,14 +5214,14 @@ "name": "uint256", "type": "uint256" }, - "id": 621, + "id": 871, "name": "ElementaryTypeName", - "src": "1200:7:4" + "src": "1208:7:7" } ], - "id": 622, + "id": 872, "name": "VariableDeclaration", - "src": "1200:21:4" + "src": "1208:21:7" }, { "attributes": { @@ -5519,12 +5229,10 @@ "indexed": false, "mutability": "mutable", "name": "amount", - "overrides": null, - "scope": 626, + "scope": 876, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -5533,29 +5241,28 @@ "name": "uint256", "type": "uint256" }, - "id": 623, + "id": 873, "name": "ElementaryTypeName", - "src": "1223:7:4" + "src": "1231:7:7" } ], - "id": 624, + "id": 874, "name": "VariableDeclaration", - "src": "1223:14:4" + "src": "1231:14:7" } ], - "id": 625, + "id": 875, "name": "ParameterList", - "src": "1146:92:4" + "src": "1154:92:7" } ], - "id": 626, + "id": 876, "name": "EventDefinition", - "src": "1125:114:4" + "src": "1133:114:7" }, { "attributes": { "anonymous": false, - "documentation": null, "name": "VerificationFailed" }, "children": [ @@ -5567,12 +5274,10 @@ "indexed": true, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 634, + "scope": 884, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -5581,14 +5286,14 @@ "name": "bytes32", "type": "bytes32" }, - "id": 627, + "id": 877, "name": "ElementaryTypeName", - "src": "1266:7:4" + "src": "1274:7:7" } ], - "id": 628, + "id": 878, "name": "VariableDeclaration", - "src": "1266:27:4" + "src": "1274:27:7" }, { "attributes": { @@ -5596,12 +5301,10 @@ "indexed": true, "mutability": "mutable", "name": "prover", - "overrides": null, - "scope": 634, + "scope": 884, "stateVariable": false, "storageLocation": "default", "type": "address", - "value": null, "visibility": "internal" }, "children": [ @@ -5611,14 +5314,14 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 629, + "id": 879, "name": "ElementaryTypeName", - "src": "1295:7:4" + "src": "1303:7:7" } ], - "id": 630, + "id": 880, "name": "VariableDeclaration", - "src": "1295:22:4" + "src": "1303:22:7" }, { "attributes": { @@ -5626,12 +5329,10 @@ "indexed": true, "mutability": "mutable", "name": "epoch", - "overrides": null, - "scope": 634, + "scope": 884, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -5640,28 +5341,27 @@ "name": "uint256", "type": "uint256" }, - "id": 631, + "id": 881, "name": "ElementaryTypeName", - "src": "1319:7:4" + "src": "1327:7:7" } ], - "id": 632, + "id": 882, "name": "VariableDeclaration", - "src": "1319:21:4" + "src": "1327:21:7" } ], - "id": 633, + "id": 883, "name": "ParameterList", - "src": "1265:76:4" + "src": "1273:76:7" } ], - "id": 634, + "id": 884, "name": "EventDefinition", - "src": "1241:101:4" + "src": "1249:101:7" }, { "attributes": { - "documentation": null, "implemented": true, "isConstructor": true, "kind": "constructor", @@ -5669,8 +5369,7 @@ null ], "name": "", - "overrides": null, - "scope": 889, + "scope": 1139, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -5683,12 +5382,10 @@ "constant": false, "mutability": "mutable", "name": "token_address", - "overrides": null, - "scope": 663, + "scope": 913, "stateVariable": false, "storageLocation": "default", "type": "address", - "value": null, "visibility": "internal" }, "children": [ @@ -5698,19 +5395,19 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 635, + "id": 885, "name": "ElementaryTypeName", - "src": "1359:7:4" + "src": "1367:7:7" } ], - "id": 636, + "id": 886, "name": "VariableDeclaration", - "src": "1359:21:4" + "src": "1367:21:7" } ], - "id": 637, + "id": 887, "name": "ParameterList", - "src": "1358:23:4" + "src": "1366:23:7" }, { "attributes": { @@ -5719,9 +5416,9 @@ ] }, "children": [], - "id": 638, + "id": 888, "name": "ParameterList", - "src": "1390:0:4" + "src": "1398:0:7" }, { "children": [ @@ -5729,7 +5426,6 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -5752,20 +5448,19 @@ } ], "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, + "referencedDeclaration": 4294967278, "type": "function (bool) pure", "value": "require" }, - "id": 639, + "id": 889, "name": "Identifier", - "src": "1394:7:4" + "src": "1402:7:7" }, { "attributes": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" @@ -5780,21 +5475,19 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 636, + "referencedDeclaration": 886, "type": "address", "value": "token_address" }, - "id": 640, + "id": 890, "name": "Identifier", - "src": "1402:13:4" + "src": "1410:13:7" }, { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": true, @@ -5825,60 +5518,56 @@ "children": [ { "attributes": { - "name": "address", - "type": null + "name": "address" }, - "id": 641, + "id": 891, "name": "ElementaryTypeName", - "src": "1417:7:4" + "src": "1425:7:7" } ], - "id": 642, + "id": 892, "name": "ElementaryTypeNameExpression", - "src": "1417:7:4" + "src": "1425:7:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, - "id": 643, + "id": 893, "name": "Literal", - "src": "1425:1:4" + "src": "1433:1:7" } ], - "id": 644, + "id": 894, "name": "FunctionCall", - "src": "1417:10:4" + "src": "1425:10:7" } ], - "id": 645, + "id": 895, "name": "BinaryOperation", - "src": "1402:25:4" + "src": "1410:25:7" } ], - "id": 646, + "id": 896, "name": "FunctionCall", - "src": "1394:34:4" + "src": "1402:34:7" } ], - "id": 647, + "id": 897, "name": "ExpressionStatement", - "src": "1394:34:4" + "src": "1402:34:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -5889,21 +5578,19 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 577, + "referencedDeclaration": 827, "type": "contract IERC20", "value": "token" }, - "id": 648, + "id": 898, "name": "Identifier", - "src": "1432:5:4" + "src": "1440:5:7" }, { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -5928,48 +5615,46 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 542, + "referencedDeclaration": 676, "type": "type(contract IERC20)", "value": "IERC20" }, - "id": 649, + "id": 899, "name": "Identifier", - "src": "1440:6:4" + "src": "1448:6:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 636, + "referencedDeclaration": 886, "type": "address", "value": "token_address" }, - "id": 650, + "id": 900, "name": "Identifier", - "src": "1447:13:4" + "src": "1455:13:7" } ], - "id": 651, + "id": 901, "name": "FunctionCall", - "src": "1440:21:4" + "src": "1448:21:7" } ], - "id": 652, + "id": 902, "name": "Assignment", - "src": "1432:29:4" + "src": "1440:29:7" } ], - "id": 653, + "id": 903, "name": "ExpressionStatement", - "src": "1432:29:4" + "src": "1440:29:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -5980,47 +5665,44 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 579, + "referencedDeclaration": 829, "type": "address", "value": "TRAC_TOKEN_ADDRESS" }, - "id": 654, + "id": 904, "name": "Identifier", - "src": "1465:18:4" + "src": "1473:18:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 636, + "referencedDeclaration": 886, "type": "address", "value": "token_address" }, - "id": 655, + "id": 905, "name": "Identifier", - "src": "1486:13:4" + "src": "1494:13:7" } ], - "id": 656, + "id": 906, "name": "Assignment", - "src": "1465:34:4" + "src": "1473:34:7" } ], - "id": 657, + "id": 907, "name": "ExpressionStatement", - "src": "1465:34:4" + "src": "1473:34:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -6045,51 +5727,49 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 604, + "referencedDeclaration": 854, "type": "function (address)", "value": "TokenAddressSet" }, - "id": 658, + "id": 908, "name": "Identifier", - "src": "1511:15:4" + "src": "1519:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 636, + "referencedDeclaration": 886, "type": "address", "value": "token_address" }, - "id": 659, + "id": 909, "name": "Identifier", - "src": "1527:13:4" + "src": "1535:13:7" } ], - "id": 660, + "id": 910, "name": "FunctionCall", - "src": "1511:30:4" + "src": "1519:30:7" } ], - "id": 661, + "id": 911, "name": "EmitStatement", - "src": "1506:35:4" + "src": "1514:35:7" } ], - "id": 662, + "id": 912, "name": "Block", - "src": "1390:156:4" + "src": "1398:156:7" } ], - "id": 663, + "id": 913, "name": "FunctionDefinition", - "src": "1347:199:4" + "src": "1355:199:7" }, { "attributes": { - "documentation": null, "functionSelector": "73a77389", "implemented": true, "isConstructor": false, @@ -6098,8 +5778,7 @@ null ], "name": "createAssertionRecord", - "overrides": null, - "scope": 889, + "scope": 1139, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -6112,12 +5791,10 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 766, + "scope": 1016, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -6126,26 +5803,24 @@ "name": "bytes32", "type": "bytes32" }, - "id": 664, + "id": 914, "name": "ElementaryTypeName", - "src": "1590:7:4" + "src": "1598:7:7" } ], - "id": 665, + "id": 915, "name": "VariableDeclaration", - "src": "1590:19:4" + "src": "1598:19:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "rootHash", - "overrides": null, - "scope": 766, + "scope": 1016, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -6154,26 +5829,24 @@ "name": "bytes32", "type": "bytes32" }, - "id": 666, + "id": 916, "name": "ElementaryTypeName", - "src": "1611:7:4" + "src": "1619:7:7" } ], - "id": 667, + "id": 917, "name": "VariableDeclaration", - "src": "1611:16:4" + "src": "1619:16:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "numberOfEpochs", - "overrides": null, - "scope": 766, + "scope": 1016, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -6182,26 +5855,24 @@ "name": "uint256", "type": "uint256" }, - "id": 668, + "id": 918, "name": "ElementaryTypeName", - "src": "1629:7:4" + "src": "1637:7:7" } ], - "id": 669, + "id": 919, "name": "VariableDeclaration", - "src": "1629:22:4" + "src": "1637:22:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "assertionTimeToLive", - "overrides": null, - "scope": 766, + "scope": 1016, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -6210,19 +5881,19 @@ "name": "uint256", "type": "uint256" }, - "id": 670, + "id": 920, "name": "ElementaryTypeName", - "src": "1653:7:4" + "src": "1661:7:7" } ], - "id": 671, + "id": 921, "name": "VariableDeclaration", - "src": "1653:27:4" + "src": "1661:27:7" } ], - "id": 672, + "id": 922, "name": "ParameterList", - "src": "1589:92:4" + "src": "1597:92:7" }, { "attributes": { @@ -6231,9 +5902,9 @@ ] }, "children": [], - "id": 673, + "id": 923, "name": "ParameterList", - "src": "1689:0:4" + "src": "1697:0:7" }, { "children": [ @@ -6241,7 +5912,6 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -6268,20 +5938,19 @@ } ], "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, + "referencedDeclaration": 4294967278, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 674, + "id": 924, "name": "Identifier", - "src": "1693:7:4" + "src": "1701:7:7" }, { "attributes": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -6296,72 +5965,66 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 675, + "id": 925, "name": "Identifier", - "src": "1701:11:4" + "src": "1709:11:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, - "id": 676, + "id": 926, "name": "Literal", - "src": "1716:1:4" + "src": "1724:1:7" } ], - "id": 677, + "id": 927, "name": "BinaryOperation", - "src": "1701:16:4" + "src": "1709:16:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "617373657274696f6e494420686173682063616e6e6f74206265207a65726f", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "string", "type": "literal_string \"assertionID hash cannot be zero\"", "value": "assertionID hash cannot be zero" }, - "id": 678, + "id": 928, "name": "Literal", - "src": "1719:33:4" + "src": "1727:33:7" } ], - "id": 679, + "id": 929, "name": "FunctionCall", - "src": "1693:60:4" + "src": "1701:60:7" } ], - "id": 680, + "id": 930, "name": "ExpressionStatement", - "src": "1693:60:4" + "src": "1701:60:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -6388,20 +6051,19 @@ } ], "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, + "referencedDeclaration": 4294967278, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 681, + "id": 931, "name": "Identifier", - "src": "1757:7:4" + "src": "1765:7:7" }, { "attributes": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -6416,72 +6078,66 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 667, + "referencedDeclaration": 917, "type": "bytes32", "value": "rootHash" }, - "id": 682, + "id": 932, "name": "Identifier", - "src": "1765:8:4" + "src": "1773:8:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, - "id": 683, + "id": 933, "name": "Literal", - "src": "1777:1:4" + "src": "1785:1:7" } ], - "id": 684, + "id": 934, "name": "BinaryOperation", - "src": "1765:13:4" + "src": "1773:13:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "726f6f744861736820686173682063616e6e6f74206265207a65726f", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "string", "type": "literal_string \"rootHash hash cannot be zero\"", "value": "rootHash hash cannot be zero" }, - "id": 685, + "id": 935, "name": "Literal", - "src": "1780:30:4" + "src": "1788:30:7" } ], - "id": 686, + "id": 936, "name": "FunctionCall", - "src": "1757:54:4" + "src": "1765:54:7" } ], - "id": 687, + "id": 937, "name": "ExpressionStatement", - "src": "1757:54:4" + "src": "1765:54:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -6508,20 +6164,19 @@ } ], "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, + "referencedDeclaration": 4294967278, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 688, + "id": 938, "name": "Identifier", - "src": "1815:7:4" + "src": "1823:7:7" }, { "attributes": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6536,72 +6191,66 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 669, + "referencedDeclaration": 919, "type": "uint256", "value": "numberOfEpochs" }, - "id": 689, + "id": 939, "name": "Identifier", - "src": "1823:14:4" + "src": "1831:14:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, - "id": 690, + "id": 940, "name": "Literal", - "src": "1841:1:4" + "src": "1849:1:7" } ], - "id": 691, + "id": 941, "name": "BinaryOperation", - "src": "1823:19:4" + "src": "1831:19:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726f", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "string", "type": "literal_string \"numberOfEpochs hash cannot be zero\"", "value": "numberOfEpochs hash cannot be zero" }, - "id": 692, + "id": 942, "name": "Literal", - "src": "1844:36:4" + "src": "1852:36:7" } ], - "id": 693, + "id": 943, "name": "FunctionCall", - "src": "1815:66:4" + "src": "1823:66:7" } ], - "id": 694, + "id": 944, "name": "ExpressionStatement", - "src": "1815:66:4" + "src": "1823:66:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -6628,20 +6277,19 @@ } ], "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, + "referencedDeclaration": 4294967278, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 695, + "id": 945, "name": "Identifier", - "src": "1885:7:4" + "src": "1893:7:7" }, { "attributes": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6656,72 +6304,66 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 671, + "referencedDeclaration": 921, "type": "uint256", "value": "assertionTimeToLive" }, - "id": 696, + "id": 946, "name": "Identifier", - "src": "1893:19:4" + "src": "1901:19:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, - "id": 697, + "id": 947, "name": "Literal", - "src": "1916:1:4" + "src": "1924:1:7" } ], - "id": 698, + "id": 948, "name": "BinaryOperation", - "src": "1893:24:4" + "src": "1901:24:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "string", "type": "literal_string \"assertionTimeToLive hash cannot be zero\"", "value": "assertionTimeToLive hash cannot be zero" }, - "id": 699, + "id": 949, "name": "Literal", - "src": "1919:41:4" + "src": "1927:41:7" } ], - "id": 700, + "id": 950, "name": "FunctionCall", - "src": "1885:76:4" + "src": "1893:76:7" } ], - "id": 701, + "id": 951, "name": "ExpressionStatement", - "src": "1885:76:4" + "src": "1893:76:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -6748,20 +6390,19 @@ } ], "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, + "referencedDeclaration": 4294967278, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 702, + "id": 952, "name": "Identifier", - "src": "1965:7:4" + "src": "1973:7:7" }, { "attributes": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6776,19 +6417,17 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "member_name": "creationTime", - "referencedDeclaration": 585, + "referencedDeclaration": 835, "type": "uint256" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -6798,96 +6437,89 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 703, + "id": 953, "name": "Identifier", - "src": "1973:15:4" + "src": "1981:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 704, + "id": 954, "name": "Identifier", - "src": "1989:11:4" + "src": "1997:11:7" } ], - "id": 705, + "id": 955, "name": "IndexAccess", - "src": "1973:28:4" + "src": "1981:28:7" } ], - "id": 706, + "id": 956, "name": "MemberAccess", - "src": "1973:41:4" + "src": "1981:41:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, - "id": 707, + "id": 957, "name": "Literal", - "src": "2016:1:4" + "src": "2024:1:7" } ], - "id": 708, + "id": 958, "name": "BinaryOperation", - "src": "1973:44:4" + "src": "1981:44:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "417373657274696f6e20616c72656164792065786973747321", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "string", "type": "literal_string \"Assertion already exists!\"", "value": "Assertion already exists!" }, - "id": 709, + "id": 959, "name": "Literal", - "src": "2019:27:4" + "src": "2027:27:7" } ], - "id": 710, + "id": 960, "name": "FunctionCall", - "src": "1965:82:4" + "src": "1973:82:7" } ], - "id": 711, + "id": 961, "name": "ExpressionStatement", - "src": "1965:82:4" + "src": "1973:82:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -6898,19 +6530,17 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "member_name": "numberOfEpochs", - "referencedDeclaration": 583, + "referencedDeclaration": 833, "type": "uint256" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -6920,71 +6550,67 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 712, + "id": 962, "name": "Identifier", - "src": "2105:15:4" + "src": "2113:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 713, + "id": 963, "name": "Identifier", - "src": "2121:11:4" + "src": "2129:11:7" } ], - "id": 714, + "id": 964, "name": "IndexAccess", - "src": "2105:28:4" + "src": "2113:28:7" } ], - "id": 715, + "id": 965, "name": "MemberAccess", - "src": "2105:43:4" + "src": "2113:43:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 669, + "referencedDeclaration": 919, "type": "uint256", "value": "numberOfEpochs" }, - "id": 716, + "id": 966, "name": "Identifier", - "src": "2151:14:4" + "src": "2159:14:7" } ], - "id": 717, + "id": 967, "name": "Assignment", - "src": "2105:60:4" + "src": "2113:60:7" } ], - "id": 718, + "id": 968, "name": "ExpressionStatement", - "src": "2105:60:4" + "src": "2113:60:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -6995,19 +6621,17 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "member_name": "assertionTimeToLive", - "referencedDeclaration": 581, + "referencedDeclaration": 831, "type": "uint256" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -7017,71 +6641,67 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 719, + "id": 969, "name": "Identifier", - "src": "2169:15:4" + "src": "2177:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 720, + "id": 970, "name": "Identifier", - "src": "2185:11:4" + "src": "2193:11:7" } ], - "id": 721, + "id": 971, "name": "IndexAccess", - "src": "2169:28:4" + "src": "2177:28:7" } ], - "id": 722, + "id": 972, "name": "MemberAccess", - "src": "2169:48:4" + "src": "2177:48:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 671, + "referencedDeclaration": 921, "type": "uint256", "value": "assertionTimeToLive" }, - "id": 723, + "id": 973, "name": "Identifier", - "src": "2220:19:4" + "src": "2228:19:7" } ], - "id": 724, + "id": 974, "name": "Assignment", - "src": "2169:70:4" + "src": "2177:70:7" } ], - "id": 725, + "id": 975, "name": "ExpressionStatement", - "src": "2169:70:4" + "src": "2177:70:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -7092,19 +6712,17 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "member_name": "creationTime", - "referencedDeclaration": 585, + "referencedDeclaration": 835, "type": "uint256" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -7114,88 +6732,82 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 726, + "id": 976, "name": "Identifier", - "src": "2243:15:4" + "src": "2251:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 727, + "id": 977, "name": "Identifier", - "src": "2259:11:4" + "src": "2267:11:7" } ], - "id": 728, + "id": 978, "name": "IndexAccess", - "src": "2243:28:4" + "src": "2251:28:7" } ], - "id": 729, + "id": 979, "name": "MemberAccess", - "src": "2243:41:4" + "src": "2251:41:7" }, { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "timestamp", - "referencedDeclaration": null, "type": "uint256" }, "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": -4, + "referencedDeclaration": 4294967292, "type": "block", "value": "block" }, - "id": 730, + "id": 980, "name": "Identifier", - "src": "2287:5:4" + "src": "2295:5:7" } ], - "id": 731, + "id": 981, "name": "MemberAccess", - "src": "2287:15:4" + "src": "2295:15:7" } ], - "id": 732, + "id": 982, "name": "Assignment", - "src": "2243:59:4" + "src": "2251:59:7" } ], - "id": 733, + "id": 983, "name": "ExpressionStatement", - "src": "2243:59:4" + "src": "2251:59:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -7206,19 +6818,17 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "member_name": "rootHash", - "referencedDeclaration": 589, + "referencedDeclaration": 839, "type": "bytes32" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -7228,71 +6838,67 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 734, + "id": 984, "name": "Identifier", - "src": "2306:15:4" + "src": "2314:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 735, + "id": 985, "name": "Identifier", - "src": "2322:11:4" + "src": "2330:11:7" } ], - "id": 736, + "id": 986, "name": "IndexAccess", - "src": "2306:28:4" + "src": "2314:28:7" } ], - "id": 737, + "id": 987, "name": "MemberAccess", - "src": "2306:37:4" + "src": "2314:37:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 667, + "referencedDeclaration": 917, "type": "bytes32", "value": "rootHash" }, - "id": 738, + "id": 988, "name": "Identifier", - "src": "2346:8:4" + "src": "2354:8:7" } ], - "id": 739, + "id": 989, "name": "Assignment", - "src": "2306:48:4" + "src": "2314:48:7" } ], - "id": 740, + "id": 990, "name": "ExpressionStatement", - "src": "2306:48:4" + "src": "2314:48:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -7303,19 +6909,17 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "member_name": "issuer", - "referencedDeclaration": 587, + "referencedDeclaration": 837, "type": "address" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -7325,88 +6929,82 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 741, + "id": 991, "name": "Identifier", - "src": "2358:15:4" + "src": "2366:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 742, + "id": 992, "name": "Identifier", - "src": "2374:11:4" + "src": "2382:11:7" } ], - "id": 743, + "id": 993, "name": "IndexAccess", - "src": "2358:28:4" + "src": "2366:28:7" } ], - "id": 744, + "id": 994, "name": "MemberAccess", - "src": "2358:35:4" + "src": "2366:35:7" }, { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "sender", - "referencedDeclaration": null, "type": "address payable" }, "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": -15, + "referencedDeclaration": 4294967281, "type": "msg", "value": "msg" }, - "id": 745, + "id": 995, "name": "Identifier", - "src": "2396:3:4" + "src": "2404:3:7" } ], - "id": 746, + "id": 996, "name": "MemberAccess", - "src": "2396:10:4" + "src": "2404:10:7" } ], - "id": 747, + "id": 997, "name": "Assignment", - "src": "2358:48:4" + "src": "2366:48:7" } ], - "id": 748, + "id": 998, "name": "ExpressionStatement", - "src": "2358:48:4" + "src": "2366:48:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -7417,7 +7015,6 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -7427,83 +7024,77 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 600, + "referencedDeclaration": 850, "type": "mapping(bytes32 => address)", "value": "assertionIssuer" }, - "id": 749, + "id": 999, "name": "Identifier", - "src": "2410:15:4" + "src": "2418:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 750, + "id": 1000, "name": "Identifier", - "src": "2426:11:4" + "src": "2434:11:7" } ], - "id": 751, + "id": 1001, "name": "IndexAccess", - "src": "2410:28:4" + "src": "2418:28:7" }, { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "sender", - "referencedDeclaration": null, "type": "address payable" }, "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": -15, + "referencedDeclaration": 4294967281, "type": "msg", "value": "msg" }, - "id": 752, + "id": 1002, "name": "Identifier", - "src": "2441:3:4" + "src": "2449:3:7" } ], - "id": 753, + "id": 1003, "name": "MemberAccess", - "src": "2441:10:4" + "src": "2449:10:7" } ], - "id": 754, + "id": 1004, "name": "Assignment", - "src": "2410:41:4" + "src": "2418:41:7" } ], - "id": 755, + "id": 1005, "name": "ExpressionStatement", - "src": "2410:41:4" + "src": "2418:41:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -7544,124 +7135,116 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 616, + "referencedDeclaration": 866, "type": "function (bytes32,bytes32,address,uint256,uint256)", "value": "AssertionCreated" }, - "id": 756, + "id": 1006, "name": "Identifier", - "src": "2461:16:4" + "src": "2469:16:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 665, + "referencedDeclaration": 915, "type": "bytes32", "value": "assertionID" }, - "id": 757, + "id": 1007, "name": "Identifier", - "src": "2478:11:4" + "src": "2486:11:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 667, + "referencedDeclaration": 917, "type": "bytes32", "value": "rootHash" }, - "id": 758, + "id": 1008, "name": "Identifier", - "src": "2490:8:4" + "src": "2498:8:7" }, { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "sender", - "referencedDeclaration": null, "type": "address payable" }, "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": -15, + "referencedDeclaration": 4294967281, "type": "msg", "value": "msg" }, - "id": 759, + "id": 1009, "name": "Identifier", - "src": "2499:3:4" + "src": "2507:3:7" } ], - "id": 760, + "id": 1010, "name": "MemberAccess", - "src": "2499:10:4" + "src": "2507:10:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 669, + "referencedDeclaration": 919, "type": "uint256", "value": "numberOfEpochs" }, - "id": 761, + "id": 1011, "name": "Identifier", - "src": "2510:14:4" + "src": "2518:14:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 671, + "referencedDeclaration": 921, "type": "uint256", "value": "assertionTimeToLive" }, - "id": 762, + "id": 1012, "name": "Identifier", - "src": "2525:19:4" + "src": "2533:19:7" } ], - "id": 763, + "id": 1013, "name": "FunctionCall", - "src": "2461:84:4" + "src": "2469:84:7" } ], - "id": 764, + "id": 1014, "name": "EmitStatement", - "src": "2456:89:4" + "src": "2464:89:7" } ], - "id": 765, + "id": 1015, "name": "Block", - "src": "1689:860:4" + "src": "1697:860:7" } ], - "id": 766, + "id": 1016, "name": "FunctionDefinition", - "src": "1559:990:4" + "src": "1567:990:7" }, { "attributes": { - "documentation": null, "functionSelector": "ce64c643", "implemented": true, "isConstructor": false, @@ -7670,8 +7253,7 @@ null ], "name": "submitHoldingProof", - "overrides": null, - "scope": 889, + "scope": 1139, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -7684,12 +7266,10 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 812, + "scope": 1062, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -7698,26 +7278,24 @@ "name": "bytes32", "type": "bytes32" }, - "id": 767, + "id": 1017, "name": "ElementaryTypeName", - "src": "2592:7:4" + "src": "2600:7:7" } ], - "id": 768, + "id": 1018, "name": "VariableDeclaration", - "src": "2592:19:4" + "src": "2600:19:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "epochAssertionProof", - "overrides": null, - "scope": 812, + "scope": 1062, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -7726,26 +7304,24 @@ "name": "bytes32", "type": "bytes32" }, - "id": 769, + "id": 1019, "name": "ElementaryTypeName", - "src": "2613:7:4" + "src": "2621:7:7" } ], - "id": 770, + "id": 1020, "name": "VariableDeclaration", - "src": "2613:27:4" + "src": "2621:27:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "epochNumber", - "overrides": null, - "scope": 812, + "scope": 1062, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -7754,19 +7330,19 @@ "name": "uint256", "type": "uint256" }, - "id": 771, + "id": 1021, "name": "ElementaryTypeName", - "src": "2642:7:4" + "src": "2650:7:7" } ], - "id": 772, + "id": 1022, "name": "VariableDeclaration", - "src": "2642:19:4" + "src": "2650:19:7" } ], - "id": 773, + "id": 1023, "name": "ParameterList", - "src": "2591:71:4" + "src": "2599:71:7" }, { "attributes": { @@ -7775,9 +7351,9 @@ ] }, "children": [], - "id": 774, + "id": 1024, "name": "ParameterList", - "src": "2672:0:4" + "src": "2680:0:7" }, { "children": [ @@ -7785,7 +7361,6 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -7812,20 +7387,19 @@ } ], "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, + "referencedDeclaration": 4294967278, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 775, + "id": 1025, "name": "Identifier", - "src": "2676:7:4" + "src": "2684:7:7" }, { "attributes": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -7840,72 +7414,66 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 768, + "referencedDeclaration": 1018, "type": "bytes32", "value": "assertionID" }, - "id": 776, + "id": 1026, "name": "Identifier", - "src": "2684:11:4" + "src": "2692:11:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, - "id": 777, + "id": 1027, "name": "Literal", - "src": "2699:1:4" + "src": "2707:1:7" } ], - "id": 778, + "id": 1028, "name": "BinaryOperation", - "src": "2684:16:4" + "src": "2692:16:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "617373657274696f6e494420686173682063616e6e6f74206265207a65726f", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "string", "type": "literal_string \"assertionID hash cannot be zero\"", "value": "assertionID hash cannot be zero" }, - "id": 779, + "id": 1029, "name": "Literal", - "src": "2702:33:4" + "src": "2710:33:7" } ], - "id": 780, + "id": 1030, "name": "FunctionCall", - "src": "2676:60:4" + "src": "2684:60:7" } ], - "id": 781, + "id": 1031, "name": "ExpressionStatement", - "src": "2676:60:4" + "src": "2684:60:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -7932,20 +7500,19 @@ } ], "overloadedDeclarations": [ - -18, - -18 + 4294967278, + 4294967278 ], - "referencedDeclaration": -18, + "referencedDeclaration": 4294967278, "type": "function (bool,string memory) pure", "value": "require" }, - "id": 782, + "id": 1032, "name": "Identifier", - "src": "2740:7:4" + "src": "2748:7:7" }, { "attributes": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -7960,72 +7527,66 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 770, + "referencedDeclaration": 1020, "type": "bytes32", "value": "epochAssertionProof" }, - "id": 783, + "id": 1033, "name": "Identifier", - "src": "2748:19:4" + "src": "2756:19:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, - "id": 784, + "id": 1034, "name": "Literal", - "src": "2771:1:4" + "src": "2779:1:7" } ], - "id": 785, + "id": 1035, "name": "BinaryOperation", - "src": "2748:24:4" + "src": "2756:24:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "65706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "string", "type": "literal_string \"epochAssertionProof hash cannot be zero\"", "value": "epochAssertionProof hash cannot be zero" }, - "id": 786, + "id": 1036, "name": "Literal", - "src": "2774:41:4" + "src": "2782:41:7" } ], - "id": 787, + "id": 1037, "name": "FunctionCall", - "src": "2740:76:4" + "src": "2748:76:7" } ], - "id": 788, + "id": 1038, "name": "ExpressionStatement", - "src": "2740:76:4" + "src": "2748:76:7" }, { "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -8054,46 +7615,44 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 824, + "referencedDeclaration": 1074, "type": "function (bytes32,bytes32) returns (bool)", "value": "verifyAssertionProof" }, - "id": 789, + "id": 1039, "name": "Identifier", - "src": "2825:20:4" + "src": "2833:20:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 768, + "referencedDeclaration": 1018, "type": "bytes32", "value": "assertionID" }, - "id": 790, + "id": 1040, "name": "Identifier", - "src": "2846:11:4" + "src": "2854:11:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 770, + "referencedDeclaration": 1020, "type": "bytes32", "value": "epochAssertionProof" }, - "id": 791, + "id": 1041, "name": "Identifier", - "src": "2859:19:4" + "src": "2867:19:7" } ], - "id": 792, + "id": 1042, "name": "FunctionCall", - "src": "2825:54:4" + "src": "2833:54:7" }, { "children": [ @@ -8101,7 +7660,6 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -8138,104 +7696,97 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 626, + "referencedDeclaration": 876, "type": "function (bytes32,address,uint256,uint256)", "value": "TokensCollected" }, - "id": 793, + "id": 1043, "name": "Identifier", - "src": "2890:15:4" + "src": "2898:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 768, + "referencedDeclaration": 1018, "type": "bytes32", "value": "assertionID" }, - "id": 794, + "id": 1044, "name": "Identifier", - "src": "2906:11:4" + "src": "2914:11:7" }, { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "sender", - "referencedDeclaration": null, "type": "address payable" }, "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": -15, + "referencedDeclaration": 4294967281, "type": "msg", "value": "msg" }, - "id": 795, + "id": 1045, "name": "Identifier", - "src": "2918:3:4" + "src": "2926:3:7" } ], - "id": 796, + "id": 1046, "name": "MemberAccess", - "src": "2918:10:4" + "src": "2926:10:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 772, + "referencedDeclaration": 1022, "type": "uint256", "value": "epochNumber" }, - "id": 797, + "id": 1047, "name": "Identifier", - "src": "2929:11:4" + "src": "2937:11:7" }, { "attributes": { - "argumentTypes": null, "hexvalue": "313233", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "number", "type": "int_const 123", "value": "123" }, - "id": 798, + "id": 1048, "name": "Literal", - "src": "2942:3:4" + "src": "2950:3:7" } ], - "id": 799, + "id": 1049, "name": "FunctionCall", - "src": "2890:56:4" + "src": "2898:56:7" } ], - "id": 800, + "id": 1050, "name": "EmitStatement", - "src": "2885:61:4" + "src": "2893:61:7" } ], - "id": 801, + "id": 1051, "name": "Block", - "src": "2880:72:4" + "src": "2888:72:7" }, { "children": [ @@ -8243,7 +7794,6 @@ "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, @@ -8276,106 +7826,100 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 634, + "referencedDeclaration": 884, "type": "function (bytes32,address,uint256)", "value": "VerificationFailed" }, - "id": 802, + "id": 1052, "name": "Identifier", - "src": "2969:18:4" + "src": "2977:18:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 768, + "referencedDeclaration": 1018, "type": "bytes32", "value": "assertionID" }, - "id": 803, + "id": 1053, "name": "Identifier", - "src": "2988:11:4" + "src": "2996:11:7" }, { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "sender", - "referencedDeclaration": null, "type": "address payable" }, "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": -15, + "referencedDeclaration": 4294967281, "type": "msg", "value": "msg" }, - "id": 804, + "id": 1054, "name": "Identifier", - "src": "3000:3:4" + "src": "3008:3:7" } ], - "id": 805, + "id": 1055, "name": "MemberAccess", - "src": "3000:10:4" + "src": "3008:10:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 772, + "referencedDeclaration": 1022, "type": "uint256", "value": "epochNumber" }, - "id": 806, + "id": 1056, "name": "Identifier", - "src": "3011:11:4" + "src": "3019:11:7" } ], - "id": 807, + "id": 1057, "name": "FunctionCall", - "src": "2969:54:4" + "src": "2977:54:7" } ], - "id": 808, + "id": 1058, "name": "EmitStatement", - "src": "2964:59:4" + "src": "2972:59:7" } ], - "id": 809, + "id": 1059, "name": "Block", - "src": "2958:71:4" + "src": "2966:71:7" } ], - "id": 810, + "id": 1060, "name": "IfStatement", - "src": "2821:208:4" + "src": "2829:208:7" } ], - "id": 811, + "id": 1061, "name": "Block", - "src": "2672:361:4" + "src": "2680:361:7" } ], - "id": 812, + "id": 1062, "name": "FunctionDefinition", - "src": "2564:469:4" + "src": "2572:469:7" }, { "attributes": { - "documentation": null, "functionSelector": "193f9c7e", "implemented": true, "isConstructor": false, @@ -8384,8 +7928,7 @@ null ], "name": "verifyAssertionProof", - "overrides": null, - "scope": 889, + "scope": 1139, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -8398,12 +7941,10 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 824, + "scope": 1074, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -8412,26 +7953,24 @@ "name": "bytes32", "type": "bytes32" }, - "id": 813, + "id": 1063, "name": "ElementaryTypeName", - "src": "3068:7:4" + "src": "3076:7:7" } ], - "id": 814, + "id": 1064, "name": "VariableDeclaration", - "src": "3068:19:4" + "src": "3076:19:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "epochAssertionProof", - "overrides": null, - "scope": 824, + "scope": 1074, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -8440,19 +7979,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 815, + "id": 1065, "name": "ElementaryTypeName", - "src": "3089:7:4" + "src": "3097:7:7" } ], - "id": 816, + "id": 1066, "name": "VariableDeclaration", - "src": "3089:27:4" + "src": "3097:27:7" } ], - "id": 817, + "id": 1067, "name": "ParameterList", - "src": "3067:50:4" + "src": "3075:50:7" }, { "children": [ @@ -8461,12 +8000,10 @@ "constant": false, "mutability": "mutable", "name": "proofValid", - "overrides": null, - "scope": 824, + "scope": 1074, "stateVariable": false, "storageLocation": "default", "type": "bool", - "value": null, "visibility": "internal" }, "children": [ @@ -8475,62 +8012,59 @@ "name": "bool", "type": "bool" }, - "id": 818, + "id": 1068, "name": "ElementaryTypeName", - "src": "3136:4:4" + "src": "3144:4:7" } ], - "id": 819, + "id": 1069, "name": "VariableDeclaration", - "src": "3136:15:4" + "src": "3144:15:7" } ], - "id": 820, + "id": 1070, "name": "ParameterList", - "src": "3135:17:4" + "src": "3143:17:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 820 + "functionReturnParameters": 1070 }, "children": [ { "attributes": { - "argumentTypes": null, "hexvalue": "74727565", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, - "subdenomination": null, "token": "bool", "type": "bool", "value": "true" }, - "id": 821, + "id": 1071, "name": "Literal", - "src": "3163:4:4" + "src": "3171:4:7" } ], - "id": 822, + "id": 1072, "name": "Return", - "src": "3156:11:4" + "src": "3164:11:7" } ], - "id": 823, + "id": 1073, "name": "Block", - "src": "3152:20:4" + "src": "3160:20:7" } ], - "id": 824, + "id": 1074, "name": "FunctionDefinition", - "src": "3038:134:4" + "src": "3046:134:7" }, { "attributes": { - "documentation": null, "functionSelector": "0828e9f3", "implemented": true, "isConstructor": false, @@ -8539,8 +8073,7 @@ null ], "name": "getAssertionIssuer", - "overrides": null, - "scope": 889, + "scope": 1139, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -8553,12 +8086,10 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 836, + "scope": 1086, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -8567,19 +8098,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 825, + "id": 1075, "name": "ElementaryTypeName", - "src": "3205:7:4" + "src": "3213:7:7" } ], - "id": 826, + "id": 1076, "name": "VariableDeclaration", - "src": "3205:19:4" + "src": "3213:19:7" } ], - "id": 827, + "id": 1077, "name": "ParameterList", - "src": "3204:21:4" + "src": "3212:21:7" }, { "children": [ @@ -8588,12 +8119,10 @@ "constant": false, "mutability": "mutable", "name": "creator", - "overrides": null, - "scope": 836, + "scope": 1086, "stateVariable": false, "storageLocation": "default", "type": "address", - "value": null, "visibility": "internal" }, "children": [ @@ -8603,30 +8132,29 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 828, + "id": 1078, "name": "ElementaryTypeName", - "src": "3247:7:4" + "src": "3255:7:7" } ], - "id": 829, + "id": 1079, "name": "VariableDeclaration", - "src": "3247:15:4" + "src": "3255:15:7" } ], - "id": 830, + "id": 1080, "name": "ParameterList", - "src": "3246:17:4" + "src": "3254:17:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 830 + "functionReturnParameters": 1080 }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -8636,55 +8164,52 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 600, + "referencedDeclaration": 850, "type": "mapping(bytes32 => address)", "value": "assertionIssuer" }, - "id": 831, + "id": 1081, "name": "Identifier", - "src": "3274:15:4" + "src": "3282:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 826, + "referencedDeclaration": 1076, "type": "bytes32", "value": "assertionID" }, - "id": 832, + "id": 1082, "name": "Identifier", - "src": "3290:11:4" + "src": "3298:11:7" } ], - "id": 833, + "id": 1083, "name": "IndexAccess", - "src": "3274:28:4" + "src": "3282:28:7" } ], - "id": 834, + "id": 1084, "name": "Return", - "src": "3267:35:4" + "src": "3275:35:7" } ], - "id": 835, + "id": 1085, "name": "Block", - "src": "3263:43:4" + "src": "3271:43:7" } ], - "id": 836, + "id": 1086, "name": "FunctionDefinition", - "src": "3177:129:4" + "src": "3185:129:7" }, { "attributes": { - "documentation": null, "functionSelector": "b934b4e4", "implemented": true, "isConstructor": false, @@ -8693,8 +8218,7 @@ null ], "name": "getAssertionRootHash", - "overrides": null, - "scope": 889, + "scope": 1139, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -8707,12 +8231,10 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 849, + "scope": 1099, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -8721,19 +8243,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 837, + "id": 1087, "name": "ElementaryTypeName", - "src": "3338:7:4" + "src": "3346:7:7" } ], - "id": 838, + "id": 1088, "name": "VariableDeclaration", - "src": "3338:19:4" + "src": "3346:19:7" } ], - "id": 839, + "id": 1089, "name": "ParameterList", - "src": "3337:21:4" + "src": "3345:21:7" }, { "children": [ @@ -8742,12 +8264,10 @@ "constant": false, "mutability": "mutable", "name": "rootHash", - "overrides": null, - "scope": 849, + "scope": 1099, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -8756,42 +8276,40 @@ "name": "bytes32", "type": "bytes32" }, - "id": 840, + "id": 1090, "name": "ElementaryTypeName", - "src": "3380:7:4" + "src": "3388:7:7" } ], - "id": 841, + "id": 1091, "name": "VariableDeclaration", - "src": "3380:16:4" + "src": "3388:16:7" } ], - "id": 842, + "id": 1092, "name": "ParameterList", - "src": "3379:18:4" + "src": "3387:18:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 842 + "functionReturnParameters": 1092 }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "member_name": "rootHash", - "referencedDeclaration": 589, + "referencedDeclaration": 839, "type": "bytes32" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -8801,60 +8319,57 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 843, + "id": 1093, "name": "Identifier", - "src": "3408:15:4" + "src": "3416:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 838, + "referencedDeclaration": 1088, "type": "bytes32", "value": "assertionID" }, - "id": 844, + "id": 1094, "name": "Identifier", - "src": "3424:11:4" + "src": "3432:11:7" } ], - "id": 845, + "id": 1095, "name": "IndexAccess", - "src": "3408:28:4" + "src": "3416:28:7" } ], - "id": 846, + "id": 1096, "name": "MemberAccess", - "src": "3408:37:4" + "src": "3416:37:7" } ], - "id": 847, + "id": 1097, "name": "Return", - "src": "3401:44:4" + "src": "3409:44:7" } ], - "id": 848, + "id": 1098, "name": "Block", - "src": "3397:52:4" + "src": "3405:52:7" } ], - "id": 849, + "id": 1099, "name": "FunctionDefinition", - "src": "3308:141:4" + "src": "3316:141:7" }, { "attributes": { - "documentation": null, "functionSelector": "6988bc03", "implemented": true, "isConstructor": false, @@ -8863,8 +8378,7 @@ null ], "name": "getAssertionTimeToLive", - "overrides": null, - "scope": 889, + "scope": 1139, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -8877,12 +8391,10 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 862, + "scope": 1112, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -8891,19 +8403,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 850, + "id": 1100, "name": "ElementaryTypeName", - "src": "3483:7:4" + "src": "3491:7:7" } ], - "id": 851, + "id": 1101, "name": "VariableDeclaration", - "src": "3483:19:4" + "src": "3491:19:7" } ], - "id": 852, + "id": 1102, "name": "ParameterList", - "src": "3482:21:4" + "src": "3490:21:7" }, { "children": [ @@ -8912,12 +8424,10 @@ "constant": false, "mutability": "mutable", "name": "timeToLive", - "overrides": null, - "scope": 862, + "scope": 1112, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -8926,42 +8436,40 @@ "name": "uint256", "type": "uint256" }, - "id": 853, + "id": 1103, "name": "ElementaryTypeName", - "src": "3525:7:4" + "src": "3533:7:7" } ], - "id": 854, + "id": 1104, "name": "VariableDeclaration", - "src": "3525:18:4" + "src": "3533:18:7" } ], - "id": 855, + "id": 1105, "name": "ParameterList", - "src": "3524:20:4" + "src": "3532:20:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 855 + "functionReturnParameters": 1105 }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "member_name": "assertionTimeToLive", - "referencedDeclaration": 581, + "referencedDeclaration": 831, "type": "uint256" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -8971,60 +8479,57 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 856, + "id": 1106, "name": "Identifier", - "src": "3555:15:4" + "src": "3563:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 851, + "referencedDeclaration": 1101, "type": "bytes32", "value": "assertionID" }, - "id": 857, + "id": 1107, "name": "Identifier", - "src": "3571:11:4" + "src": "3579:11:7" } ], - "id": 858, + "id": 1108, "name": "IndexAccess", - "src": "3555:28:4" + "src": "3563:28:7" } ], - "id": 859, + "id": 1109, "name": "MemberAccess", - "src": "3555:48:4" + "src": "3563:48:7" } ], - "id": 860, + "id": 1110, "name": "Return", - "src": "3548:55:4" + "src": "3556:55:7" } ], - "id": 861, + "id": 1111, "name": "Block", - "src": "3544:63:4" + "src": "3552:63:7" } ], - "id": 862, + "id": 1112, "name": "FunctionDefinition", - "src": "3451:156:4" + "src": "3459:156:7" }, { "attributes": { - "documentation": null, "functionSelector": "9e50e72c", "implemented": true, "isConstructor": false, @@ -9033,8 +8538,7 @@ null ], "name": "getAssertionNumberOfEpochs", - "overrides": null, - "scope": 889, + "scope": 1139, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -9047,12 +8551,10 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 875, + "scope": 1125, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -9061,19 +8563,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 863, + "id": 1113, "name": "ElementaryTypeName", - "src": "3645:7:4" + "src": "3653:7:7" } ], - "id": 864, + "id": 1114, "name": "VariableDeclaration", - "src": "3645:19:4" + "src": "3653:19:7" } ], - "id": 865, + "id": 1115, "name": "ParameterList", - "src": "3644:21:4" + "src": "3652:21:7" }, { "children": [ @@ -9082,12 +8584,10 @@ "constant": false, "mutability": "mutable", "name": "numberOfEpochs", - "overrides": null, - "scope": 875, + "scope": 1125, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -9096,42 +8596,40 @@ "name": "uint256", "type": "uint256" }, - "id": 866, + "id": 1116, "name": "ElementaryTypeName", - "src": "3687:7:4" + "src": "3695:7:7" } ], - "id": 867, + "id": 1117, "name": "VariableDeclaration", - "src": "3687:22:4" + "src": "3695:22:7" } ], - "id": 868, + "id": 1118, "name": "ParameterList", - "src": "3686:24:4" + "src": "3694:24:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 868 + "functionReturnParameters": 1118 }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "member_name": "numberOfEpochs", - "referencedDeclaration": 583, + "referencedDeclaration": 833, "type": "uint256" }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, @@ -9141,60 +8639,57 @@ "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 596, + "referencedDeclaration": 846, "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 869, + "id": 1119, "name": "Identifier", - "src": "3721:15:4" + "src": "3729:15:7" }, { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": 864, + "referencedDeclaration": 1114, "type": "bytes32", "value": "assertionID" }, - "id": 870, + "id": 1120, "name": "Identifier", - "src": "3737:11:4" + "src": "3745:11:7" } ], - "id": 871, + "id": 1121, "name": "IndexAccess", - "src": "3721:28:4" + "src": "3729:28:7" } ], - "id": 872, + "id": 1122, "name": "MemberAccess", - "src": "3721:43:4" + "src": "3729:43:7" } ], - "id": 873, + "id": 1123, "name": "Return", - "src": "3714:50:4" + "src": "3722:50:7" } ], - "id": 874, + "id": 1124, "name": "Block", - "src": "3710:58:4" + "src": "3718:58:7" } ], - "id": 875, + "id": 1125, "name": "FunctionDefinition", - "src": "3609:159:4" + "src": "3617:159:7" }, { "attributes": { - "documentation": null, "functionSelector": "08c4933b", "implemented": true, "isConstructor": false, @@ -9203,8 +8698,7 @@ null ], "name": "getAssertionTask", - "overrides": null, - "scope": 889, + "scope": 1139, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -9217,12 +8711,10 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "overrides": null, - "scope": 888, + "scope": 1138, "stateVariable": false, "storageLocation": "default", "type": "bytes32", - "value": null, "visibility": "internal" }, "children": [ @@ -9231,26 +8723,24 @@ "name": "bytes32", "type": "bytes32" }, - "id": 876, + "id": 1126, "name": "ElementaryTypeName", - "src": "3797:7:4" + "src": "3805:7:7" } ], - "id": 877, + "id": 1127, "name": "VariableDeclaration", - "src": "3797:19:4" + "src": "3805:19:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "epoch", - "overrides": null, - "scope": 888, + "scope": 1138, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -9259,19 +8749,19 @@ "name": "uint256", "type": "uint256" }, - "id": 878, + "id": 1128, "name": "ElementaryTypeName", - "src": "3818:7:4" + "src": "3826:7:7" } ], - "id": 879, + "id": 1129, "name": "VariableDeclaration", - "src": "3818:13:4" + "src": "3826:13:7" } ], - "id": 880, + "id": 1130, "name": "ParameterList", - "src": "3796:36:4" + "src": "3804:36:7" }, { "children": [ @@ -9280,12 +8770,10 @@ "constant": false, "mutability": "mutable", "name": "task", - "overrides": null, - "scope": 888, + "scope": 1138, "stateVariable": false, "storageLocation": "default", "type": "uint256", - "value": null, "visibility": "internal" }, "children": [ @@ -9294,93 +8782,216 @@ "name": "uint256", "type": "uint256" }, - "id": 881, + "id": 1131, "name": "ElementaryTypeName", - "src": "3854:7:4" + "src": "3862:7:7" } ], - "id": 882, + "id": 1132, "name": "VariableDeclaration", - "src": "3854:12:4" + "src": "3862:12:7" } ], - "id": 883, + "id": 1133, "name": "ParameterList", - "src": "3853:14:4" + "src": "3861:14:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 883 + "functionReturnParameters": 1133 }, "children": [ { "attributes": { - "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "number", - "referencedDeclaration": null, "type": "uint256" }, "children": [ { "attributes": { - "argumentTypes": null, "overloadedDeclarations": [ null ], - "referencedDeclaration": -4, + "referencedDeclaration": 4294967292, "type": "block", "value": "block" }, - "id": 884, + "id": 1134, "name": "Identifier", - "src": "3878:5:4" + "src": "3886:5:7" } ], - "id": 885, + "id": 1135, "name": "MemberAccess", - "src": "3878:12:4" + "src": "3886:12:7" } ], - "id": 886, + "id": 1136, "name": "Return", - "src": "3871:19:4" + "src": "3879:19:7" } ], - "id": 887, + "id": 1137, "name": "Block", - "src": "3867:27:4" + "src": "3875:27:7" } ], - "id": 888, + "id": 1138, "name": "FunctionDefinition", - "src": "3771:123:4" + "src": "3779:123:7" } ], - "id": 889, + "id": 1139, "name": "ContractDefinition", - "src": "278:3619:4" + "src": "286:3619:7" } ], - "id": 890, + "id": 1140, "name": "SourceUnit", - "src": "0:3897:4" + "src": "0:3905:7" }, "compiler": { "name": "solc", - "version": "0.6.10+commit.00c0fcaf.Emscripten.clang" + "version": "0.7.6+commit.7338295f.Emscripten.clang" }, "networks": { "5777": { - "events": {}, + "events": { + "0x25e2604032d2f5a218a9bed084fc10fd98b83e3b86a79ba39c21409598425016": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "assertionID", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "rootHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "assertionIssuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "numberOfEpochs", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assertionTimeToLive", + "type": "uint256" + } + ], + "name": "AssertionCreated", + "type": "event" + }, + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + "0xd82cad5fdc98633445b90f806f2e1a61a5409f92187ee9cd87f1da18c9069266": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "TokenAddressSet", + "type": "event" + }, + "0xce001fcd900079c312eaa96f5c1c389ffe207eb41e90197f5a011668b58ef598": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "assertionID", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "prover", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokensCollected", + "type": "event" + }, + "0x37d4188105d31e43e2177257c4e9cc2c8eda5c0783943eb00abe942ac687b03a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "assertionID", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "prover", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "name": "VerificationFailed", + "type": "event" + } + }, "links": {}, "address": "0xF21dD87cFC5cF5D073398833AFe5EFC543b78a00", - "transactionHash": "0xed915941e83e5624793faeaed1f0581b5be71bcdde709289eb6c4ed6a043fd0a" + "transactionHash": "0x40a53672d00490972d444552be6eba8c4a68ce5ecad3d3acaad9228ba9a4e35b" }, "80001": { "events": { @@ -9516,9 +9127,10 @@ } }, "schemaVersion": "3.4.3", - "updatedAt": "2021-12-23T09:55:43.111Z", + "updatedAt": "2022-02-10T19:25:20.337Z", "networkType": "ethereum", "devdoc": { + "kind": "dev", "methods": { "owner()": { "details": "Returns the address of the current owner." @@ -9529,9 +9141,12 @@ "transferOwnership(address)": { "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." } - } + }, + "version": 1 }, "userdoc": { - "methods": {} + "kind": "user", + "methods": {}, + "version": 1 } } \ No newline at end of file diff --git a/build/contracts/Migrations.json b/build/contracts/Migrations.json index 6727ae351b..5d732743ac 100644 --- a/build/contracts/Migrations.json +++ b/build/contracts/Migrations.json @@ -943,11 +943,17 @@ "events": {}, "links": {}, "address": "0x209679fA3B658Cd0fC74473aF28243bfe78a9b12", - "transactionHash": "0xeaba4bcbd537b92540ba3d06eb9daa0a16cc2fedc6d64ef90a273d5f3fd5586a" + "transactionHash": "0x1b799766152a61bbf51ae5bdb6db5133b01f841d163789462be37a3109ad0eea" + }, + "80001": { + "events": {}, + "links": {}, + "address": "0x3Fb8427f61A41796C51547c31bF4353c46e893c9", + "transactionHash": "0x1b0b4954d56c9ca9871b090935c343c259e961ad1d4dba6a2e282dbc6ab78f76" } }, "schemaVersion": "3.4.3", - "updatedAt": "2021-10-13T16:08:56.529Z", + "updatedAt": "2022-02-10T19:25:20.343Z", "networkType": "ethereum", "devdoc": { "methods": {} diff --git a/build/contracts/OwnershipManager.json b/build/contracts/OwnershipManager.json new file mode 100644 index 0000000000..cec7335175 --- /dev/null +++ b/build/contracts/OwnershipManager.json @@ -0,0 +1,336 @@ +{ + "contractName": "OwnershipManager", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/OwnershipManager.sol\":\"OwnershipManager\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/access/Ownable.sol\":{\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://90faf5851c02f9bd42c5bfb54d4f0421a2612f50ab80b2c4fa24fa3792071cc2\",\"dweb:/ipfs/QmRGM4F2PcGVF85aTfaA9YBhCHHDqrMhRjyp6fGeBTtirb\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"openzeppelin-solidity/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"project:/contracts/OwnershipManager.sol\":{\"keccak256\":\"0x570d800b1b8776b23b77d321fdab6039bf6de5fc3a6de0bb50219a377628d938\",\"urls\":[\"bzz-raw://2cf952585eb410131dc12194b0b1d723e58460e21771b467cf194625944893b9\",\"dweb:/ipfs/QmSn4qPACeesyUfmX62PRxPybT9BpDkfZYZURRes9Tk3W7\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060006100216100c460201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506100cc565b600033905090565b6104b4806100db6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063715018a6146100465780638da5cb5b14610050578063f2fde38b14610084575b600080fd5b61004e6100c8565b005b610058610235565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100c66004803603602081101561009a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061025e565b005b6100d0610450565b73ffffffffffffffffffffffffffffffffffffffff166100ee610235565b73ffffffffffffffffffffffffffffffffffffffff1614610177576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610266610450565b73ffffffffffffffffffffffffffffffffffffffff16610284610235565b73ffffffffffffffffffffffffffffffffffffffff161461030d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610393576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806104596026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220141485366582a37247111ce5b44ad760103bfb49b7dce80602b04f6fd51dade664736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063715018a6146100465780638da5cb5b14610050578063f2fde38b14610084575b600080fd5b61004e6100c8565b005b610058610235565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100c66004803603602081101561009a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061025e565b005b6100d0610450565b73ffffffffffffffffffffffffffffffffffffffff166100ee610235565b73ffffffffffffffffffffffffffffffffffffffff1614610177576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610266610450565b73ffffffffffffffffffffffffffffffffffffffff16610284610235565b73ffffffffffffffffffffffffffffffffffffffff161461030d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610393576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806104596026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220141485366582a37247111ce5b44ad760103bfb49b7dce80602b04f6fd51dade664736f6c63430007060033", + "immutableReferences": {}, + "generatedSources": [], + "deployedGeneratedSources": [], + "sourceMap": "220:41:8:-:0;;;;;;;;;;;;;884:17:0;904:12;:10;;;:12;;:::i;:::-;884:32;;935:9;926:6;;:18;;;;;;;;;;;;;;;;;;992:9;959:43;;988:1;959:43;;;;;;;;;;;;850:159;220:41:8;;598:104:6;651:15;685:10;678:17;;598:104;:::o;220:41:8:-;;;;;;;", + "deployedSourceMap": "220:41:8:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1717:145:0;;;:::i;:::-;;1085:85;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;2011:240;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1717:145;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1823:1:::1;1786:40;;1807:6;::::0;::::1;;;;;;;;1786:40;;;;;;;;;;;;1853:1;1836:6:::0;::::1;:19;;;;;;;;;;;;;;;;;;1717:145::o:0;1085:85::-;1131:7;1157:6;;;;;;;;;;;1150:13;;1085:85;:::o;2011:240::-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2119:1:::1;2099:22;;:8;:22;;;;2091:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2208:8;2179:38;;2200:6;::::0;::::1;;;;;;;;2179:38;;;;;;;;;;;;2236:8;2227:6;::::0;:17:::1;;;;;;;;;;;;;;;;;;2011:240:::0;:::o;598:104:6:-;651:15;685:10;678:17;;598:104;:::o", + "source": "pragma solidity >=0.6.0 <0.8.0;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/access/Ownable.sol\";\n\ncontract OwnershipManager is Ownable {\n\n}", + "sourcePath": "/Users/miloskotlar/dkg-onchain-module-v6/contracts/OwnershipManager.sol", + "ast": { + "absolutePath": "project:/contracts/OwnershipManager.sol", + "exportedSymbols": { + "Context": [ + 815 + ], + "IERC20": [ + 676 + ], + "Ownable": [ + 109 + ], + "OwnershipManager": [ + 1147 + ], + "SafeMath": [ + 476 + ] + }, + "id": 1148, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1141, + "literals": [ + "solidity", + ">=", + "0.6", + ".0", + "<", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:31:8" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "id": 1142, + "nodeType": "ImportDirective", + "scope": 1148, + "sourceUnit": 677, + "src": "33:64:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "id": 1143, + "nodeType": "ImportDirective", + "scope": 1148, + "sourceUnit": 477, + "src": "98:59:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/access/Ownable.sol", + "file": "openzeppelin-solidity/contracts/access/Ownable.sol", + "id": 1144, + "nodeType": "ImportDirective", + "scope": 1148, + "sourceUnit": 110, + "src": "158:60:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1145, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 109, + "src": "249:7:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$109", + "typeString": "contract Ownable" + } + }, + "id": 1146, + "nodeType": "InheritanceSpecifier", + "src": "249:7:8" + } + ], + "contractDependencies": [ + 109, + 815 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 1147, + "linearizedBaseContracts": [ + 1147, + 109, + 815 + ], + "name": "OwnershipManager", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 1148, + "src": "220:41:8" + } + ], + "src": "0:261:8" + }, + "legacyAST": { + "attributes": { + "absolutePath": "project:/contracts/OwnershipManager.sol", + "exportedSymbols": { + "Context": [ + 815 + ], + "IERC20": [ + 676 + ], + "Ownable": [ + 109 + ], + "OwnershipManager": [ + 1147 + ], + "SafeMath": [ + 476 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + ">=", + "0.6", + ".0", + "<", + "0.8", + ".0" + ] + }, + "id": 1141, + "name": "PragmaDirective", + "src": "0:31:8" + }, + { + "attributes": { + "SourceUnit": 677, + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "scope": 1148, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1142, + "name": "ImportDirective", + "src": "33:64:8" + }, + { + "attributes": { + "SourceUnit": 477, + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "scope": 1148, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1143, + "name": "ImportDirective", + "src": "98:59:8" + }, + { + "attributes": { + "SourceUnit": 110, + "absolutePath": "openzeppelin-solidity/contracts/access/Ownable.sol", + "file": "openzeppelin-solidity/contracts/access/Ownable.sol", + "scope": 1148, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1144, + "name": "ImportDirective", + "src": "158:60:8" + }, + { + "attributes": { + "abstract": false, + "contractDependencies": [ + 109, + 815 + ], + "contractKind": "contract", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 1147, + 109, + 815 + ], + "name": "OwnershipManager", + "nodes": [ + null + ], + "scope": 1148 + }, + "children": [ + { + "attributes": {}, + "children": [ + { + "attributes": { + "name": "Ownable", + "referencedDeclaration": 109, + "type": "contract Ownable" + }, + "id": 1145, + "name": "UserDefinedTypeName", + "src": "249:7:8" + } + ], + "id": 1146, + "name": "InheritanceSpecifier", + "src": "249:7:8" + } + ], + "id": 1147, + "name": "ContractDefinition", + "src": "220:41:8" + } + ], + "id": 1148, + "name": "SourceUnit", + "src": "0:261:8" + }, + "compiler": { + "name": "solc", + "version": "0.7.6+commit.7338295f.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.4.3", + "updatedAt": "2022-02-10T14:48:30.729Z", + "devdoc": { + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/build/contracts/UAIRegistry.json b/build/contracts/UAIRegistry.json new file mode 100644 index 0000000000..a2386188a8 --- /dev/null +++ b/build/contracts/UAIRegistry.json @@ -0,0 +1,12966 @@ +{ + "contractName": "UAIRegistry", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "assertionRegistryAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "depositor", + "type": "address" + } + ], + "name": "TokensDepositedToAsset", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + } + ], + "name": "UAICreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "assertionRegistryAddress", + "type": "address" + } + ], + "name": "UAIRegistryInit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + } + ], + "name": "UAIUpdatedState", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "UAIstatus", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "assetRecords", + "outputs": [ + { + "internalType": "uint256", + "name": "creationTimestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "alsoKnownAs", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "_type", + "type": "uint8" + }, + { + "internalType": "address", + "name": "controller", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "assetStake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "_type", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "alsoKnownAs", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "rootHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "tokenAmount", + "type": "uint256" + } + ], + "name": "registerAsset", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "newStateCommitHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "rootHash", + "type": "bytes32" + } + ], + "name": "updateAssetState", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + } + ], + "name": "getAssetStateCommitHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + } + ], + "name": "getAssetController", + "outputs": [ + { + "internalType": "address", + "name": "controller", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + } + ], + "name": "getAssetAKA", + "outputs": [ + { + "internalType": "bytes32", + "name": "alsoKnownAs", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + } + ], + "name": "getAssetCreationTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "creationTimestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getAssertionRegistry", + "outputs": [ + { + "internalType": "address", + "name": "assertionRegistry", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + } + ], + "name": "depositTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"assertionRegistryAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"}],\"name\":\"TokensDepositedToAsset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"}],\"name\":\"UAICreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assertionRegistryAddress\",\"type\":\"address\"}],\"name\":\"UAIRegistryInit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"}],\"name\":\"UAIUpdatedState\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"UAIstatus\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"assetRecords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"creationTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"alsoKnownAs\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_type\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"controller\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"assetStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"depositTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAssertionRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"assertionRegistry\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"getAssetAKA\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"alsoKnownAs\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"getAssetController\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"controller\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"getAssetCreationTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"creationTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"getAssetStateCommitHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_type\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"alsoKnownAs\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"}],\"name\":\"registerAsset\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateCommitHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"name\":\"updateAssetState\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"depositTokens(uint256,bytes32)\":{\"details\":\"Deposits tokens in ``amount`` to specific ``UAI``\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/UAIRegistry.sol\":\"UAIRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/access/Ownable.sol\":{\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://90faf5851c02f9bd42c5bfb54d4f0421a2612f50ab80b2c4fa24fa3792071cc2\",\"dweb:/ipfs/QmRGM4F2PcGVF85aTfaA9YBhCHHDqrMhRjyp6fGeBTtirb\"]},\"openzeppelin-solidity/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd970f51e3a77790c2f02b5b1759827c3b897c3d98c407b3631e8af32e3dc93c\",\"dweb:/ipfs/QmPF85Amgbqjk3SNZKsPCsqCw8JfwYEPMnnhvMJUyX58je\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol\":{\"keccak256\":\"0x61321d2c86346045bf394885ee3afeecc65f9daad2694bc19110967588fd7b5d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1703b877203e0447ede72dcf73f1c4f2089b415bd1c44877904128a64fafed5b\",\"dweb:/ipfs/QmaZoYDo2FWtKcwCc9zuabU6zri8KV9xJrhU614d93sLid\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"openzeppelin-solidity/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0x2d99a0deb6648c34fbc66d6ac4a2d64798d7a5321b45624f6736fadc63da1962\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2dcdce5ede1e5e650d174ec0b35be7d47b6a50f30bc895ef0d9e59fb75052e45\",\"dweb:/ipfs/QmQ2XFsDLTYqfEdw7pYzHiGtFRY11yQm4b6ynYgKqDxeB8\"]},\"openzeppelin-solidity/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"project:/contracts/DKGcontract.sol\":{\"keccak256\":\"0xbcf9626ce20959efd101eb22aa1e3baf00e0f3174ea883e38e4fd60c09ce0b04\",\"urls\":[\"bzz-raw://d362a7308bfcdb308316868e5c31e43a38ea2f004523f0b32d4dbc44787d40ea\",\"dweb:/ipfs/QmbwTjuMNtaQRKKDzeK41EQmf1gChTso1dnGeYBrrfwVKF\"]},\"project:/contracts/UAIRegistry.sol\":{\"keccak256\":\"0xccc8c80e25573c2b05f01530713cb579e08b68786c40f955b628f61e5d4bd81c\",\"urls\":[\"bzz-raw://9179d4492b4f66b48e8a55741135ada16ee00baaa5994e97b3a94122fda3a517\",\"dweb:/ipfs/QmREpbCAB3z9m2Xsk5noZwaH9Wgh4b9zpfibJpYWJQwDir\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516119733803806119738339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050600061005e61027d60201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561013657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561017057600080fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f52db5c2cb9235be3e8a3fe47f4ec4bc55b5e28aa119b750b0e766b1cb00c9aa760405160405180910390a25050610285565b600033905090565b6116df806102946000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806377636d1d1161008c5780638da5cb5b116100665780638da5cb5b146103bf578063a9cd6a2d146103f3578063d15b223e14610449578063f2fde38b14610481576100ea565b806377636d1d146102ae57806378e98392146103065780637f58afc81461037d576100ea565b806334e5197b116100c857806334e5197b146101de57806352569b9d146102205780636f3a922914610262578063715018a6146102a4576100ea565b806309600fa6146100ef57806309added7146101665780632f1704bc146101aa575b600080fd5b61011b6004803603602081101561010557600080fd5b81019080803590602001909291905050506104c5565b604051808681526020018581526020018460ff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019550505050505060405180910390f35b6101926004803603602081101561017c57600080fd5b8101908080359060200190929190505050610528565b60405180821515815260200191505060405180910390f35b6101b2610548565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61020a600480360360208110156101f457600080fd5b8101908080359060200190929190505050610572565b6040518082815260200191505060405180910390f35b61024c6004803603602081101561023657600080fd5b810190808035906020019092919050505061058a565b6040518082815260200191505060405180910390f35b61028e6004803603602081101561027857600080fd5b81019080803590602001909291905050506105aa565b6040518082815260200191505060405180910390f35b6102ac6105ca565b005b6102da600480360360208110156102c457600080fd5b8101908080359060200190929190505050610737565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610367600480360360c081101561031c57600080fd5b8101908080359060200190929190803560ff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050610777565b6040518082815260200191505060405180910390f35b6103a96004803603602081101561039357600080fd5b8101908080359060200190929190505050610b53565b6040518082815260200191505060405180910390f35b6103c7610b73565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104336004803603606081101561040957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610b9c565b6040518082815260200191505060405180910390f35b61047f6004803603604081101561045f57600080fd5b810190808035906020019092919080359060200190929190505050610e19565b005b6104c36004803603602081101561049757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112b2565b005b60046020528060005260406000206000915090508060000154908060010154908060020160009054906101000a900460ff16908060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154905085565b60056020528060005260406000206000915054906101000a900460ff1681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60066020528060005260406000206000915090505481565b600060046000838152602001908152602001600020600301549050919050565b600060046000838152602001908152602001600020600101549050919050565b6105d26114a4565b73ffffffffffffffffffffffffffffffffffffffff166105f0610b73565b73ffffffffffffffffffffffffffffffffffffffff1614610679576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006004600083815260200190815260200160002060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060001b8714156107f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5541492063616e6e6f74206265207a65726f000000000000000000000000000081525060200191505060405180910390fd5b60038660ff161061084e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116686021913960400191505060405180910390fd5b6000801b8514156108c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f616c736f4b6e6f776e41732063616e6e6f74206265207a65726f00000000000081525060200191505060405180910390fd5b6000801b841415610940576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f7374617465436f6d6d6974486173682063616e6e6f74206265207a65726f000081525060200191505060405180910390fd5b600015156005600089815260200190815260200160002060009054906101000a900460ff1615151461097157600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373a7738985856001806040518563ffffffff1660e01b815260040180858152602001848152602001838152602001828152602001945050505050600060405180830381600087803b1580156109ff57600080fd5b505af1158015610a13573d6000803e3d6000fd5b50505050836004600089815260200190815260200160002060030181905550856004600089815260200190815260200160002060020160006101000a81548160ff021916908360ff160217905550846004600089815260200190815260200160002060010181905550336004600089815260200190815260200160002060020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555042600460008981526020019081526020016000206000018190555060016005600089815260200190815260200160002060006101000a81548160ff02191690831515021790555083877f2f87578a4aeec4a0b61bbcea1767fec00fa79a35cf600b258509e25acdaba8e760405160405180910390a38690509695505050505050565b600060046000838152602001908152602001600020600001549050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060001b841415610c17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5541492063616e6e6f74206265207a65726f000000000000000000000000000081525060200191505060405180910390fd5b600115156005600086815260200190815260200160002060009054906101000a900460ff16151514610cb1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4173736574206d7573742065786973740000000000000000000000000000000081525060200191505060405180910390fd5b6000801b831415610d0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116896021913960400191505060405180910390fd5b610d1784336114ac565b610d2057600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373a7738984846001806040518563ffffffff1660e01b815260040180858152602001848152602001838152602001828152602001945050505050600060405180830381600087803b158015610dae57600080fd5b505af1158015610dc2573d6000803e3d6000fd5b5050505082600460008681526020019081526020016000206003018190555082847fa83f066abfa07a77196c29bd4b7aab88f194feaa03d9769ec2ceccf6701d06de60405160405180910390a38390509392505050565b60008211610e8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f416d6f756e742063616e6e6f74206265207a65726f000000000000000000000081525060200191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610f3757600080fd5b505afa158015610f4b573d6000803e3d6000fd5b505050506040513d6020811015610f6157600080fd5b81019080805190602001909291905050501015610fc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603e815260200180611607603e913960400191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561105357600080fd5b505afa158015611067573d6000803e3d6000fd5b505050506040513d602081101561107d57600080fd5b810190808051906020019092919050505010156110e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d8152602001806115ca603d913960400191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561119857600080fd5b505af11580156111ac573d6000803e3d6000fd5b505050506040513d60208110156111c257600080fd5b810190808051906020019092919050505090508061122b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116456023913960400191505060405180910390fd5b61125183600660008581526020019081526020016000205461151b90919063ffffffff16565b60066000848152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff1683837f2460c4e801cd784222555963fc8a1f1497f9ce3b23446fa14da62d317098933360405160405180910390a4505050565b6112ba6114a4565b73ffffffffffffffffffffffffffffffffffffffff166112d8610b73565b73ffffffffffffffffffffffffffffffffffffffff1614611361576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806115a46026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b60006004600084815260200190815260200160002060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080828401905083811015611599576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737353656e6465722062616c616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e742153656e64657220616c6c6f77616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e74546f6b656e207472616e73616374696f6e20657865637574696f6e206661696c6564215f7479706520616c6c6f7765642076616c7565733a20302c312c322028574950296e65775374617465436f6d6d6974486173682063616e6e6f74206265207a65726fa2646970667358221220ba0992a1275bbde52e5ec43a9e876357a0b660ab7a8a9001a6dd6b975bbe94bf64736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806377636d1d1161008c5780638da5cb5b116100665780638da5cb5b146103bf578063a9cd6a2d146103f3578063d15b223e14610449578063f2fde38b14610481576100ea565b806377636d1d146102ae57806378e98392146103065780637f58afc81461037d576100ea565b806334e5197b116100c857806334e5197b146101de57806352569b9d146102205780636f3a922914610262578063715018a6146102a4576100ea565b806309600fa6146100ef57806309added7146101665780632f1704bc146101aa575b600080fd5b61011b6004803603602081101561010557600080fd5b81019080803590602001909291905050506104c5565b604051808681526020018581526020018460ff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019550505050505060405180910390f35b6101926004803603602081101561017c57600080fd5b8101908080359060200190929190505050610528565b60405180821515815260200191505060405180910390f35b6101b2610548565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61020a600480360360208110156101f457600080fd5b8101908080359060200190929190505050610572565b6040518082815260200191505060405180910390f35b61024c6004803603602081101561023657600080fd5b810190808035906020019092919050505061058a565b6040518082815260200191505060405180910390f35b61028e6004803603602081101561027857600080fd5b81019080803590602001909291905050506105aa565b6040518082815260200191505060405180910390f35b6102ac6105ca565b005b6102da600480360360208110156102c457600080fd5b8101908080359060200190929190505050610737565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610367600480360360c081101561031c57600080fd5b8101908080359060200190929190803560ff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050610777565b6040518082815260200191505060405180910390f35b6103a96004803603602081101561039357600080fd5b8101908080359060200190929190505050610b53565b6040518082815260200191505060405180910390f35b6103c7610b73565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104336004803603606081101561040957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610b9c565b6040518082815260200191505060405180910390f35b61047f6004803603604081101561045f57600080fd5b810190808035906020019092919080359060200190929190505050610e19565b005b6104c36004803603602081101561049757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112b2565b005b60046020528060005260406000206000915090508060000154908060010154908060020160009054906101000a900460ff16908060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154905085565b60056020528060005260406000206000915054906101000a900460ff1681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60066020528060005260406000206000915090505481565b600060046000838152602001908152602001600020600301549050919050565b600060046000838152602001908152602001600020600101549050919050565b6105d26114a4565b73ffffffffffffffffffffffffffffffffffffffff166105f0610b73565b73ffffffffffffffffffffffffffffffffffffffff1614610679576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006004600083815260200190815260200160002060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060001b8714156107f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5541492063616e6e6f74206265207a65726f000000000000000000000000000081525060200191505060405180910390fd5b60038660ff161061084e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116686021913960400191505060405180910390fd5b6000801b8514156108c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f616c736f4b6e6f776e41732063616e6e6f74206265207a65726f00000000000081525060200191505060405180910390fd5b6000801b841415610940576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f7374617465436f6d6d6974486173682063616e6e6f74206265207a65726f000081525060200191505060405180910390fd5b600015156005600089815260200190815260200160002060009054906101000a900460ff1615151461097157600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373a7738985856001806040518563ffffffff1660e01b815260040180858152602001848152602001838152602001828152602001945050505050600060405180830381600087803b1580156109ff57600080fd5b505af1158015610a13573d6000803e3d6000fd5b50505050836004600089815260200190815260200160002060030181905550856004600089815260200190815260200160002060020160006101000a81548160ff021916908360ff160217905550846004600089815260200190815260200160002060010181905550336004600089815260200190815260200160002060020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555042600460008981526020019081526020016000206000018190555060016005600089815260200190815260200160002060006101000a81548160ff02191690831515021790555083877f2f87578a4aeec4a0b61bbcea1767fec00fa79a35cf600b258509e25acdaba8e760405160405180910390a38690509695505050505050565b600060046000838152602001908152602001600020600001549050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060001b841415610c17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5541492063616e6e6f74206265207a65726f000000000000000000000000000081525060200191505060405180910390fd5b600115156005600086815260200190815260200160002060009054906101000a900460ff16151514610cb1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4173736574206d7573742065786973740000000000000000000000000000000081525060200191505060405180910390fd5b6000801b831415610d0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116896021913960400191505060405180910390fd5b610d1784336114ac565b610d2057600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373a7738984846001806040518563ffffffff1660e01b815260040180858152602001848152602001838152602001828152602001945050505050600060405180830381600087803b158015610dae57600080fd5b505af1158015610dc2573d6000803e3d6000fd5b5050505082600460008681526020019081526020016000206003018190555082847fa83f066abfa07a77196c29bd4b7aab88f194feaa03d9769ec2ceccf6701d06de60405160405180910390a38390509392505050565b60008211610e8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f416d6f756e742063616e6e6f74206265207a65726f000000000000000000000081525060200191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610f3757600080fd5b505afa158015610f4b573d6000803e3d6000fd5b505050506040513d6020811015610f6157600080fd5b81019080805190602001909291905050501015610fc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603e815260200180611607603e913960400191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561105357600080fd5b505afa158015611067573d6000803e3d6000fd5b505050506040513d602081101561107d57600080fd5b810190808051906020019092919050505010156110e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d8152602001806115ca603d913960400191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561119857600080fd5b505af11580156111ac573d6000803e3d6000fd5b505050506040513d60208110156111c257600080fd5b810190808051906020019092919050505090508061122b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116456023913960400191505060405180910390fd5b61125183600660008581526020019081526020016000205461151b90919063ffffffff16565b60066000848152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff1683837f2460c4e801cd784222555963fc8a1f1497f9ce3b23446fa14da62d317098933360405160405180910390a4505050565b6112ba6114a4565b73ffffffffffffffffffffffffffffffffffffffff166112d8610b73565b73ffffffffffffffffffffffffffffffffffffffff1614611361576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806115a46026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b60006004600084815260200190815260200160002060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080828401905083811015611599576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737353656e6465722062616c616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e742153656e64657220616c6c6f77616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e74546f6b656e207472616e73616374696f6e20657865637574696f6e206661696c6564215f7479706520616c6c6f7765642076616c7565733a20302c312c322028574950296e65775374617465436f6d6d6974486173682063616e6e6f74206265207a65726fa2646970667358221220ba0992a1275bbde52e5ec43a9e876357a0b660ab7a8a9001a6dd6b975bbe94bf64736f6c63430007060033", + "immutableReferences": {}, + "generatedSources": [], + "deployedGeneratedSources": [], + "sourceMap": "623:4950:8:-:0;;;1526:365;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;884:17:0;904:12;:10;;;:12;;:::i;:::-;884:32;;935:9;926:6;;:18;;;;;;;;;;;;;;;;;;992:9;959:43;;988:1;959:43;;;;;;;;;;;;850:159;1636:1:8;1614:24;;:12;:24;;;;1606:33;;;;;;1685:1;1651:36;;:24;:36;;;;1643:45;;;;;;1708:12;1693:5;;:28;;;;;;;;;;;;;;;;;;1752:24;1725;;:51;;;;;;;;;;;;;;;;;;1812:24;1780:17;;:57;;;;;;;;;;;;;;;;;;1862:24;1846:41;;;;;;;;;;;;1526:365;;623:4950;;598:104:6;651:15;685:10;678:17;;598:104;:::o;623:4950:8:-;;;;;;;", + "deployedSourceMap": "623:4950:8:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1042:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1096:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;4095:117;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;1141:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3560:138;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3827:118;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1717:145:0;;;:::i;:::-;;3701:123:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;1894:1071;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3948:144;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1085:85:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;2970:574:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4792:776;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2011:240:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1042:51:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1096:41::-;;;;;;;;;;;;;;;;;;;;;;:::o;4095:117::-;4147:25;4184:24;;;;;;;;;;;4177:31;;4095:117;:::o;1141:45::-;;;;;;;;;;;;;;;;;:::o;3560:138::-;3626:23;3661:12;:17;3674:3;3661:17;;;;;;;;;;;:33;;;3654:40;;3560:138;;;:::o;3827:118::-;3881:19;3912:12;:17;3925:3;3912:17;;;;;;;;;;;:29;;;3905:36;;3827:118;;;:::o;1717:145:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1823:1:::1;1786:40;;1807:6;::::0;::::1;;;;;;;;1786:40;;;;;;;;;;;;1853:1;1836:6:::0;::::1;:19;;;;;;;;;;;;;;;;;;1717:145::o:0;3701:123:8:-;3762:18;3792:12;:17;3805:3;3792:17;;;;;;;;;;;:28;;;;;;;;;;;;3785:35;;3701:123;;;:::o;1894:1071::-;2044:7;2070:1;2065:6;;:3;:6;;2057:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2114:1;2106:5;:9;;;2098:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2178:1;2165:14;;:11;:14;;2157:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2239:1;2222:18;;:15;:18;;2214:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2305:5;2287:23;;:9;:14;2297:3;2287:14;;;;;;;;;;;;;;;;;;;;;:23;;;2279:33;;;;;;2472:17;;;;;;;;;;;:39;;;2512:15;2529:8;2539:1;2542;2472:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2628:15;2592:12;:17;2605:3;2592:17;;;;;;;;;;;:33;;:51;;;;2673:5;2647:12;:17;2660:3;2647:17;;;;;;;;;;;:23;;;:31;;;;;;;;;;;;;;;;;;2714:11;2682:12;:17;2695:3;2682:17;;;;;;;;;;;:29;;:43;;;;2760:10;2729:12;:17;2742:3;2729:17;;;;;;;;;;;:28;;;:41;;;;;;;;;;;;;;;;;;2864:15;2826:12;:17;2839:3;2826:17;;;;;;;;;;;:35;;:53;;;;2900:4;2883:9;:14;2893:3;2883:14;;;;;;;;;;;;:21;;;;;;;;;;;;;;;;;;2930:15;2925:3;2914:32;;;;;;;;;;2958:3;2951:10;;1894:1071;;;;;;;;:::o;3948:144::-;4016:25;4053:12;:17;4066:3;4053:17;;;;;;;;;;;:35;;;4046:42;;3948:144;;;:::o;1085:85:0:-;1131:7;1157:6;;;;;;;;;;;1150:13;;1085:85;:::o;2970:574:8:-;3071:7;3098:1;3093:6;;:3;:6;;3085:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3152:4;3134:22;;:9;:14;3144:3;3134:14;;;;;;;;;;;;;;;;;;;;;:22;;;3126:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3210:1;3190:21;;:18;:21;;3182:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3261:23;3269:3;3273:10;3261:7;:23::i;:::-;3253:32;;;;;;3292:17;;;;;;;;;;;:39;;;3332:18;3352:8;3362:1;3365;3292:75;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3418:18;3381:12;:17;3394:3;3381:17;;;;;;;;;;;:33;;:55;;;;3506:18;3501:3;3485:40;;;;;;;;;;3537:3;3530:10;;2970:574;;;;;:::o;4792:776::-;4875:1;4868:6;:8;4860:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4964:6;4918:5;;;;;;;;;;;:15;;;4934:10;4954:4;4918:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:52;;4910:127;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5084:6;5053:5;;;;;;;;;;;:15;;;5069:10;5053:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:37;;5045:111;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5165:23;5191:5;;;;;;;;;;;:18;;;5210:10;5230:4;5237:6;5191:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5165:79;;5260:18;5252:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5481:27;5501:6;5481:10;:15;5492:3;5481:15;;;;;;;;;;;;:19;;:27;;;;:::i;:::-;5463:10;:15;5474:3;5463:15;;;;;;;;;;;:45;;;;5552:10;5517:46;;5545:6;5540:3;5517:46;;;;;;;;;;4792:776;;;:::o;2011:240:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2119:1:::1;2099:22;;:8;:22;;;;2091:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2208:8;2179:38;;2200:6;::::0;::::1;;;;;;;;2179:38;;;;;;;;;;;;2236:8;2227:6;::::0;:17:::1;;;;;;;;;;;;;;;;;;2011:240:::0;:::o;598:104:6:-;651:15;685:10;678:17;;598:104;:::o;4581:129:8:-;4644:4;4674:12;:17;4687:3;4674:17;;;;;;;;;;;:28;;;;;;;;;;;;4665:37;;:5;:37;;;4658:44;;4581:129;;;;:::o;2690:175:2:-;2748:7;2767:9;2783:1;2779;:5;2767:17;;2807:1;2802;:6;;2794:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2857:1;2850:8;;;2690:175;;;;:::o", + "source": "pragma solidity >=0.6.0 <0.8.0;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC721/IERC721.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/access/Ownable.sol\";\nimport \"./DKGcontract.sol\";\n\n/*\n\nUAI/UALs essentially are:\n\n- DID/DID URLs native to the OriginTrail DKG\n- uniquely identify physical or digital assets (DID subjects)\n- have one or more \"owners\" (DID controllers)\n\nThe specification for UAI/UALs is currently WIP.\n\n*/\n\ncontract UAIRegistry is Ownable {\n\n\tenum AssetType{\n\t\tNative,\n\t\tERC721,\n\t\tERC1155\n\t}\n\n\tusing SafeMath for uint256;\n\tIERC20 token;\n\tDKGcontract AssertionRegistry;\n\taddress AssertionRegistryAddress;\n\n\tstruct AssetRecord{\n\t\tuint256 creationTimestamp;\n\t\tbytes32 alsoKnownAs; // alternative ID, as defined in DID-core spec, PoC address + tokenURI\n\t\tuint8 _type;\n\t\taddress controller; // tbd \n\t\tbytes32 stateCommitHash;\n\t}\n\n\tmapping(bytes32 => AssetRecord) public assetRecords;\n\tmapping(bytes32 => bool) public UAIstatus; \n\tmapping(bytes32 => uint256) public assetStake; \n\t\n\n\t// events\n\tevent UAIRegistryInit(address indexed assertionRegistryAddress);\n\tevent UAICreated(bytes32 indexed UAI, bytes32 indexed stateCommitHash);\n\tevent UAIUpdatedState(bytes32 indexed UAI, bytes32 indexed stateCommitHash );\n\tevent TokensDepositedToAsset(bytes32 indexed UAI, uint256 indexed amount, address indexed depositor);\n\n\tconstructor(address tokenAddress, address assertionRegistryAddress) public {\n\t\trequire(tokenAddress!=address(0));\n\t\trequire(assertionRegistryAddress!=address(0));\n\n\t\ttoken = IERC20(tokenAddress);\n\t\tAssertionRegistryAddress = assertionRegistryAddress;\n\t\tAssertionRegistry = DKGcontract(assertionRegistryAddress);\n\t\temit UAIRegistryInit(assertionRegistryAddress);\n\t}\n\n\tfunction registerAsset(bytes32 UAI, uint8 _type, bytes32 alsoKnownAs, bytes32 stateCommitHash, bytes32 rootHash, uint256 tokenAmount) public returns (bytes32){\n\n\t\trequire(UAI!=0, \"UAI cannot be zero\");\n\t\trequire(_type < 3, \"_type allowed values: 0,1,2 (WIP)\");\n\t\trequire(alsoKnownAs!=0, \"alsoKnownAs cannot be zero\");\n\t\trequire(stateCommitHash!=0, \"stateCommitHash cannot be zero\");\n\t\trequire(UAIstatus[UAI] == false ); // should not be possible to register existing asset again\n\n\t\t//bytes32 UAI = createUAI(_type,alsoKnownAs);\n\n\t\t// depositTokens(tokenAmount, UAI); // todo\n\n\t\tAssertionRegistry.createAssertionRecord(stateCommitHash, rootHash, 1, 1); // todo: update when DKGcontract is updated\n\t\tassetRecords[UAI].stateCommitHash = stateCommitHash;\n\t\tassetRecords[UAI]._type = _type;\n\t\tassetRecords[UAI].alsoKnownAs = alsoKnownAs;\n\t\tassetRecords[UAI].controller = msg.sender; // should update with AssetControllerProxy contract\n\t\tassetRecords[UAI].creationTimestamp = block.timestamp;\n\t\tUAIstatus[UAI] = true;\n\n\t\temit UAICreated(UAI, stateCommitHash);\n\n\t\treturn UAI;\n\t}\t\n\n\n\tfunction updateAssetState(bytes32 UAI, bytes32 newStateCommitHash, bytes32 rootHash) public returns (bytes32) {\n\n\t\trequire(UAI!=0, \"UAI cannot be zero\");\n\t\trequire(UAIstatus[UAI] == true, \"Asset must exist\" );\n\t\trequire(newStateCommitHash!=0, \"newStateCommitHash cannot be zero\");\n\t\trequire(isOwner(UAI,msg.sender));\n\t\t\n\t\tAssertionRegistry.createAssertionRecord(newStateCommitHash, rootHash, 1, 1); // UPDATE\n\t\tassetRecords[UAI].stateCommitHash = newStateCommitHash;\n\t\t// todo: store old commits somewhere\n\n\t\temit UAIUpdatedState(UAI, newStateCommitHash);\n\n\t\treturn UAI;\n\t}\n\n\n\t// getters\n\tfunction getAssetStateCommitHash(bytes32 UAI) public view returns(bytes32 stateCommitHash){\n\t\treturn assetRecords[UAI].stateCommitHash;\n\t}\n\n\tfunction getAssetController(bytes32 UAI) public view returns(address controller){\n\t\treturn assetRecords[UAI].controller;\n\t}\n\n\tfunction getAssetAKA(bytes32 UAI) public view returns(bytes32 alsoKnownAs){\n\t\treturn assetRecords[UAI].alsoKnownAs;\n\t}\n\n\tfunction getAssetCreationTimestamp(bytes32 UAI) public view returns(uint256 creationTimestamp){\n\t\treturn assetRecords[UAI].creationTimestamp;\n\t}\n\n\tfunction getAssertionRegistry() public view returns(address assertionRegistry){\n\t\treturn AssertionRegistryAddress;\n\t}\n\n\t// internal\n\n\n\t/**\n * @dev Should determine type of ``contractAddress``, if possible, returning enum AssetType\n */\n function determineType(address contractAddress, bytes32 id) internal returns (uint8){\n\t\treturn 0; // todo: implement detection of contract type\n\t}\n\n\t/**\n * @dev Returns bool checking if ``owner`` is controller of ``UAI``\n */\n function isOwner(bytes32 UAI, address owner) internal returns (bool) {\n \treturn owner == assetRecords[UAI].controller;\n }\n\n\t/**\n * @dev Deposits tokens in ``amount`` to specific ``UAI``\n */\n function depositTokens(uint256 amount, bytes32 UAI) public {\n\n \trequire(amount>0, \"Amount cannot be zero\");\n \trequire(token.allowance(msg.sender, address(this)) >= amount, \"Sender allowance must be equal to or higher than chosen amount\");\n \trequire(token.balanceOf(msg.sender) >= amount, \"Sender balance must be equal to or higher than chosen amount!\");\n\n \tbool transaction_result = token.transferFrom(msg.sender, address(this), amount);\n \trequire(transaction_result, \"Token transaction execution failed!\");\n\n\t\t// if (stake[msg.sender] == 0){\n\t\t// \tparticipant_indexes[msg.sender] = participants.length;\n\t\t// \tparticipants.push(msg.sender);\n\t\t// }\n\n\t\tassetStake[UAI] = assetStake[UAI].add(amount);\n\t\temit TokensDepositedToAsset(UAI, amount,msg.sender);\n\n\t}\t\n\n\n}", + "sourcePath": "/Users/miloskotlar/dkg-onchain-module-v6/contracts/UAIRegistry.sol", + "ast": { + "absolutePath": "project:/contracts/UAIRegistry.sol", + "exportedSymbols": { + "Context": [ + 815 + ], + "DKGcontract": [ + 1139 + ], + "IERC1155": [ + 598 + ], + "IERC165": [ + 121 + ], + "IERC20": [ + 676 + ], + "IERC721": [ + 792 + ], + "Ownable": [ + 109 + ], + "SafeMath": [ + 476 + ], + "UAIRegistry": [ + 1604 + ] + }, + "id": 1605, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1141, + "literals": [ + "solidity", + ">=", + "0.6", + ".0", + "<", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:31:8" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "id": 1142, + "nodeType": "ImportDirective", + "scope": 1605, + "sourceUnit": 677, + "src": "33:64:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC721/IERC721.sol", + "file": "openzeppelin-solidity/contracts/token/ERC721/IERC721.sol", + "id": 1143, + "nodeType": "ImportDirective", + "scope": 1605, + "sourceUnit": 793, + "src": "98:66:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol", + "file": "openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol", + "id": 1144, + "nodeType": "ImportDirective", + "scope": 1605, + "sourceUnit": 599, + "src": "165:68:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "id": 1145, + "nodeType": "ImportDirective", + "scope": 1605, + "sourceUnit": 477, + "src": "234:59:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "openzeppelin-solidity/contracts/access/Ownable.sol", + "file": "openzeppelin-solidity/contracts/access/Ownable.sol", + "id": 1146, + "nodeType": "ImportDirective", + "scope": 1605, + "sourceUnit": 110, + "src": "294:60:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "project:/contracts/DKGcontract.sol", + "file": "./DKGcontract.sol", + "id": 1147, + "nodeType": "ImportDirective", + "scope": 1605, + "sourceUnit": 1140, + "src": "355:27:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1148, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 109, + "src": "647:7:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$109", + "typeString": "contract Ownable" + } + }, + "id": 1149, + "nodeType": "InheritanceSpecifier", + "src": "647:7:8" + } + ], + "contractDependencies": [ + 109, + 815 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 1604, + "linearizedBaseContracts": [ + 1604, + 109, + 815 + ], + "name": "UAIRegistry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "UAIRegistry.AssetType", + "id": 1153, + "members": [ + { + "id": 1150, + "name": "Native", + "nodeType": "EnumValue", + "src": "677:6:8" + }, + { + "id": 1151, + "name": "ERC721", + "nodeType": "EnumValue", + "src": "687:6:8" + }, + { + "id": 1152, + "name": "ERC1155", + "nodeType": "EnumValue", + "src": "697:7:8" + } + ], + "name": "AssetType", + "nodeType": "EnumDefinition", + "src": "659:48:8" + }, + { + "id": 1156, + "libraryName": { + "id": 1154, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 476, + "src": "716:8:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$476", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "710:27:8", + "typeName": { + "id": 1155, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "729:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 1158, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1604, + "src": "739:12:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$676", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 1157, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 676, + "src": "739:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$676", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1160, + "mutability": "mutable", + "name": "AssertionRegistry", + "nodeType": "VariableDeclaration", + "scope": 1604, + "src": "754:29:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DKGcontract_$1139", + "typeString": "contract DKGcontract" + }, + "typeName": { + "id": 1159, + "name": "DKGcontract", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1139, + "src": "754:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DKGcontract_$1139", + "typeString": "contract DKGcontract" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1162, + "mutability": "mutable", + "name": "AssertionRegistryAddress", + "nodeType": "VariableDeclaration", + "scope": 1604, + "src": "786:32:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1161, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "786:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "canonicalName": "UAIRegistry.AssetRecord", + "id": 1173, + "members": [ + { + "constant": false, + "id": 1164, + "mutability": "mutable", + "name": "creationTimestamp", + "nodeType": "VariableDeclaration", + "scope": 1173, + "src": "844:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1163, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "844:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1166, + "mutability": "mutable", + "name": "alsoKnownAs", + "nodeType": "VariableDeclaration", + "scope": 1173, + "src": "873:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1165, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "873:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1168, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "scope": 1173, + "src": "967:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1167, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "967:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1170, + "mutability": "mutable", + "name": "controller", + "nodeType": "VariableDeclaration", + "scope": 1173, + "src": "982:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "982:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1172, + "mutability": "mutable", + "name": "stateCommitHash", + "nodeType": "VariableDeclaration", + "scope": 1173, + "src": "1012:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1171, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1012:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "name": "AssetRecord", + "nodeType": "StructDefinition", + "scope": 1604, + "src": "822:217:8", + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "09600fa6", + "id": 1177, + "mutability": "mutable", + "name": "assetRecords", + "nodeType": "VariableDeclaration", + "scope": 1604, + "src": "1042:51:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord)" + }, + "typeName": { + "id": 1176, + "keyType": { + "id": 1174, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1050:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1042:31:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord)" + }, + "valueType": { + "id": 1175, + "name": "AssetRecord", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1173, + "src": "1061:11:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1173_storage_ptr", + "typeString": "struct UAIRegistry.AssetRecord" + } + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "09added7", + "id": 1181, + "mutability": "mutable", + "name": "UAIstatus", + "nodeType": "VariableDeclaration", + "scope": 1604, + "src": "1096:41:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "typeName": { + "id": 1180, + "keyType": { + "id": 1178, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1104:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1096:24:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "valueType": { + "id": 1179, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1115:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "34e5197b", + "id": 1185, + "mutability": "mutable", + "name": "assetStake", + "nodeType": "VariableDeclaration", + "scope": 1604, + "src": "1141:45:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "typeName": { + "id": 1184, + "keyType": { + "id": 1182, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1149:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1141:27:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "valueType": { + "id": 1183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1160:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "public" + }, + { + "anonymous": false, + "id": 1189, + "name": "UAIRegistryInit", + "nodeType": "EventDefinition", + "parameters": { + "id": 1188, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1187, + "indexed": true, + "mutability": "mutable", + "name": "assertionRegistryAddress", + "nodeType": "VariableDeclaration", + "scope": 1189, + "src": "1226:40:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1186, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1226:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1225:42:8" + }, + "src": "1204:64:8" + }, + { + "anonymous": false, + "id": 1195, + "name": "UAICreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 1194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1191, + "indexed": true, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1195, + "src": "1287:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1190, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1287:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1193, + "indexed": true, + "mutability": "mutable", + "name": "stateCommitHash", + "nodeType": "VariableDeclaration", + "scope": 1195, + "src": "1308:31:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1192, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1308:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1286:54:8" + }, + "src": "1270:71:8" + }, + { + "anonymous": false, + "id": 1201, + "name": "UAIUpdatedState", + "nodeType": "EventDefinition", + "parameters": { + "id": 1200, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1197, + "indexed": true, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1201, + "src": "1365:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1196, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1365:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1199, + "indexed": true, + "mutability": "mutable", + "name": "stateCommitHash", + "nodeType": "VariableDeclaration", + "scope": 1201, + "src": "1386:31:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1198, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1386:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1364:55:8" + }, + "src": "1343:77:8" + }, + { + "anonymous": false, + "id": 1209, + "name": "TokensDepositedToAsset", + "nodeType": "EventDefinition", + "parameters": { + "id": 1208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1203, + "indexed": true, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1209, + "src": "1451:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1202, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1451:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1205, + "indexed": true, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1209, + "src": "1472:22:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1204, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1472:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1207, + "indexed": true, + "mutability": "mutable", + "name": "depositor", + "nodeType": "VariableDeclaration", + "scope": 1209, + "src": "1496:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1206, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1496:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1450:72:8" + }, + "src": "1422:101:8" + }, + { + "body": { + "id": 1254, + "nodeType": "Block", + "src": "1602:289:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1217, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1211, + "src": "1614:12:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1636:1:8", + "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": 1219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1628:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1218, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1628:7:8", + "typeDescriptions": {} + } + }, + "id": 1221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1628:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1614:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1216, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1606:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1606:33:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1224, + "nodeType": "ExpressionStatement", + "src": "1606:33:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1226, + "name": "assertionRegistryAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1213, + "src": "1651:24:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1685:1:8", + "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": 1228, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1677:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1227, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1677:7:8", + "typeDescriptions": {} + } + }, + "id": 1230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1677:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1651:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1225, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1643:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1643:45:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1233, + "nodeType": "ExpressionStatement", + "src": "1643:45:8" + }, + { + "expression": { + "id": 1238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1234, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1158, + "src": "1693:5:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$676", + "typeString": "contract IERC20" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1236, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1211, + "src": "1708:12:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1235, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 676, + "src": "1701:6:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$676_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 1237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1701:20:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$676", + "typeString": "contract IERC20" + } + }, + "src": "1693:28:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$676", + "typeString": "contract IERC20" + } + }, + "id": 1239, + "nodeType": "ExpressionStatement", + "src": "1693:28:8" + }, + { + "expression": { + "id": 1242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1240, + "name": "AssertionRegistryAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1162, + "src": "1725:24:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1241, + "name": "assertionRegistryAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1213, + "src": "1752:24:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1725:51:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1243, + "nodeType": "ExpressionStatement", + "src": "1725:51:8" + }, + { + "expression": { + "id": 1248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1244, + "name": "AssertionRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1160, + "src": "1780:17:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DKGcontract_$1139", + "typeString": "contract DKGcontract" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1246, + "name": "assertionRegistryAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1213, + "src": "1812:24:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1245, + "name": "DKGcontract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1139, + "src": "1800:11:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_DKGcontract_$1139_$", + "typeString": "type(contract DKGcontract)" + } + }, + "id": 1247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:37:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_DKGcontract_$1139", + "typeString": "contract DKGcontract" + } + }, + "src": "1780:57:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DKGcontract_$1139", + "typeString": "contract DKGcontract" + } + }, + "id": 1249, + "nodeType": "ExpressionStatement", + "src": "1780:57:8" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1251, + "name": "assertionRegistryAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1213, + "src": "1862:24:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1250, + "name": "UAIRegistryInit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1189, + "src": "1846:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 1252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1846:41:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1253, + "nodeType": "EmitStatement", + "src": "1841:46:8" + } + ] + }, + "id": 1255, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1214, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1211, + "mutability": "mutable", + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 1255, + "src": "1538:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1210, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1538:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1213, + "mutability": "mutable", + "name": "assertionRegistryAddress", + "nodeType": "VariableDeclaration", + "scope": 1255, + "src": "1560:32:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1212, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1560:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1537:56:8" + }, + "returnParameters": { + "id": 1215, + "nodeType": "ParameterList", + "parameters": [], + "src": "1602:0:8" + }, + "scope": 1604, + "src": "1526:365:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1367, + "nodeType": "Block", + "src": "2052:913:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1273, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1257, + "src": "2065:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2070:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2065:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5541492063616e6e6f74206265207a65726f", + "id": 1276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2073:20:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8113bcaef69ad64d629f9f9842e44c0195bbec12498295833c352197bdf09d1b", + "typeString": "literal_string \"UAI cannot be zero\"" + }, + "value": "UAI cannot be zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8113bcaef69ad64d629f9f9842e44c0195bbec12498295833c352197bdf09d1b", + "typeString": "literal_string \"UAI cannot be zero\"" + } + ], + "id": 1272, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2057:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2057:37:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1278, + "nodeType": "ExpressionStatement", + "src": "2057:37:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 1282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1280, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1259, + "src": "2106:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "33", + "id": 1281, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2114:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "2106:9:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5f7479706520616c6c6f7765642076616c7565733a20302c312c32202857495029", + "id": 1283, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2117:35:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cf25b7c40ac58b98472d8ae4b6b8703daef3920dd8a8c2b2556b411059eb30d4", + "typeString": "literal_string \"_type allowed values: 0,1,2 (WIP)\"" + }, + "value": "_type allowed values: 0,1,2 (WIP)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cf25b7c40ac58b98472d8ae4b6b8703daef3920dd8a8c2b2556b411059eb30d4", + "typeString": "literal_string \"_type allowed values: 0,1,2 (WIP)\"" + } + ], + "id": 1279, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2098:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2098:55:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1285, + "nodeType": "ExpressionStatement", + "src": "2098:55:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1287, + "name": "alsoKnownAs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "2165:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 1288, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2178:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2165:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "616c736f4b6e6f776e41732063616e6e6f74206265207a65726f", + "id": 1290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2181:28:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_889a93080df6c407ecf58a36aecc1ba986f5889f8941567948da9184911b568f", + "typeString": "literal_string \"alsoKnownAs cannot be zero\"" + }, + "value": "alsoKnownAs cannot be zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_889a93080df6c407ecf58a36aecc1ba986f5889f8941567948da9184911b568f", + "typeString": "literal_string \"alsoKnownAs cannot be zero\"" + } + ], + "id": 1286, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2157:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2157:53:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1292, + "nodeType": "ExpressionStatement", + "src": "2157:53:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1294, + "name": "stateCommitHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "2222:15:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 1295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2239:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2222:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "7374617465436f6d6d6974486173682063616e6e6f74206265207a65726f", + "id": 1297, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2242:32:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f0caaefff46a6fa6373daf0acae33c6a0d7f130841550573dc0a5b0fb9ec40cc", + "typeString": "literal_string \"stateCommitHash cannot be zero\"" + }, + "value": "stateCommitHash cannot be zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f0caaefff46a6fa6373daf0acae33c6a0d7f130841550573dc0a5b0fb9ec40cc", + "typeString": "literal_string \"stateCommitHash cannot be zero\"" + } + ], + "id": 1293, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2214:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2214:61:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1299, + "nodeType": "ExpressionStatement", + "src": "2214:61:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 1301, + "name": "UAIstatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "2287:9:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 1303, + "indexExpression": { + "id": 1302, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1257, + "src": "2297:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2287:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "66616c7365", + "id": 1304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2305:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2287:23:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1300, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2279:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2279:33:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1307, + "nodeType": "ExpressionStatement", + "src": "2279:33:8" + }, + { + "expression": { + "arguments": [ + { + "id": 1311, + "name": "stateCommitHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "2512:15:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1312, + "name": "rootHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "2529:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "hexValue": "31", + "id": 1313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2539:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + { + "hexValue": "31", + "id": 1314, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2542:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "id": 1308, + "name": "AssertionRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1160, + "src": "2472:17:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DKGcontract_$1139", + "typeString": "contract DKGcontract" + } + }, + "id": 1310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createAssertionRecord", + "nodeType": "MemberAccess", + "referencedDeclaration": 1016, + "src": "2472:39:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,bytes32,uint256,uint256) external" + } + }, + "id": 1315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2472:72:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1316, + "nodeType": "ExpressionStatement", + "src": "2472:72:8" + }, + { + "expression": { + "id": 1322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 1317, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "2592:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1319, + "indexExpression": { + "id": 1318, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1257, + "src": "2605:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2592:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1320, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "stateCommitHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 1172, + "src": "2592:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1321, + "name": "stateCommitHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "2628:15:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2592:51:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1323, + "nodeType": "ExpressionStatement", + "src": "2592:51:8" + }, + { + "expression": { + "id": 1329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 1324, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "2647:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1326, + "indexExpression": { + "id": 1325, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1257, + "src": "2660:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2647:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1327, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "_type", + "nodeType": "MemberAccess", + "referencedDeclaration": 1168, + "src": "2647:23:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1328, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1259, + "src": "2673:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2647:31:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 1330, + "nodeType": "ExpressionStatement", + "src": "2647:31:8" + }, + { + "expression": { + "id": 1336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 1331, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "2682:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1333, + "indexExpression": { + "id": 1332, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1257, + "src": "2695:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2682:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1334, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "alsoKnownAs", + "nodeType": "MemberAccess", + "referencedDeclaration": 1166, + "src": "2682:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1335, + "name": "alsoKnownAs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "2714:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2682:43:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1337, + "nodeType": "ExpressionStatement", + "src": "2682:43:8" + }, + { + "expression": { + "id": 1344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 1338, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "2729:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1340, + "indexExpression": { + "id": 1339, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1257, + "src": "2742:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2729:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1341, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "controller", + "nodeType": "MemberAccess", + "referencedDeclaration": 1170, + "src": "2729:28:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 1342, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "2760:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2760:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2729:41:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1345, + "nodeType": "ExpressionStatement", + "src": "2729:41:8" + }, + { + "expression": { + "id": 1352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 1346, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "2826:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1348, + "indexExpression": { + "id": 1347, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1257, + "src": "2839:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2826:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1349, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "creationTimestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 1164, + "src": "2826:35:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 1350, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967292, + "src": "2864:5:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 1351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "2864:15:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2826:53:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1353, + "nodeType": "ExpressionStatement", + "src": "2826:53:8" + }, + { + "expression": { + "id": 1358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 1354, + "name": "UAIstatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "2883:9:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 1356, + "indexExpression": { + "id": 1355, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1257, + "src": "2893:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2883:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 1357, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2900:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2883:21:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1359, + "nodeType": "ExpressionStatement", + "src": "2883:21:8" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1361, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1257, + "src": "2925:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1362, + "name": "stateCommitHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "2930:15:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1360, + "name": "UAICreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1195, + "src": "2914:10:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 1363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2914:32:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1364, + "nodeType": "EmitStatement", + "src": "2909:37:8" + }, + { + "expression": { + "id": 1365, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1257, + "src": "2958:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 1271, + "id": 1366, + "nodeType": "Return", + "src": "2951:10:8" + } + ] + }, + "functionSelector": "78e98392", + "id": 1368, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "registerAsset", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1268, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1257, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1368, + "src": "1917:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1256, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1917:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1259, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "scope": 1368, + "src": "1930:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1258, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1930:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1261, + "mutability": "mutable", + "name": "alsoKnownAs", + "nodeType": "VariableDeclaration", + "scope": 1368, + "src": "1943:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1260, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1943:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1263, + "mutability": "mutable", + "name": "stateCommitHash", + "nodeType": "VariableDeclaration", + "scope": 1368, + "src": "1964:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1262, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1964:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "mutability": "mutable", + "name": "rootHash", + "nodeType": "VariableDeclaration", + "scope": 1368, + "src": "1989:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1264, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1989:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1267, + "mutability": "mutable", + "name": "tokenAmount", + "nodeType": "VariableDeclaration", + "scope": 1368, + "src": "2007:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1266, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2007:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1916:111:8" + }, + "returnParameters": { + "id": 1271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1270, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1368, + "src": "2044:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1269, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2044:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2043:9:8" + }, + "scope": 1604, + "src": "1894:1071:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1433, + "nodeType": "Block", + "src": "3080:464:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1380, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1370, + "src": "3093:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3098:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3093:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5541492063616e6e6f74206265207a65726f", + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3101:20:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8113bcaef69ad64d629f9f9842e44c0195bbec12498295833c352197bdf09d1b", + "typeString": "literal_string \"UAI cannot be zero\"" + }, + "value": "UAI cannot be zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8113bcaef69ad64d629f9f9842e44c0195bbec12498295833c352197bdf09d1b", + "typeString": "literal_string \"UAI cannot be zero\"" + } + ], + "id": 1379, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "3085:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3085:37:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1385, + "nodeType": "ExpressionStatement", + "src": "3085:37:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 1387, + "name": "UAIstatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "3134:9:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 1389, + "indexExpression": { + "id": 1388, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1370, + "src": "3144:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3134:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "74727565", + "id": 1390, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3152:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "3134:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4173736574206d757374206578697374", + "id": 1392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3158:18:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1288ba10f0c0a9fa84e2f581ad61c72d898b048e206b52821e5663686f23ff37", + "typeString": "literal_string \"Asset must exist\"" + }, + "value": "Asset must exist" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1288ba10f0c0a9fa84e2f581ad61c72d898b048e206b52821e5663686f23ff37", + "typeString": "literal_string \"Asset must exist\"" + } + ], + "id": 1386, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "3126:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3126:52:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1394, + "nodeType": "ExpressionStatement", + "src": "3126:52:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1396, + "name": "newStateCommitHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1372, + "src": "3190:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 1397, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3210:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3190:21:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "6e65775374617465436f6d6d6974486173682063616e6e6f74206265207a65726f", + "id": 1399, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3213:35:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fa287c795401a9447e9af39b3f60c2649bae99888868237daa5c7cc28744941b", + "typeString": "literal_string \"newStateCommitHash cannot be zero\"" + }, + "value": "newStateCommitHash cannot be zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fa287c795401a9447e9af39b3f60c2649bae99888868237daa5c7cc28744941b", + "typeString": "literal_string \"newStateCommitHash cannot be zero\"" + } + ], + "id": 1395, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "3182:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3182:67:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1401, + "nodeType": "ExpressionStatement", + "src": "3182:67:8" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 1404, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1370, + "src": "3269:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 1405, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "3273:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3273:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1403, + "name": "isOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1525, + "src": "3261:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) returns (bool)" + } + }, + "id": 1407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3261:23:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1402, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "3253:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3253:32:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1409, + "nodeType": "ExpressionStatement", + "src": "3253:32:8" + }, + { + "expression": { + "arguments": [ + { + "id": 1413, + "name": "newStateCommitHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1372, + "src": "3332:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1414, + "name": "rootHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1374, + "src": "3352:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "hexValue": "31", + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3362:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + { + "hexValue": "31", + "id": 1416, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3365:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "id": 1410, + "name": "AssertionRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1160, + "src": "3292:17:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DKGcontract_$1139", + "typeString": "contract DKGcontract" + } + }, + "id": 1412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createAssertionRecord", + "nodeType": "MemberAccess", + "referencedDeclaration": 1016, + "src": "3292:39:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,bytes32,uint256,uint256) external" + } + }, + "id": 1417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3292:75:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1418, + "nodeType": "ExpressionStatement", + "src": "3292:75:8" + }, + { + "expression": { + "id": 1424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 1419, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "3381:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1421, + "indexExpression": { + "id": 1420, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1370, + "src": "3394:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3381:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1422, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "stateCommitHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 1172, + "src": "3381:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1423, + "name": "newStateCommitHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1372, + "src": "3418:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3381:55:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1425, + "nodeType": "ExpressionStatement", + "src": "3381:55:8" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1427, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1370, + "src": "3501:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1428, + "name": "newStateCommitHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1372, + "src": "3506:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1426, + "name": "UAIUpdatedState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1201, + "src": "3485:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 1429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3485:40:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1430, + "nodeType": "EmitStatement", + "src": "3480:45:8" + }, + { + "expression": { + "id": 1431, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1370, + "src": "3537:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 1378, + "id": 1432, + "nodeType": "Return", + "src": "3530:10:8" + } + ] + }, + "functionSelector": "a9cd6a2d", + "id": 1434, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "updateAssetState", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1375, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1370, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1434, + "src": "2996:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1369, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2996:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1372, + "mutability": "mutable", + "name": "newStateCommitHash", + "nodeType": "VariableDeclaration", + "scope": 1434, + "src": "3009:26:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1371, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3009:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1374, + "mutability": "mutable", + "name": "rootHash", + "nodeType": "VariableDeclaration", + "scope": 1434, + "src": "3037:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1373, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3037:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2995:59:8" + }, + "returnParameters": { + "id": 1378, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1377, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1434, + "src": "3071:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1376, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3071:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3070:9:8" + }, + "scope": 1604, + "src": "2970:574:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1446, + "nodeType": "Block", + "src": "3650:48:8", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 1441, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "3661:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1443, + "indexExpression": { + "id": 1442, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1436, + "src": "3674:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3661:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1444, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "stateCommitHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 1172, + "src": "3661:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 1440, + "id": 1445, + "nodeType": "Return", + "src": "3654:40:8" + } + ] + }, + "functionSelector": "52569b9d", + "id": 1447, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAssetStateCommitHash", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1437, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1436, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1447, + "src": "3593:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1435, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3593:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3592:13:8" + }, + "returnParameters": { + "id": 1440, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1439, + "mutability": "mutable", + "name": "stateCommitHash", + "nodeType": "VariableDeclaration", + "scope": 1447, + "src": "3626:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1438, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3626:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3625:25:8" + }, + "scope": 1604, + "src": "3560:138:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1459, + "nodeType": "Block", + "src": "3781:43:8", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 1454, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "3792:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1456, + "indexExpression": { + "id": 1455, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "3805:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3792:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1457, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "controller", + "nodeType": "MemberAccess", + "referencedDeclaration": 1170, + "src": "3792:28:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1453, + "id": 1458, + "nodeType": "Return", + "src": "3785:35:8" + } + ] + }, + "functionSelector": "77636d1d", + "id": 1460, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAssetController", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1450, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1449, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1460, + "src": "3729:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1448, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3729:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3728:13:8" + }, + "returnParameters": { + "id": 1453, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1452, + "mutability": "mutable", + "name": "controller", + "nodeType": "VariableDeclaration", + "scope": 1460, + "src": "3762:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1451, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3762:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3761:20:8" + }, + "scope": 1604, + "src": "3701:123:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1472, + "nodeType": "Block", + "src": "3901:44:8", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 1467, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "3912:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1469, + "indexExpression": { + "id": 1468, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1462, + "src": "3925:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3912:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1470, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "alsoKnownAs", + "nodeType": "MemberAccess", + "referencedDeclaration": 1166, + "src": "3912:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 1466, + "id": 1471, + "nodeType": "Return", + "src": "3905:36:8" + } + ] + }, + "functionSelector": "6f3a9229", + "id": 1473, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAssetAKA", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1463, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1462, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1473, + "src": "3848:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1461, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3848:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3847:13:8" + }, + "returnParameters": { + "id": 1466, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1465, + "mutability": "mutable", + "name": "alsoKnownAs", + "nodeType": "VariableDeclaration", + "scope": 1473, + "src": "3881:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1464, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3881:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3880:21:8" + }, + "scope": 1604, + "src": "3827:118:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1485, + "nodeType": "Block", + "src": "4042:50:8", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 1480, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "4053:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1482, + "indexExpression": { + "id": 1481, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1475, + "src": "4066:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4053:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1483, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "creationTimestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 1164, + "src": "4053:35:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1479, + "id": 1484, + "nodeType": "Return", + "src": "4046:42:8" + } + ] + }, + "functionSelector": "7f58afc8", + "id": 1486, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAssetCreationTimestamp", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1476, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1475, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1486, + "src": "3983:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1474, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3983:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3982:13:8" + }, + "returnParameters": { + "id": 1479, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1478, + "mutability": "mutable", + "name": "creationTimestamp", + "nodeType": "VariableDeclaration", + "scope": 1486, + "src": "4016:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1477, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4016:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4015:27:8" + }, + "scope": 1604, + "src": "3948:144:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1493, + "nodeType": "Block", + "src": "4173:39:8", + "statements": [ + { + "expression": { + "id": 1491, + "name": "AssertionRegistryAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1162, + "src": "4184:24:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1490, + "id": 1492, + "nodeType": "Return", + "src": "4177:31:8" + } + ] + }, + "functionSelector": "2f1704bc", + "id": 1494, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAssertionRegistry", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1487, + "nodeType": "ParameterList", + "parameters": [], + "src": "4124:2:8" + }, + "returnParameters": { + "id": 1490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1489, + "mutability": "mutable", + "name": "assertionRegistry", + "nodeType": "VariableDeclaration", + "scope": 1494, + "src": "4147:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1488, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4147:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "4146:27:8" + }, + "scope": 1604, + "src": "4095:117:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1506, + "nodeType": "Block", + "src": "4427:62:8", + "statements": [ + { + "expression": { + "hexValue": "30", + "id": 1504, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4438:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 1503, + "id": 1505, + "nodeType": "Return", + "src": "4431:8:8" + } + ] + }, + "documentation": { + "id": 1495, + "nodeType": "StructuredDocumentation", + "src": "4230:107:8", + "text": " @dev Should determine type of ``contractAddress``, if possible, returning enum AssetType" + }, + "id": 1507, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "determineType", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1500, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1497, + "mutability": "mutable", + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "scope": 1507, + "src": "4366:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1496, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4366:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1499, + "mutability": "mutable", + "name": "id", + "nodeType": "VariableDeclaration", + "scope": 1507, + "src": "4391:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1498, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4391:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4365:37:8" + }, + "returnParameters": { + "id": 1503, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1502, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1507, + "src": "4421:5:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1501, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4421:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "4420:7:8" + }, + "scope": 1604, + "src": "4343:146:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1524, + "nodeType": "Block", + "src": "4650:60:8", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1517, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1512, + "src": "4665:5:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "baseExpression": { + "id": 1518, + "name": "assetRecords", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "4674:12:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" + } + }, + "id": 1520, + "indexExpression": { + "id": 1519, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1510, + "src": "4687:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4674:17:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeString": "struct UAIRegistry.AssetRecord storage ref" + } + }, + "id": 1521, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "controller", + "nodeType": "MemberAccess", + "referencedDeclaration": 1170, + "src": "4674:28:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4665:37:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1516, + "id": 1523, + "nodeType": "Return", + "src": "4658:44:8" + } + ] + }, + "documentation": { + "id": 1508, + "nodeType": "StructuredDocumentation", + "src": "4492:83:8", + "text": " @dev Returns bool checking if ``owner`` is controller of ``UAI``" + }, + "id": 1525, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isOwner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1513, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1510, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1525, + "src": "4598:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1509, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4598:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1512, + "mutability": "mutable", + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1525, + "src": "4611:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1511, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4611:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "4597:28:8" + }, + "returnParameters": { + "id": 1516, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1515, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1525, + "src": "4644:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1514, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4644:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "4643:6:8" + }, + "scope": 1604, + "src": "4581:129:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1602, + "nodeType": "Block", + "src": "4851:717:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1534, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "4868:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1535, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4875:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4868:8:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "416d6f756e742063616e6e6f74206265207a65726f", + "id": 1537, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4878:23:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8beea76deddeff1012d90e1e8da369393f885b0575eb094a33da9912cc4bbb8b", + "typeString": "literal_string \"Amount cannot be zero\"" + }, + "value": "Amount cannot be zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8beea76deddeff1012d90e1e8da369393f885b0575eb094a33da9912cc4bbb8b", + "typeString": "literal_string \"Amount cannot be zero\"" + } + ], + "id": 1533, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "4860:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4860:42:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1539, + "nodeType": "ExpressionStatement", + "src": "4860:42:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 1543, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "4934:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4934:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [ + { + "id": 1547, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967268, + "src": "4954:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UAIRegistry_$1604", + "typeString": "contract UAIRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UAIRegistry_$1604", + "typeString": "contract UAIRegistry" + } + ], + "id": 1546, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4946:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1545, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4946:7:8", + "typeDescriptions": {} + } + }, + "id": 1548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4946:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1541, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1158, + "src": "4918:5:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$676", + "typeString": "contract IERC20" + } + }, + "id": 1542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 635, + "src": "4918:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4918:42:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1550, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "4964:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4918:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "53656e64657220616c6c6f77616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e74", + "id": 1552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4972:64:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3bc5ac98536c45d410bf37692b674d7f6ad3249fabf29eadc142b2e562988389", + "typeString": "literal_string \"Sender allowance must be equal to or higher than chosen amount\"" + }, + "value": "Sender allowance must be equal to or higher than chosen amount" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3bc5ac98536c45d410bf37692b674d7f6ad3249fabf29eadc142b2e562988389", + "typeString": "literal_string \"Sender allowance must be equal to or higher than chosen amount\"" + } + ], + "id": 1540, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "4910:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4910:127:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1554, + "nodeType": "ExpressionStatement", + "src": "4910:127:8" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "id": 1558, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "5069:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5069:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "id": 1556, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1158, + "src": "5053:5:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$676", + "typeString": "contract IERC20" + } + }, + "id": 1557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 615, + "src": "5053:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 1560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5053:27:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1561, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "5084:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5053:37:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "53656e6465722062616c616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e7421", + "id": 1563, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5092:63:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_262e509abce0ea4c77b39344642b82be870ee6d03e35d57d1dee69295a1e383b", + "typeString": "literal_string \"Sender balance must be equal to or higher than chosen amount!\"" + }, + "value": "Sender balance must be equal to or higher than chosen amount!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_262e509abce0ea4c77b39344642b82be870ee6d03e35d57d1dee69295a1e383b", + "typeString": "literal_string \"Sender balance must be equal to or higher than chosen amount!\"" + } + ], + "id": 1555, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "5045:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5045:111:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1565, + "nodeType": "ExpressionStatement", + "src": "5045:111:8" + }, + { + "assignments": [ + 1567 + ], + "declarations": [ + { + "constant": false, + "id": 1567, + "mutability": "mutable", + "name": "transaction_result", + "nodeType": "VariableDeclaration", + "scope": 1602, + "src": "5165:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1566, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5165:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 1578, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 1570, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "5210:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5210:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [ + { + "id": 1574, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967268, + "src": "5230:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UAIRegistry_$1604", + "typeString": "contract UAIRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UAIRegistry_$1604", + "typeString": "contract UAIRegistry" + } + ], + "id": 1573, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5222:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1572, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5222:7:8", + "typeDescriptions": {} + } + }, + "id": 1575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5222:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1576, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "5237:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1568, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1158, + "src": "5191:5:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$676", + "typeString": "contract IERC20" + } + }, + "id": 1569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 657, + "src": "5191:18:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5191:53:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5165:79:8" + }, + { + "expression": { + "arguments": [ + { + "id": 1580, + "name": "transaction_result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1567, + "src": "5260:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "546f6b656e207472616e73616374696f6e20657865637574696f6e206661696c656421", + "id": 1581, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5280:37:8", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c60aa67373380e582a977ce48d7156e19a6358c471790919f2371ebd75aaf7c7", + "typeString": "literal_string \"Token transaction execution failed!\"" + }, + "value": "Token transaction execution failed!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c60aa67373380e582a977ce48d7156e19a6358c471790919f2371ebd75aaf7c7", + "typeString": "literal_string \"Token transaction execution failed!\"" + } + ], + "id": 1579, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "5252:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5252:66:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1583, + "nodeType": "ExpressionStatement", + "src": "5252:66:8" + }, + { + "expression": { + "id": 1593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 1584, + "name": "assetStake", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1185, + "src": "5463:10:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 1586, + "indexExpression": { + "id": 1585, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1530, + "src": "5474:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5463:15:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1591, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "5501:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 1587, + "name": "assetStake", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1185, + "src": "5481:10:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 1589, + "indexExpression": { + "id": 1588, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1530, + "src": "5492:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5481:15:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 303, + "src": "5481:19: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": 1592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5481:27:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5463:45:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1594, + "nodeType": "ExpressionStatement", + "src": "5463:45:8" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1596, + "name": "UAI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1530, + "src": "5540:3:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1597, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1528, + "src": "5545:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1598, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "5552:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5552:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1595, + "name": "TokensDepositedToAsset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1209, + "src": "5517:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (bytes32,uint256,address)" + } + }, + "id": 1600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5517:46:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1601, + "nodeType": "EmitStatement", + "src": "5512:51:8" + } + ] + }, + "documentation": { + "id": 1526, + "nodeType": "StructuredDocumentation", + "src": "4713:73:8", + "text": " @dev Deposits tokens in ``amount`` to specific ``UAI``" + }, + "functionSelector": "d15b223e", + "id": 1603, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "depositTokens", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1528, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1603, + "src": "4815:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1527, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4815:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1530, + "mutability": "mutable", + "name": "UAI", + "nodeType": "VariableDeclaration", + "scope": 1603, + "src": "4831:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1529, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4831:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4814:29:8" + }, + "returnParameters": { + "id": 1532, + "nodeType": "ParameterList", + "parameters": [], + "src": "4851:0:8" + }, + "scope": 1604, + "src": "4792:776:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 1605, + "src": "623:4950:8" + } + ], + "src": "0:5573:8" + }, + "legacyAST": { + "attributes": { + "absolutePath": "project:/contracts/UAIRegistry.sol", + "exportedSymbols": { + "Context": [ + 815 + ], + "DKGcontract": [ + 1139 + ], + "IERC1155": [ + 598 + ], + "IERC165": [ + 121 + ], + "IERC20": [ + 676 + ], + "IERC721": [ + 792 + ], + "Ownable": [ + 109 + ], + "SafeMath": [ + 476 + ], + "UAIRegistry": [ + 1604 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + ">=", + "0.6", + ".0", + "<", + "0.8", + ".0" + ] + }, + "id": 1141, + "name": "PragmaDirective", + "src": "0:31:8" + }, + { + "attributes": { + "SourceUnit": 677, + "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "scope": 1605, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1142, + "name": "ImportDirective", + "src": "33:64:8" + }, + { + "attributes": { + "SourceUnit": 793, + "absolutePath": "openzeppelin-solidity/contracts/token/ERC721/IERC721.sol", + "file": "openzeppelin-solidity/contracts/token/ERC721/IERC721.sol", + "scope": 1605, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1143, + "name": "ImportDirective", + "src": "98:66:8" + }, + { + "attributes": { + "SourceUnit": 599, + "absolutePath": "openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol", + "file": "openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol", + "scope": 1605, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1144, + "name": "ImportDirective", + "src": "165:68:8" + }, + { + "attributes": { + "SourceUnit": 477, + "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", + "scope": 1605, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1145, + "name": "ImportDirective", + "src": "234:59:8" + }, + { + "attributes": { + "SourceUnit": 110, + "absolutePath": "openzeppelin-solidity/contracts/access/Ownable.sol", + "file": "openzeppelin-solidity/contracts/access/Ownable.sol", + "scope": 1605, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1146, + "name": "ImportDirective", + "src": "294:60:8" + }, + { + "attributes": { + "SourceUnit": 1140, + "absolutePath": "project:/contracts/DKGcontract.sol", + "file": "./DKGcontract.sol", + "scope": 1605, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 1147, + "name": "ImportDirective", + "src": "355:27:8" + }, + { + "attributes": { + "abstract": false, + "contractDependencies": [ + 109, + 815 + ], + "contractKind": "contract", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 1604, + 109, + 815 + ], + "name": "UAIRegistry", + "scope": 1605 + }, + "children": [ + { + "attributes": {}, + "children": [ + { + "attributes": { + "name": "Ownable", + "referencedDeclaration": 109, + "type": "contract Ownable" + }, + "id": 1148, + "name": "UserDefinedTypeName", + "src": "647:7:8" + } + ], + "id": 1149, + "name": "InheritanceSpecifier", + "src": "647:7:8" + }, + { + "attributes": { + "canonicalName": "UAIRegistry.AssetType", + "name": "AssetType" + }, + "children": [ + { + "attributes": { + "name": "Native" + }, + "id": 1150, + "name": "EnumValue", + "src": "677:6:8" + }, + { + "attributes": { + "name": "ERC721" + }, + "id": 1151, + "name": "EnumValue", + "src": "687:6:8" + }, + { + "attributes": { + "name": "ERC1155" + }, + "id": 1152, + "name": "EnumValue", + "src": "697:7:8" + } + ], + "id": 1153, + "name": "EnumDefinition", + "src": "659:48:8" + }, + { + "children": [ + { + "attributes": { + "name": "SafeMath", + "referencedDeclaration": 476, + "type": "library SafeMath" + }, + "id": 1154, + "name": "UserDefinedTypeName", + "src": "716:8:8" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1155, + "name": "ElementaryTypeName", + "src": "729:7:8" + } + ], + "id": 1156, + "name": "UsingForDirective", + "src": "710:27:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "token", + "scope": 1604, + "stateVariable": true, + "storageLocation": "default", + "type": "contract IERC20", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "IERC20", + "referencedDeclaration": 676, + "type": "contract IERC20" + }, + "id": 1157, + "name": "UserDefinedTypeName", + "src": "739:6:8" + } + ], + "id": 1158, + "name": "VariableDeclaration", + "src": "739:12:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "AssertionRegistry", + "scope": 1604, + "stateVariable": true, + "storageLocation": "default", + "type": "contract DKGcontract", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "DKGcontract", + "referencedDeclaration": 1139, + "type": "contract DKGcontract" + }, + "id": 1159, + "name": "UserDefinedTypeName", + "src": "754:11:8" + } + ], + "id": 1160, + "name": "VariableDeclaration", + "src": "754:29:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "AssertionRegistryAddress", + "scope": 1604, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1161, + "name": "ElementaryTypeName", + "src": "786:7:8" + } + ], + "id": 1162, + "name": "VariableDeclaration", + "src": "786:32:8" + }, + { + "attributes": { + "canonicalName": "UAIRegistry.AssetRecord", + "name": "AssetRecord", + "scope": 1604, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "creationTimestamp", + "scope": 1173, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1163, + "name": "ElementaryTypeName", + "src": "844:7:8" + } + ], + "id": 1164, + "name": "VariableDeclaration", + "src": "844:25:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "alsoKnownAs", + "scope": 1173, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1165, + "name": "ElementaryTypeName", + "src": "873:7:8" + } + ], + "id": 1166, + "name": "VariableDeclaration", + "src": "873:19:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "_type", + "scope": 1173, + "stateVariable": false, + "storageLocation": "default", + "type": "uint8", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 1167, + "name": "ElementaryTypeName", + "src": "967:5:8" + } + ], + "id": 1168, + "name": "VariableDeclaration", + "src": "967:11:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "controller", + "scope": 1173, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1169, + "name": "ElementaryTypeName", + "src": "982:7:8" + } + ], + "id": 1170, + "name": "VariableDeclaration", + "src": "982:18:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "stateCommitHash", + "scope": 1173, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1171, + "name": "ElementaryTypeName", + "src": "1012:7:8" + } + ], + "id": 1172, + "name": "VariableDeclaration", + "src": "1012:23:8" + } + ], + "id": 1173, + "name": "StructDefinition", + "src": "822:217:8" + }, + { + "attributes": { + "constant": false, + "functionSelector": "09600fa6", + "mutability": "mutable", + "name": "assetRecords", + "scope": 1604, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord)", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord)" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1174, + "name": "ElementaryTypeName", + "src": "1050:7:8" + }, + { + "attributes": { + "name": "AssetRecord", + "referencedDeclaration": 1173, + "type": "struct UAIRegistry.AssetRecord" + }, + "id": 1175, + "name": "UserDefinedTypeName", + "src": "1061:11:8" + } + ], + "id": 1176, + "name": "Mapping", + "src": "1042:31:8" + } + ], + "id": 1177, + "name": "VariableDeclaration", + "src": "1042:51:8" + }, + { + "attributes": { + "constant": false, + "functionSelector": "09added7", + "mutability": "mutable", + "name": "UAIstatus", + "scope": 1604, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(bytes32 => bool)", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "type": "mapping(bytes32 => bool)" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1178, + "name": "ElementaryTypeName", + "src": "1104:7:8" + }, + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1179, + "name": "ElementaryTypeName", + "src": "1115:4:8" + } + ], + "id": 1180, + "name": "Mapping", + "src": "1096:24:8" + } + ], + "id": 1181, + "name": "VariableDeclaration", + "src": "1096:41:8" + }, + { + "attributes": { + "constant": false, + "functionSelector": "34e5197b", + "mutability": "mutable", + "name": "assetStake", + "scope": 1604, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(bytes32 => uint256)", + "visibility": "public" + }, + "children": [ + { + "attributes": { + "type": "mapping(bytes32 => uint256)" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1182, + "name": "ElementaryTypeName", + "src": "1149:7:8" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1183, + "name": "ElementaryTypeName", + "src": "1160:7:8" + } + ], + "id": 1184, + "name": "Mapping", + "src": "1141:27:8" + } + ], + "id": 1185, + "name": "VariableDeclaration", + "src": "1141:45:8" + }, + { + "attributes": { + "anonymous": false, + "name": "UAIRegistryInit" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "mutability": "mutable", + "name": "assertionRegistryAddress", + "scope": 1189, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1186, + "name": "ElementaryTypeName", + "src": "1226:7:8" + } + ], + "id": 1187, + "name": "VariableDeclaration", + "src": "1226:40:8" + } + ], + "id": 1188, + "name": "ParameterList", + "src": "1225:42:8" + } + ], + "id": 1189, + "name": "EventDefinition", + "src": "1204:64:8" + }, + { + "attributes": { + "anonymous": false, + "name": "UAICreated" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "mutability": "mutable", + "name": "UAI", + "scope": 1195, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1190, + "name": "ElementaryTypeName", + "src": "1287:7:8" + } + ], + "id": 1191, + "name": "VariableDeclaration", + "src": "1287:19:8" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "mutability": "mutable", + "name": "stateCommitHash", + "scope": 1195, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1192, + "name": "ElementaryTypeName", + "src": "1308:7:8" + } + ], + "id": 1193, + "name": "VariableDeclaration", + "src": "1308:31:8" + } + ], + "id": 1194, + "name": "ParameterList", + "src": "1286:54:8" + } + ], + "id": 1195, + "name": "EventDefinition", + "src": "1270:71:8" + }, + { + "attributes": { + "anonymous": false, + "name": "UAIUpdatedState" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "mutability": "mutable", + "name": "UAI", + "scope": 1201, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1196, + "name": "ElementaryTypeName", + "src": "1365:7:8" + } + ], + "id": 1197, + "name": "VariableDeclaration", + "src": "1365:19:8" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "mutability": "mutable", + "name": "stateCommitHash", + "scope": 1201, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1198, + "name": "ElementaryTypeName", + "src": "1386:7:8" + } + ], + "id": 1199, + "name": "VariableDeclaration", + "src": "1386:31:8" + } + ], + "id": 1200, + "name": "ParameterList", + "src": "1364:55:8" + } + ], + "id": 1201, + "name": "EventDefinition", + "src": "1343:77:8" + }, + { + "attributes": { + "anonymous": false, + "name": "TokensDepositedToAsset" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "mutability": "mutable", + "name": "UAI", + "scope": 1209, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1202, + "name": "ElementaryTypeName", + "src": "1451:7:8" + } + ], + "id": 1203, + "name": "VariableDeclaration", + "src": "1451:19:8" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "mutability": "mutable", + "name": "amount", + "scope": 1209, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1204, + "name": "ElementaryTypeName", + "src": "1472:7:8" + } + ], + "id": 1205, + "name": "VariableDeclaration", + "src": "1472:22:8" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "mutability": "mutable", + "name": "depositor", + "scope": 1209, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1206, + "name": "ElementaryTypeName", + "src": "1496:7:8" + } + ], + "id": 1207, + "name": "VariableDeclaration", + "src": "1496:25:8" + } + ], + "id": 1208, + "name": "ParameterList", + "src": "1450:72:8" + } + ], + "id": 1209, + "name": "EventDefinition", + "src": "1422:101:8" + }, + { + "attributes": { + "implemented": true, + "isConstructor": true, + "kind": "constructor", + "modifiers": [ + null + ], + "name": "", + "scope": 1604, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "tokenAddress", + "scope": 1255, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1210, + "name": "ElementaryTypeName", + "src": "1538:7:8" + } + ], + "id": 1211, + "name": "VariableDeclaration", + "src": "1538:20:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "assertionRegistryAddress", + "scope": 1255, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1212, + "name": "ElementaryTypeName", + "src": "1560:7:8" + } + ], + "id": 1213, + "name": "VariableDeclaration", + "src": "1560:32:8" + } + ], + "id": 1214, + "name": "ParameterList", + "src": "1537:56:8" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1215, + "name": "ParameterList", + "src": "1602:0:8" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool) pure", + "value": "require" + }, + "id": 1216, + "name": "Identifier", + "src": "1606:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1211, + "type": "address", + "value": "tokenAddress" + }, + "id": 1217, + "name": "Identifier", + "src": "1614:12:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)" + }, + "children": [ + { + "attributes": { + "name": "address" + }, + "id": 1218, + "name": "ElementaryTypeName", + "src": "1628:7:8" + } + ], + "id": 1219, + "name": "ElementaryTypeNameExpression", + "src": "1628:7:8" + }, + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1220, + "name": "Literal", + "src": "1636:1:8" + } + ], + "id": 1221, + "name": "FunctionCall", + "src": "1628:10:8" + } + ], + "id": 1222, + "name": "BinaryOperation", + "src": "1614:24:8" + } + ], + "id": 1223, + "name": "FunctionCall", + "src": "1606:33:8" + } + ], + "id": 1224, + "name": "ExpressionStatement", + "src": "1606:33:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool) pure", + "value": "require" + }, + "id": 1225, + "name": "Identifier", + "src": "1643:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1213, + "type": "address", + "value": "assertionRegistryAddress" + }, + "id": 1226, + "name": "Identifier", + "src": "1651:24:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "address payable", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)" + }, + "children": [ + { + "attributes": { + "name": "address" + }, + "id": 1227, + "name": "ElementaryTypeName", + "src": "1677:7:8" + } + ], + "id": 1228, + "name": "ElementaryTypeNameExpression", + "src": "1677:7:8" + }, + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1229, + "name": "Literal", + "src": "1685:1:8" + } + ], + "id": 1230, + "name": "FunctionCall", + "src": "1677:10:8" + } + ], + "id": 1231, + "name": "BinaryOperation", + "src": "1651:36:8" + } + ], + "id": 1232, + "name": "FunctionCall", + "src": "1643:45:8" + } + ], + "id": 1233, + "name": "ExpressionStatement", + "src": "1643:45:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "contract IERC20" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1158, + "type": "contract IERC20", + "value": "token" + }, + "id": 1234, + "name": "Identifier", + "src": "1693:5:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "contract IERC20", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 676, + "type": "type(contract IERC20)", + "value": "IERC20" + }, + "id": 1235, + "name": "Identifier", + "src": "1701:6:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1211, + "type": "address", + "value": "tokenAddress" + }, + "id": 1236, + "name": "Identifier", + "src": "1708:12:8" + } + ], + "id": 1237, + "name": "FunctionCall", + "src": "1701:20:8" + } + ], + "id": 1238, + "name": "Assignment", + "src": "1693:28:8" + } + ], + "id": 1239, + "name": "ExpressionStatement", + "src": "1693:28:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1162, + "type": "address", + "value": "AssertionRegistryAddress" + }, + "id": 1240, + "name": "Identifier", + "src": "1725:24:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1213, + "type": "address", + "value": "assertionRegistryAddress" + }, + "id": 1241, + "name": "Identifier", + "src": "1752:24:8" + } + ], + "id": 1242, + "name": "Assignment", + "src": "1725:51:8" + } + ], + "id": 1243, + "name": "ExpressionStatement", + "src": "1725:51:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "contract DKGcontract" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1160, + "type": "contract DKGcontract", + "value": "AssertionRegistry" + }, + "id": 1244, + "name": "Identifier", + "src": "1780:17:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "contract DKGcontract", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1139, + "type": "type(contract DKGcontract)", + "value": "DKGcontract" + }, + "id": 1245, + "name": "Identifier", + "src": "1800:11:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1213, + "type": "address", + "value": "assertionRegistryAddress" + }, + "id": 1246, + "name": "Identifier", + "src": "1812:24:8" + } + ], + "id": 1247, + "name": "FunctionCall", + "src": "1800:37:8" + } + ], + "id": 1248, + "name": "Assignment", + "src": "1780:57:8" + } + ], + "id": 1249, + "name": "ExpressionStatement", + "src": "1780:57:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1189, + "type": "function (address)", + "value": "UAIRegistryInit" + }, + "id": 1250, + "name": "Identifier", + "src": "1846:15:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1213, + "type": "address", + "value": "assertionRegistryAddress" + }, + "id": 1251, + "name": "Identifier", + "src": "1862:24:8" + } + ], + "id": 1252, + "name": "FunctionCall", + "src": "1846:41:8" + } + ], + "id": 1253, + "name": "EmitStatement", + "src": "1841:46:8" + } + ], + "id": 1254, + "name": "Block", + "src": "1602:289:8" + } + ], + "id": 1255, + "name": "FunctionDefinition", + "src": "1526:365:8" + }, + { + "attributes": { + "functionSelector": "78e98392", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "registerAsset", + "scope": 1604, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "UAI", + "scope": 1368, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1256, + "name": "ElementaryTypeName", + "src": "1917:7:8" + } + ], + "id": 1257, + "name": "VariableDeclaration", + "src": "1917:11:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "_type", + "scope": 1368, + "stateVariable": false, + "storageLocation": "default", + "type": "uint8", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 1258, + "name": "ElementaryTypeName", + "src": "1930:5:8" + } + ], + "id": 1259, + "name": "VariableDeclaration", + "src": "1930:11:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "alsoKnownAs", + "scope": 1368, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1260, + "name": "ElementaryTypeName", + "src": "1943:7:8" + } + ], + "id": 1261, + "name": "VariableDeclaration", + "src": "1943:19:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "stateCommitHash", + "scope": 1368, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1262, + "name": "ElementaryTypeName", + "src": "1964:7:8" + } + ], + "id": 1263, + "name": "VariableDeclaration", + "src": "1964:23:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "rootHash", + "scope": 1368, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1264, + "name": "ElementaryTypeName", + "src": "1989:7:8" + } + ], + "id": 1265, + "name": "VariableDeclaration", + "src": "1989:16:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "tokenAmount", + "scope": 1368, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1266, + "name": "ElementaryTypeName", + "src": "2007:7:8" + } + ], + "id": 1267, + "name": "VariableDeclaration", + "src": "2007:19:8" + } + ], + "id": 1268, + "name": "ParameterList", + "src": "1916:111:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "", + "scope": 1368, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1269, + "name": "ElementaryTypeName", + "src": "2044:7:8" + } + ], + "id": 1270, + "name": "VariableDeclaration", + "src": "2044:7:8" + } + ], + "id": 1271, + "name": "ParameterList", + "src": "2043:9:8" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8113bcaef69ad64d629f9f9842e44c0195bbec12498295833c352197bdf09d1b", + "typeString": "literal_string \"UAI cannot be zero\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1272, + "name": "Identifier", + "src": "2057:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1257, + "type": "bytes32", + "value": "UAI" + }, + "id": 1273, + "name": "Identifier", + "src": "2065:3:8" + }, + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1274, + "name": "Literal", + "src": "2070:1:8" + } + ], + "id": 1275, + "name": "BinaryOperation", + "src": "2065:6:8" + }, + { + "attributes": { + "hexvalue": "5541492063616e6e6f74206265207a65726f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"UAI cannot be zero\"", + "value": "UAI cannot be zero" + }, + "id": 1276, + "name": "Literal", + "src": "2073:20:8" + } + ], + "id": 1277, + "name": "FunctionCall", + "src": "2057:37:8" + } + ], + "id": 1278, + "name": "ExpressionStatement", + "src": "2057:37:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cf25b7c40ac58b98472d8ae4b6b8703daef3920dd8a8c2b2556b411059eb30d4", + "typeString": "literal_string \"_type allowed values: 0,1,2 (WIP)\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1279, + "name": "Identifier", + "src": "2098:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1259, + "type": "uint8", + "value": "_type" + }, + "id": 1280, + "name": "Identifier", + "src": "2106:5:8" + }, + { + "attributes": { + "hexvalue": "33", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 3", + "value": "3" + }, + "id": 1281, + "name": "Literal", + "src": "2114:1:8" + } + ], + "id": 1282, + "name": "BinaryOperation", + "src": "2106:9:8" + }, + { + "attributes": { + "hexvalue": "5f7479706520616c6c6f7765642076616c7565733a20302c312c32202857495029", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"_type allowed values: 0,1,2 (WIP)\"", + "value": "_type allowed values: 0,1,2 (WIP)" + }, + "id": 1283, + "name": "Literal", + "src": "2117:35:8" + } + ], + "id": 1284, + "name": "FunctionCall", + "src": "2098:55:8" + } + ], + "id": 1285, + "name": "ExpressionStatement", + "src": "2098:55:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_889a93080df6c407ecf58a36aecc1ba986f5889f8941567948da9184911b568f", + "typeString": "literal_string \"alsoKnownAs cannot be zero\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1286, + "name": "Identifier", + "src": "2157:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1261, + "type": "bytes32", + "value": "alsoKnownAs" + }, + "id": 1287, + "name": "Identifier", + "src": "2165:11:8" + }, + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1288, + "name": "Literal", + "src": "2178:1:8" + } + ], + "id": 1289, + "name": "BinaryOperation", + "src": "2165:14:8" + }, + { + "attributes": { + "hexvalue": "616c736f4b6e6f776e41732063616e6e6f74206265207a65726f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"alsoKnownAs cannot be zero\"", + "value": "alsoKnownAs cannot be zero" + }, + "id": 1290, + "name": "Literal", + "src": "2181:28:8" + } + ], + "id": 1291, + "name": "FunctionCall", + "src": "2157:53:8" + } + ], + "id": 1292, + "name": "ExpressionStatement", + "src": "2157:53:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f0caaefff46a6fa6373daf0acae33c6a0d7f130841550573dc0a5b0fb9ec40cc", + "typeString": "literal_string \"stateCommitHash cannot be zero\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1293, + "name": "Identifier", + "src": "2214:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1263, + "type": "bytes32", + "value": "stateCommitHash" + }, + "id": 1294, + "name": "Identifier", + "src": "2222:15:8" + }, + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1295, + "name": "Literal", + "src": "2239:1:8" + } + ], + "id": 1296, + "name": "BinaryOperation", + "src": "2222:18:8" + }, + { + "attributes": { + "hexvalue": "7374617465436f6d6d6974486173682063616e6e6f74206265207a65726f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"stateCommitHash cannot be zero\"", + "value": "stateCommitHash cannot be zero" + }, + "id": 1297, + "name": "Literal", + "src": "2242:32:8" + } + ], + "id": 1298, + "name": "FunctionCall", + "src": "2214:61:8" + } + ], + "id": 1299, + "name": "ExpressionStatement", + "src": "2214:61:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool) pure", + "value": "require" + }, + "id": 1300, + "name": "Identifier", + "src": "2279:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1181, + "type": "mapping(bytes32 => bool)", + "value": "UAIstatus" + }, + "id": 1301, + "name": "Identifier", + "src": "2287:9:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1257, + "type": "bytes32", + "value": "UAI" + }, + "id": 1302, + "name": "Identifier", + "src": "2297:3:8" + } + ], + "id": 1303, + "name": "IndexAccess", + "src": "2287:14:8" + }, + { + "attributes": { + "hexvalue": "66616c7365", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "bool", + "type": "bool", + "value": "false" + }, + "id": 1304, + "name": "Literal", + "src": "2305:5:8" + } + ], + "id": 1305, + "name": "BinaryOperation", + "src": "2287:23:8" + } + ], + "id": 1306, + "name": "FunctionCall", + "src": "2279:33:8" + } + ], + "id": 1307, + "name": "ExpressionStatement", + "src": "2279:33:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "createAssertionRecord", + "referencedDeclaration": 1016, + "type": "function (bytes32,bytes32,uint256,uint256) external" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1160, + "type": "contract DKGcontract", + "value": "AssertionRegistry" + }, + "id": 1308, + "name": "Identifier", + "src": "2472:17:8" + } + ], + "id": 1310, + "name": "MemberAccess", + "src": "2472:39:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1263, + "type": "bytes32", + "value": "stateCommitHash" + }, + "id": 1311, + "name": "Identifier", + "src": "2512:15:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1265, + "type": "bytes32", + "value": "rootHash" + }, + "id": 1312, + "name": "Identifier", + "src": "2529:8:8" + }, + { + "attributes": { + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 1313, + "name": "Literal", + "src": "2539:1:8" + }, + { + "attributes": { + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 1314, + "name": "Literal", + "src": "2542:1:8" + } + ], + "id": 1315, + "name": "FunctionCall", + "src": "2472:72:8" + } + ], + "id": 1316, + "name": "ExpressionStatement", + "src": "2472:72:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bytes32" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "stateCommitHash", + "referencedDeclaration": 1172, + "type": "bytes32" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1177, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1317, + "name": "Identifier", + "src": "2592:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1257, + "type": "bytes32", + "value": "UAI" + }, + "id": 1318, + "name": "Identifier", + "src": "2605:3:8" + } + ], + "id": 1319, + "name": "IndexAccess", + "src": "2592:17:8" + } + ], + "id": 1320, + "name": "MemberAccess", + "src": "2592:33:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1263, + "type": "bytes32", + "value": "stateCommitHash" + }, + "id": 1321, + "name": "Identifier", + "src": "2628:15:8" + } + ], + "id": 1322, + "name": "Assignment", + "src": "2592:51:8" + } + ], + "id": 1323, + "name": "ExpressionStatement", + "src": "2592:51:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint8" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "_type", + "referencedDeclaration": 1168, + "type": "uint8" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1177, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1324, + "name": "Identifier", + "src": "2647:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1257, + "type": "bytes32", + "value": "UAI" + }, + "id": 1325, + "name": "Identifier", + "src": "2660:3:8" + } + ], + "id": 1326, + "name": "IndexAccess", + "src": "2647:17:8" + } + ], + "id": 1327, + "name": "MemberAccess", + "src": "2647:23:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1259, + "type": "uint8", + "value": "_type" + }, + "id": 1328, + "name": "Identifier", + "src": "2673:5:8" + } + ], + "id": 1329, + "name": "Assignment", + "src": "2647:31:8" + } + ], + "id": 1330, + "name": "ExpressionStatement", + "src": "2647:31:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bytes32" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "alsoKnownAs", + "referencedDeclaration": 1166, + "type": "bytes32" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1177, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1331, + "name": "Identifier", + "src": "2682:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1257, + "type": "bytes32", + "value": "UAI" + }, + "id": 1332, + "name": "Identifier", + "src": "2695:3:8" + } + ], + "id": 1333, + "name": "IndexAccess", + "src": "2682:17:8" + } + ], + "id": 1334, + "name": "MemberAccess", + "src": "2682:29:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1261, + "type": "bytes32", + "value": "alsoKnownAs" + }, + "id": 1335, + "name": "Identifier", + "src": "2714:11:8" + } + ], + "id": 1336, + "name": "Assignment", + "src": "2682:43:8" + } + ], + "id": 1337, + "name": "ExpressionStatement", + "src": "2682:43:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "controller", + "referencedDeclaration": 1170, + "type": "address" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1177, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1338, + "name": "Identifier", + "src": "2729:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1257, + "type": "bytes32", + "value": "UAI" + }, + "id": 1339, + "name": "Identifier", + "src": "2742:3:8" + } + ], + "id": 1340, + "name": "IndexAccess", + "src": "2729:17:8" + } + ], + "id": 1341, + "name": "MemberAccess", + "src": "2729:28:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967281, + "type": "msg", + "value": "msg" + }, + "id": 1342, + "name": "Identifier", + "src": "2760:3:8" + } + ], + "id": 1343, + "name": "MemberAccess", + "src": "2760:10:8" + } + ], + "id": 1344, + "name": "Assignment", + "src": "2729:41:8" + } + ], + "id": 1345, + "name": "ExpressionStatement", + "src": "2729:41:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "creationTimestamp", + "referencedDeclaration": 1164, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1177, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1346, + "name": "Identifier", + "src": "2826:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1257, + "type": "bytes32", + "value": "UAI" + }, + "id": 1347, + "name": "Identifier", + "src": "2839:3:8" + } + ], + "id": 1348, + "name": "IndexAccess", + "src": "2826:17:8" + } + ], + "id": 1349, + "name": "MemberAccess", + "src": "2826:35:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "timestamp", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967292, + "type": "block", + "value": "block" + }, + "id": 1350, + "name": "Identifier", + "src": "2864:5:8" + } + ], + "id": 1351, + "name": "MemberAccess", + "src": "2864:15:8" + } + ], + "id": 1352, + "name": "Assignment", + "src": "2826:53:8" + } + ], + "id": 1353, + "name": "ExpressionStatement", + "src": "2826:53:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1181, + "type": "mapping(bytes32 => bool)", + "value": "UAIstatus" + }, + "id": 1354, + "name": "Identifier", + "src": "2883:9:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1257, + "type": "bytes32", + "value": "UAI" + }, + "id": 1355, + "name": "Identifier", + "src": "2893:3:8" + } + ], + "id": 1356, + "name": "IndexAccess", + "src": "2883:14:8" + }, + { + "attributes": { + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 1357, + "name": "Literal", + "src": "2900:4:8" + } + ], + "id": 1358, + "name": "Assignment", + "src": "2883:21:8" + } + ], + "id": 1359, + "name": "ExpressionStatement", + "src": "2883:21:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1195, + "type": "function (bytes32,bytes32)", + "value": "UAICreated" + }, + "id": 1360, + "name": "Identifier", + "src": "2914:10:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1257, + "type": "bytes32", + "value": "UAI" + }, + "id": 1361, + "name": "Identifier", + "src": "2925:3:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1263, + "type": "bytes32", + "value": "stateCommitHash" + }, + "id": 1362, + "name": "Identifier", + "src": "2930:15:8" + } + ], + "id": 1363, + "name": "FunctionCall", + "src": "2914:32:8" + } + ], + "id": 1364, + "name": "EmitStatement", + "src": "2909:37:8" + }, + { + "attributes": { + "functionReturnParameters": 1271 + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1257, + "type": "bytes32", + "value": "UAI" + }, + "id": 1365, + "name": "Identifier", + "src": "2958:3:8" + } + ], + "id": 1366, + "name": "Return", + "src": "2951:10:8" + } + ], + "id": 1367, + "name": "Block", + "src": "2052:913:8" + } + ], + "id": 1368, + "name": "FunctionDefinition", + "src": "1894:1071:8" + }, + { + "attributes": { + "functionSelector": "a9cd6a2d", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "updateAssetState", + "scope": 1604, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "UAI", + "scope": 1434, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1369, + "name": "ElementaryTypeName", + "src": "2996:7:8" + } + ], + "id": 1370, + "name": "VariableDeclaration", + "src": "2996:11:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "newStateCommitHash", + "scope": 1434, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1371, + "name": "ElementaryTypeName", + "src": "3009:7:8" + } + ], + "id": 1372, + "name": "VariableDeclaration", + "src": "3009:26:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "rootHash", + "scope": 1434, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1373, + "name": "ElementaryTypeName", + "src": "3037:7:8" + } + ], + "id": 1374, + "name": "VariableDeclaration", + "src": "3037:16:8" + } + ], + "id": 1375, + "name": "ParameterList", + "src": "2995:59:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "", + "scope": 1434, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1376, + "name": "ElementaryTypeName", + "src": "3071:7:8" + } + ], + "id": 1377, + "name": "VariableDeclaration", + "src": "3071:7:8" + } + ], + "id": 1378, + "name": "ParameterList", + "src": "3070:9:8" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8113bcaef69ad64d629f9f9842e44c0195bbec12498295833c352197bdf09d1b", + "typeString": "literal_string \"UAI cannot be zero\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1379, + "name": "Identifier", + "src": "3085:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1370, + "type": "bytes32", + "value": "UAI" + }, + "id": 1380, + "name": "Identifier", + "src": "3093:3:8" + }, + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1381, + "name": "Literal", + "src": "3098:1:8" + } + ], + "id": 1382, + "name": "BinaryOperation", + "src": "3093:6:8" + }, + { + "attributes": { + "hexvalue": "5541492063616e6e6f74206265207a65726f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"UAI cannot be zero\"", + "value": "UAI cannot be zero" + }, + "id": 1383, + "name": "Literal", + "src": "3101:20:8" + } + ], + "id": 1384, + "name": "FunctionCall", + "src": "3085:37:8" + } + ], + "id": 1385, + "name": "ExpressionStatement", + "src": "3085:37:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1288ba10f0c0a9fa84e2f581ad61c72d898b048e206b52821e5663686f23ff37", + "typeString": "literal_string \"Asset must exist\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1386, + "name": "Identifier", + "src": "3126:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1181, + "type": "mapping(bytes32 => bool)", + "value": "UAIstatus" + }, + "id": 1387, + "name": "Identifier", + "src": "3134:9:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1370, + "type": "bytes32", + "value": "UAI" + }, + "id": 1388, + "name": "Identifier", + "src": "3144:3:8" + } + ], + "id": 1389, + "name": "IndexAccess", + "src": "3134:14:8" + }, + { + "attributes": { + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 1390, + "name": "Literal", + "src": "3152:4:8" + } + ], + "id": 1391, + "name": "BinaryOperation", + "src": "3134:22:8" + }, + { + "attributes": { + "hexvalue": "4173736574206d757374206578697374", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"Asset must exist\"", + "value": "Asset must exist" + }, + "id": 1392, + "name": "Literal", + "src": "3158:18:8" + } + ], + "id": 1393, + "name": "FunctionCall", + "src": "3126:52:8" + } + ], + "id": 1394, + "name": "ExpressionStatement", + "src": "3126:52:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fa287c795401a9447e9af39b3f60c2649bae99888868237daa5c7cc28744941b", + "typeString": "literal_string \"newStateCommitHash cannot be zero\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1395, + "name": "Identifier", + "src": "3182:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1372, + "type": "bytes32", + "value": "newStateCommitHash" + }, + "id": 1396, + "name": "Identifier", + "src": "3190:18:8" + }, + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1397, + "name": "Literal", + "src": "3210:1:8" + } + ], + "id": 1398, + "name": "BinaryOperation", + "src": "3190:21:8" + }, + { + "attributes": { + "hexvalue": "6e65775374617465436f6d6d6974486173682063616e6e6f74206265207a65726f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"newStateCommitHash cannot be zero\"", + "value": "newStateCommitHash cannot be zero" + }, + "id": 1399, + "name": "Literal", + "src": "3213:35:8" + } + ], + "id": 1400, + "name": "FunctionCall", + "src": "3182:67:8" + } + ], + "id": 1401, + "name": "ExpressionStatement", + "src": "3182:67:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool) pure", + "value": "require" + }, + "id": 1402, + "name": "Identifier", + "src": "3253:7:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1525, + "type": "function (bytes32,address) returns (bool)", + "value": "isOwner" + }, + "id": 1403, + "name": "Identifier", + "src": "3261:7:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1370, + "type": "bytes32", + "value": "UAI" + }, + "id": 1404, + "name": "Identifier", + "src": "3269:3:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967281, + "type": "msg", + "value": "msg" + }, + "id": 1405, + "name": "Identifier", + "src": "3273:3:8" + } + ], + "id": 1406, + "name": "MemberAccess", + "src": "3273:10:8" + } + ], + "id": 1407, + "name": "FunctionCall", + "src": "3261:23:8" + } + ], + "id": 1408, + "name": "FunctionCall", + "src": "3253:32:8" + } + ], + "id": 1409, + "name": "ExpressionStatement", + "src": "3253:32:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "createAssertionRecord", + "referencedDeclaration": 1016, + "type": "function (bytes32,bytes32,uint256,uint256) external" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1160, + "type": "contract DKGcontract", + "value": "AssertionRegistry" + }, + "id": 1410, + "name": "Identifier", + "src": "3292:17:8" + } + ], + "id": 1412, + "name": "MemberAccess", + "src": "3292:39:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1372, + "type": "bytes32", + "value": "newStateCommitHash" + }, + "id": 1413, + "name": "Identifier", + "src": "3332:18:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1374, + "type": "bytes32", + "value": "rootHash" + }, + "id": 1414, + "name": "Identifier", + "src": "3352:8:8" + }, + { + "attributes": { + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 1415, + "name": "Literal", + "src": "3362:1:8" + }, + { + "attributes": { + "hexvalue": "31", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 1", + "value": "1" + }, + "id": 1416, + "name": "Literal", + "src": "3365:1:8" + } + ], + "id": 1417, + "name": "FunctionCall", + "src": "3292:75:8" + } + ], + "id": 1418, + "name": "ExpressionStatement", + "src": "3292:75:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "bytes32" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "stateCommitHash", + "referencedDeclaration": 1172, + "type": "bytes32" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1177, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1419, + "name": "Identifier", + "src": "3381:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1370, + "type": "bytes32", + "value": "UAI" + }, + "id": 1420, + "name": "Identifier", + "src": "3394:3:8" + } + ], + "id": 1421, + "name": "IndexAccess", + "src": "3381:17:8" + } + ], + "id": 1422, + "name": "MemberAccess", + "src": "3381:33:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1372, + "type": "bytes32", + "value": "newStateCommitHash" + }, + "id": 1423, + "name": "Identifier", + "src": "3418:18:8" + } + ], + "id": 1424, + "name": "Assignment", + "src": "3381:55:8" + } + ], + "id": 1425, + "name": "ExpressionStatement", + "src": "3381:55:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1201, + "type": "function (bytes32,bytes32)", + "value": "UAIUpdatedState" + }, + "id": 1426, + "name": "Identifier", + "src": "3485:15:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1370, + "type": "bytes32", + "value": "UAI" + }, + "id": 1427, + "name": "Identifier", + "src": "3501:3:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1372, + "type": "bytes32", + "value": "newStateCommitHash" + }, + "id": 1428, + "name": "Identifier", + "src": "3506:18:8" + } + ], + "id": 1429, + "name": "FunctionCall", + "src": "3485:40:8" + } + ], + "id": 1430, + "name": "EmitStatement", + "src": "3480:45:8" + }, + { + "attributes": { + "functionReturnParameters": 1378 + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1370, + "type": "bytes32", + "value": "UAI" + }, + "id": 1431, + "name": "Identifier", + "src": "3537:3:8" + } + ], + "id": 1432, + "name": "Return", + "src": "3530:10:8" + } + ], + "id": 1433, + "name": "Block", + "src": "3080:464:8" + } + ], + "id": 1434, + "name": "FunctionDefinition", + "src": "2970:574:8" + }, + { + "attributes": { + "functionSelector": "52569b9d", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getAssetStateCommitHash", + "scope": 1604, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "UAI", + "scope": 1447, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1435, + "name": "ElementaryTypeName", + "src": "3593:7:8" + } + ], + "id": 1436, + "name": "VariableDeclaration", + "src": "3593:11:8" + } + ], + "id": 1437, + "name": "ParameterList", + "src": "3592:13:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "stateCommitHash", + "scope": 1447, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1438, + "name": "ElementaryTypeName", + "src": "3626:7:8" + } + ], + "id": 1439, + "name": "VariableDeclaration", + "src": "3626:23:8" + } + ], + "id": 1440, + "name": "ParameterList", + "src": "3625:25:8" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1440 + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "stateCommitHash", + "referencedDeclaration": 1172, + "type": "bytes32" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1177, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1441, + "name": "Identifier", + "src": "3661:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1436, + "type": "bytes32", + "value": "UAI" + }, + "id": 1442, + "name": "Identifier", + "src": "3674:3:8" + } + ], + "id": 1443, + "name": "IndexAccess", + "src": "3661:17:8" + } + ], + "id": 1444, + "name": "MemberAccess", + "src": "3661:33:8" + } + ], + "id": 1445, + "name": "Return", + "src": "3654:40:8" + } + ], + "id": 1446, + "name": "Block", + "src": "3650:48:8" + } + ], + "id": 1447, + "name": "FunctionDefinition", + "src": "3560:138:8" + }, + { + "attributes": { + "functionSelector": "77636d1d", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getAssetController", + "scope": 1604, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "UAI", + "scope": 1460, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1448, + "name": "ElementaryTypeName", + "src": "3729:7:8" + } + ], + "id": 1449, + "name": "VariableDeclaration", + "src": "3729:11:8" + } + ], + "id": 1450, + "name": "ParameterList", + "src": "3728:13:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "controller", + "scope": 1460, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1451, + "name": "ElementaryTypeName", + "src": "3762:7:8" + } + ], + "id": 1452, + "name": "VariableDeclaration", + "src": "3762:18:8" + } + ], + "id": 1453, + "name": "ParameterList", + "src": "3761:20:8" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1453 + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "controller", + "referencedDeclaration": 1170, + "type": "address" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1177, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1454, + "name": "Identifier", + "src": "3792:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1449, + "type": "bytes32", + "value": "UAI" + }, + "id": 1455, + "name": "Identifier", + "src": "3805:3:8" + } + ], + "id": 1456, + "name": "IndexAccess", + "src": "3792:17:8" + } + ], + "id": 1457, + "name": "MemberAccess", + "src": "3792:28:8" + } + ], + "id": 1458, + "name": "Return", + "src": "3785:35:8" + } + ], + "id": 1459, + "name": "Block", + "src": "3781:43:8" + } + ], + "id": 1460, + "name": "FunctionDefinition", + "src": "3701:123:8" + }, + { + "attributes": { + "functionSelector": "6f3a9229", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getAssetAKA", + "scope": 1604, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "UAI", + "scope": 1473, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1461, + "name": "ElementaryTypeName", + "src": "3848:7:8" + } + ], + "id": 1462, + "name": "VariableDeclaration", + "src": "3848:11:8" + } + ], + "id": 1463, + "name": "ParameterList", + "src": "3847:13:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "alsoKnownAs", + "scope": 1473, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1464, + "name": "ElementaryTypeName", + "src": "3881:7:8" + } + ], + "id": 1465, + "name": "VariableDeclaration", + "src": "3881:19:8" + } + ], + "id": 1466, + "name": "ParameterList", + "src": "3880:21:8" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1466 + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "alsoKnownAs", + "referencedDeclaration": 1166, + "type": "bytes32" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1177, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1467, + "name": "Identifier", + "src": "3912:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1462, + "type": "bytes32", + "value": "UAI" + }, + "id": 1468, + "name": "Identifier", + "src": "3925:3:8" + } + ], + "id": 1469, + "name": "IndexAccess", + "src": "3912:17:8" + } + ], + "id": 1470, + "name": "MemberAccess", + "src": "3912:29:8" + } + ], + "id": 1471, + "name": "Return", + "src": "3905:36:8" + } + ], + "id": 1472, + "name": "Block", + "src": "3901:44:8" + } + ], + "id": 1473, + "name": "FunctionDefinition", + "src": "3827:118:8" + }, + { + "attributes": { + "functionSelector": "7f58afc8", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getAssetCreationTimestamp", + "scope": 1604, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "UAI", + "scope": 1486, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1474, + "name": "ElementaryTypeName", + "src": "3983:7:8" + } + ], + "id": 1475, + "name": "VariableDeclaration", + "src": "3983:11:8" + } + ], + "id": 1476, + "name": "ParameterList", + "src": "3982:13:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "creationTimestamp", + "scope": 1486, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1477, + "name": "ElementaryTypeName", + "src": "4016:7:8" + } + ], + "id": 1478, + "name": "VariableDeclaration", + "src": "4016:25:8" + } + ], + "id": 1479, + "name": "ParameterList", + "src": "4015:27:8" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1479 + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "creationTimestamp", + "referencedDeclaration": 1164, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1177, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1480, + "name": "Identifier", + "src": "4053:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1475, + "type": "bytes32", + "value": "UAI" + }, + "id": 1481, + "name": "Identifier", + "src": "4066:3:8" + } + ], + "id": 1482, + "name": "IndexAccess", + "src": "4053:17:8" + } + ], + "id": 1483, + "name": "MemberAccess", + "src": "4053:35:8" + } + ], + "id": 1484, + "name": "Return", + "src": "4046:42:8" + } + ], + "id": 1485, + "name": "Block", + "src": "4042:50:8" + } + ], + "id": 1486, + "name": "FunctionDefinition", + "src": "3948:144:8" + }, + { + "attributes": { + "functionSelector": "2f1704bc", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "getAssertionRegistry", + "scope": 1604, + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1487, + "name": "ParameterList", + "src": "4124:2:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "assertionRegistry", + "scope": 1494, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1488, + "name": "ElementaryTypeName", + "src": "4147:7:8" + } + ], + "id": 1489, + "name": "VariableDeclaration", + "src": "4147:25:8" + } + ], + "id": 1490, + "name": "ParameterList", + "src": "4146:27:8" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1490 + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1162, + "type": "address", + "value": "AssertionRegistryAddress" + }, + "id": 1491, + "name": "Identifier", + "src": "4184:24:8" + } + ], + "id": 1492, + "name": "Return", + "src": "4177:31:8" + } + ], + "id": 1493, + "name": "Block", + "src": "4173:39:8" + } + ], + "id": 1494, + "name": "FunctionDefinition", + "src": "4095:117:8" + }, + { + "attributes": { + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "determineType", + "scope": 1604, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "text": " @dev Should determine type of ``contractAddress``, if possible, returning enum AssetType" + }, + "id": 1495, + "name": "StructuredDocumentation", + "src": "4230:107:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "contractAddress", + "scope": 1507, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1496, + "name": "ElementaryTypeName", + "src": "4366:7:8" + } + ], + "id": 1497, + "name": "VariableDeclaration", + "src": "4366:23:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "id", + "scope": 1507, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1498, + "name": "ElementaryTypeName", + "src": "4391:7:8" + } + ], + "id": 1499, + "name": "VariableDeclaration", + "src": "4391:10:8" + } + ], + "id": 1500, + "name": "ParameterList", + "src": "4365:37:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "", + "scope": 1507, + "stateVariable": false, + "storageLocation": "default", + "type": "uint8", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 1501, + "name": "ElementaryTypeName", + "src": "4421:5:8" + } + ], + "id": 1502, + "name": "VariableDeclaration", + "src": "4421:5:8" + } + ], + "id": 1503, + "name": "ParameterList", + "src": "4420:7:8" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1503 + }, + "children": [ + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1504, + "name": "Literal", + "src": "4438:1:8" + } + ], + "id": 1505, + "name": "Return", + "src": "4431:8:8" + } + ], + "id": 1506, + "name": "Block", + "src": "4427:62:8" + } + ], + "id": 1507, + "name": "FunctionDefinition", + "src": "4343:146:8" + }, + { + "attributes": { + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "isOwner", + "scope": 1604, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "text": " @dev Returns bool checking if ``owner`` is controller of ``UAI``" + }, + "id": 1508, + "name": "StructuredDocumentation", + "src": "4492:83:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "UAI", + "scope": 1525, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1509, + "name": "ElementaryTypeName", + "src": "4598:7:8" + } + ], + "id": 1510, + "name": "VariableDeclaration", + "src": "4598:11:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "owner", + "scope": 1525, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "stateMutability": "nonpayable", + "type": "address" + }, + "id": 1511, + "name": "ElementaryTypeName", + "src": "4611:7:8" + } + ], + "id": 1512, + "name": "VariableDeclaration", + "src": "4611:13:8" + } + ], + "id": 1513, + "name": "ParameterList", + "src": "4597:28:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "", + "scope": 1525, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1514, + "name": "ElementaryTypeName", + "src": "4644:4:8" + } + ], + "id": 1515, + "name": "VariableDeclaration", + "src": "4644:4:8" + } + ], + "id": 1516, + "name": "ParameterList", + "src": "4643:6:8" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 1516 + }, + "children": [ + { + "attributes": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1512, + "type": "address", + "value": "owner" + }, + "id": 1517, + "name": "Identifier", + "src": "4665:5:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "member_name": "controller", + "referencedDeclaration": 1170, + "type": "address" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "struct UAIRegistry.AssetRecord storage ref" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1177, + "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", + "value": "assetRecords" + }, + "id": 1518, + "name": "Identifier", + "src": "4674:12:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1510, + "type": "bytes32", + "value": "UAI" + }, + "id": 1519, + "name": "Identifier", + "src": "4687:3:8" + } + ], + "id": 1520, + "name": "IndexAccess", + "src": "4674:17:8" + } + ], + "id": 1521, + "name": "MemberAccess", + "src": "4674:28:8" + } + ], + "id": 1522, + "name": "BinaryOperation", + "src": "4665:37:8" + } + ], + "id": 1523, + "name": "Return", + "src": "4658:44:8" + } + ], + "id": 1524, + "name": "Block", + "src": "4650:60:8" + } + ], + "id": 1525, + "name": "FunctionDefinition", + "src": "4581:129:8" + }, + { + "attributes": { + "functionSelector": "d15b223e", + "implemented": true, + "isConstructor": false, + "kind": "function", + "modifiers": [ + null + ], + "name": "depositTokens", + "scope": 1604, + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "text": " @dev Deposits tokens in ``amount`` to specific ``UAI``" + }, + "id": 1526, + "name": "StructuredDocumentation", + "src": "4713:73:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "amount", + "scope": 1603, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 1527, + "name": "ElementaryTypeName", + "src": "4815:7:8" + } + ], + "id": 1528, + "name": "VariableDeclaration", + "src": "4815:14:8" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "UAI", + "scope": 1603, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes32", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes32", + "type": "bytes32" + }, + "id": 1529, + "name": "ElementaryTypeName", + "src": "4831:7:8" + } + ], + "id": 1530, + "name": "VariableDeclaration", + "src": "4831:11:8" + } + ], + "id": 1531, + "name": "ParameterList", + "src": "4814:29:8" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 1532, + "name": "ParameterList", + "src": "4851:0:8" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8beea76deddeff1012d90e1e8da369393f885b0575eb094a33da9912cc4bbb8b", + "typeString": "literal_string \"Amount cannot be zero\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1533, + "name": "Identifier", + "src": "4860:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "uint256", + "value": "amount" + }, + "id": 1534, + "name": "Identifier", + "src": "4868:6:8" + }, + { + "attributes": { + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 1535, + "name": "Literal", + "src": "4875:1:8" + } + ], + "id": 1536, + "name": "BinaryOperation", + "src": "4868:8:8" + }, + { + "attributes": { + "hexvalue": "416d6f756e742063616e6e6f74206265207a65726f", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"Amount cannot be zero\"", + "value": "Amount cannot be zero" + }, + "id": 1537, + "name": "Literal", + "src": "4878:23:8" + } + ], + "id": 1538, + "name": "FunctionCall", + "src": "4860:42:8" + } + ], + "id": 1539, + "name": "ExpressionStatement", + "src": "4860:42:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3bc5ac98536c45d410bf37692b674d7f6ad3249fabf29eadc142b2e562988389", + "typeString": "literal_string \"Sender allowance must be equal to or higher than chosen amount\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1540, + "name": "Identifier", + "src": "4910:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "allowance", + "referencedDeclaration": 635, + "type": "function (address,address) view external returns (uint256)" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1158, + "type": "contract IERC20", + "value": "token" + }, + "id": 1541, + "name": "Identifier", + "src": "4918:5:8" + } + ], + "id": 1542, + "name": "MemberAccess", + "src": "4918:15:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967281, + "type": "msg", + "value": "msg" + }, + "id": 1543, + "name": "Identifier", + "src": "4934:3:8" + } + ], + "id": 1544, + "name": "MemberAccess", + "src": "4934:10:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UAIRegistry_$1604", + "typeString": "contract UAIRegistry" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)" + }, + "children": [ + { + "attributes": { + "name": "address" + }, + "id": 1545, + "name": "ElementaryTypeName", + "src": "4946:7:8" + } + ], + "id": 1546, + "name": "ElementaryTypeNameExpression", + "src": "4946:7:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967268, + "type": "contract UAIRegistry", + "value": "this" + }, + "id": 1547, + "name": "Identifier", + "src": "4954:4:8" + } + ], + "id": 1548, + "name": "FunctionCall", + "src": "4946:13:8" + } + ], + "id": 1549, + "name": "FunctionCall", + "src": "4918:42:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "uint256", + "value": "amount" + }, + "id": 1550, + "name": "Identifier", + "src": "4964:6:8" + } + ], + "id": 1551, + "name": "BinaryOperation", + "src": "4918:52:8" + }, + { + "attributes": { + "hexvalue": "53656e64657220616c6c6f77616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e74", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"Sender allowance must be equal to or higher than chosen amount\"", + "value": "Sender allowance must be equal to or higher than chosen amount" + }, + "id": 1552, + "name": "Literal", + "src": "4972:64:8" + } + ], + "id": 1553, + "name": "FunctionCall", + "src": "4910:127:8" + } + ], + "id": 1554, + "name": "ExpressionStatement", + "src": "4910:127:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_262e509abce0ea4c77b39344642b82be870ee6d03e35d57d1dee69295a1e383b", + "typeString": "literal_string \"Sender balance must be equal to or higher than chosen amount!\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1555, + "name": "Identifier", + "src": "5045:7:8" + }, + { + "attributes": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "balanceOf", + "referencedDeclaration": 615, + "type": "function (address) view external returns (uint256)" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1158, + "type": "contract IERC20", + "value": "token" + }, + "id": 1556, + "name": "Identifier", + "src": "5053:5:8" + } + ], + "id": 1557, + "name": "MemberAccess", + "src": "5053:15:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967281, + "type": "msg", + "value": "msg" + }, + "id": 1558, + "name": "Identifier", + "src": "5069:3:8" + } + ], + "id": 1559, + "name": "MemberAccess", + "src": "5069:10:8" + } + ], + "id": 1560, + "name": "FunctionCall", + "src": "5053:27:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "uint256", + "value": "amount" + }, + "id": 1561, + "name": "Identifier", + "src": "5084:6:8" + } + ], + "id": 1562, + "name": "BinaryOperation", + "src": "5053:37:8" + }, + { + "attributes": { + "hexvalue": "53656e6465722062616c616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e7421", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"Sender balance must be equal to or higher than chosen amount!\"", + "value": "Sender balance must be equal to or higher than chosen amount!" + }, + "id": 1563, + "name": "Literal", + "src": "5092:63:8" + } + ], + "id": 1564, + "name": "FunctionCall", + "src": "5045:111:8" + } + ], + "id": 1565, + "name": "ExpressionStatement", + "src": "5045:111:8" + }, + { + "attributes": { + "assignments": [ + 1567 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "transaction_result", + "scope": 1602, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 1566, + "name": "ElementaryTypeName", + "src": "5165:4:8" + } + ], + "id": 1567, + "name": "VariableDeclaration", + "src": "5165:23:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "transferFrom", + "referencedDeclaration": 657, + "type": "function (address,address,uint256) external returns (bool)" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1158, + "type": "contract IERC20", + "value": "token" + }, + "id": 1568, + "name": "Identifier", + "src": "5191:5:8" + } + ], + "id": 1569, + "name": "MemberAccess", + "src": "5191:18:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967281, + "type": "msg", + "value": "msg" + }, + "id": 1570, + "name": "Identifier", + "src": "5210:3:8" + } + ], + "id": 1571, + "name": "MemberAccess", + "src": "5210:10:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UAIRegistry_$1604", + "typeString": "contract UAIRegistry" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)" + }, + "children": [ + { + "attributes": { + "name": "address" + }, + "id": 1572, + "name": "ElementaryTypeName", + "src": "5222:7:8" + } + ], + "id": 1573, + "name": "ElementaryTypeNameExpression", + "src": "5222:7:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967268, + "type": "contract UAIRegistry", + "value": "this" + }, + "id": 1574, + "name": "Identifier", + "src": "5230:4:8" + } + ], + "id": 1575, + "name": "FunctionCall", + "src": "5222:13:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "uint256", + "value": "amount" + }, + "id": 1576, + "name": "Identifier", + "src": "5237:6:8" + } + ], + "id": 1577, + "name": "FunctionCall", + "src": "5191:53:8" + } + ], + "id": 1578, + "name": "VariableDeclarationStatement", + "src": "5165:79:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c60aa67373380e582a977ce48d7156e19a6358c471790919f2371ebd75aaf7c7", + "typeString": "literal_string \"Token transaction execution failed!\"" + } + ], + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "type": "function (bool,string memory) pure", + "value": "require" + }, + "id": 1579, + "name": "Identifier", + "src": "5252:7:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1567, + "type": "bool", + "value": "transaction_result" + }, + "id": 1580, + "name": "Identifier", + "src": "5260:18:8" + }, + { + "attributes": { + "hexvalue": "546f6b656e207472616e73616374696f6e20657865637574696f6e206661696c656421", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "token": "string", + "type": "literal_string \"Token transaction execution failed!\"", + "value": "Token transaction execution failed!" + }, + "id": 1581, + "name": "Literal", + "src": "5280:37:8" + } + ], + "id": 1582, + "name": "FunctionCall", + "src": "5252:66:8" + } + ], + "id": 1583, + "name": "ExpressionStatement", + "src": "5252:66:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1185, + "type": "mapping(bytes32 => uint256)", + "value": "assetStake" + }, + "id": 1584, + "name": "Identifier", + "src": "5463:10:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1530, + "type": "bytes32", + "value": "UAI" + }, + "id": 1585, + "name": "Identifier", + "src": "5474:3:8" + } + ], + "id": 1586, + "name": "IndexAccess", + "src": "5463:15:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "add", + "referencedDeclaration": 303, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1185, + "type": "mapping(bytes32 => uint256)", + "value": "assetStake" + }, + "id": 1587, + "name": "Identifier", + "src": "5481:10:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1530, + "type": "bytes32", + "value": "UAI" + }, + "id": 1588, + "name": "Identifier", + "src": "5492:3:8" + } + ], + "id": 1589, + "name": "IndexAccess", + "src": "5481:15:8" + } + ], + "id": 1590, + "name": "MemberAccess", + "src": "5481:19:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "uint256", + "value": "amount" + }, + "id": 1591, + "name": "Identifier", + "src": "5501:6:8" + } + ], + "id": 1592, + "name": "FunctionCall", + "src": "5481:27:8" + } + ], + "id": 1593, + "name": "Assignment", + "src": "5463:45:8" + } + ], + "id": 1594, + "name": "ExpressionStatement", + "src": "5463:45:8" + }, + { + "children": [ + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1209, + "type": "function (bytes32,uint256,address)", + "value": "TokensDepositedToAsset" + }, + "id": 1595, + "name": "Identifier", + "src": "5517:22:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1530, + "type": "bytes32", + "value": "UAI" + }, + "id": 1596, + "name": "Identifier", + "src": "5540:3:8" + }, + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1528, + "type": "uint256", + "value": "amount" + }, + "id": 1597, + "name": "Identifier", + "src": "5545:6:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967281, + "type": "msg", + "value": "msg" + }, + "id": 1598, + "name": "Identifier", + "src": "5552:3:8" + } + ], + "id": 1599, + "name": "MemberAccess", + "src": "5552:10:8" + } + ], + "id": 1600, + "name": "FunctionCall", + "src": "5517:46:8" + } + ], + "id": 1601, + "name": "EmitStatement", + "src": "5512:51:8" + } + ], + "id": 1602, + "name": "Block", + "src": "4851:717:8" + } + ], + "id": 1603, + "name": "FunctionDefinition", + "src": "4792:776:8" + } + ], + "id": 1604, + "name": "ContractDefinition", + "src": "623:4950:8" + } + ], + "id": 1605, + "name": "SourceUnit", + "src": "0:5573:8" + }, + "compiler": { + "name": "solc", + "version": "0.7.6+commit.7338295f.Emscripten.clang" + }, + "networks": { + "5777": { + "events": { + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + "0x2460c4e801cd784222555963fc8a1f1497f9ce3b23446fa14da62d3170989333": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "depositor", + "type": "address" + } + ], + "name": "TokensDepositedToAsset", + "type": "event" + }, + "0x2f87578a4aeec4a0b61bbcea1767fec00fa79a35cf600b258509e25acdaba8e7": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + } + ], + "name": "UAICreated", + "type": "event" + }, + "0x52db5c2cb9235be3e8a3fe47f4ec4bc55b5e28aa119b750b0e766b1cb00c9aa7": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "assertionRegistryAddress", + "type": "address" + } + ], + "name": "UAIRegistryInit", + "type": "event" + }, + "0xa83f066abfa07a77196c29bd4b7aab88f194feaa03d9769ec2ceccf6701d06de": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + } + ], + "name": "UAIUpdatedState", + "type": "event" + } + }, + "links": {}, + "address": "0x04d5396358647Cd863293c156037D0AC02328c32", + "transactionHash": "0xc7edfcc3adbf8b60d4fe405679efc9f4b039fb3f416a36faac9de24be69826bf" + } + }, + "schemaVersion": "3.4.3", + "updatedAt": "2022-02-10T19:25:20.340Z", + "networkType": "ethereum", + "devdoc": { + "kind": "dev", + "methods": { + "depositTokens(uint256,bytes32)": { + "details": "Deposits tokens in ``amount`` to specific ``UAI``" + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/config/config.json b/config/config.json index d4ddfc5d9d..02fada2862 100644 --- a/config/config.json +++ b/config/config.json @@ -8,11 +8,11 @@ }, "blockchain": [ { - "blockchainTitle": "Polygon", - "networkId": "polygon::mainnet", - "hubContractAddress": "0xFA421f2b10FBebaAeC281eb6734b0fA9Cc8dbbD7", + "blockchainTitle": "Ganache", + "networkId": "ganache::mainnet", + "hubContractAddress": "0x04d5396358647Cd863293c156037D0AC02328c32", "rpcEndpoints": [ - "https://rpc-mumbai.maticvigil.com/" + "http://localhost:7545" ] } ], diff --git a/external/merkle-validation-service.js b/external/merkle-validation-service.js index 5a5ab6881a..3556a7fa6b 100644 --- a/external/merkle-validation-service.js +++ b/external/merkle-validation-service.js @@ -63,6 +63,7 @@ class MerkleValidationService { } calculateRootHash(assertion) { + console.log(assertion); const tree = new MerkleTools({ hashType: 'sha256', }); diff --git a/external/web3-blockchain-service.js b/external/web3-blockchain-service.js index bc569d174c..2f818013ed 100644 --- a/external/web3-blockchain-service.js +++ b/external/web3-blockchain-service.js @@ -1,6 +1,7 @@ const Web3 = require('web3'); const BigNumber = require('big-number'); const DKGContract = require('../build/contracts/DKGcontract.json').abi; +const UAIRegistry = require('../build/contracts/UAIRegistry.json').abi; const constants = require('../modules/constants'); class Web3BlockchainService { @@ -22,12 +23,12 @@ class Web3BlockchainService { return this.config.publicKey; } - async sendProofs(assertion) { - // const contractAddress = "0xF21dD87cFC5cF5D073398833AFe5EFC543b78a00"; - const contractAddress = this.config.hubContractAddress; + async createAssertionRecord(stateCommitHash, rootHash) { + const contractAddress = await this.getAssertionRegistryAddress(); const contractInstance = new this.web3.eth.Contract(DKGContract, contractAddress); - const encodedABI = contractInstance.methods.createAssertionRecord(`0x${assertion.id}`,`0x${assertion.rootHash}`, + + const encodedABI = contractInstance.methods.createAssertionRecord(`0x${stateCommitHash}`, `0x${rootHash}`, new BigNumber(1), new BigNumber(1)).encodeABI(); const tx = { @@ -43,13 +44,71 @@ class Web3BlockchainService { return {transactionHash: result.transactionHash, blockchain: this.config.networkId}; } - async getProofs(proofs) { - // const contractAddress = "0xF21dD87cFC5cF5D073398833AFe5EFC543b78a00"; + async registerAsset(uai, type, alsoKnownAs, stateCommitHash, rootHash, tokenAmount) { + const contractAddress = this.config.hubContractAddress; + const contractInstance = new this.web3.eth.Contract(UAIRegistry, contractAddress); + + const encodedABI = contractInstance.methods.registerAsset(`0x${uai}`, 0, `0x${uai}`, `0x${stateCommitHash}`, `0x${rootHash}`, 1).encodeABI(); + const tx = { + from: this.config.publicKey, + to: contractInstance.options.address, + data: encodedABI, + gasPrice: '2000000000', + gas: '500000', + }; + + const createdTransaction = await this.web3.eth.accounts.signTransaction(tx, this.config.privateKey); + const result = await this.web3.eth.sendSignedTransaction(createdTransaction.rawTransaction); + return {transactionHash: result.transactionHash, blockchain: this.config.networkId}; + } + + async updateAsset(UAI, newStateCommitHash, rootHash) { const contractAddress = this.config.hubContractAddress; + const contractInstance = new this.web3.eth.Contract(UAIRegistry, contractAddress); + + const encodedABI = contractInstance.methods.updateAssetState(`0x${UAI}`, `0x${newStateCommitHash}`, `0x${rootHash}`).encodeABI(); + const tx = { + from: this.config.publicKey, + to: contractInstance.options.address, + data: encodedABI, + gasPrice: '2000000000', + gas: '200000', + }; + + const createdTransaction = await this.web3.eth.accounts.signTransaction(tx, this.config.privateKey); + const result = await this.web3.eth.sendSignedTransaction(createdTransaction.rawTransaction); + return {transactionHash: result.transactionHash, blockchain: this.config.networkId}; + } + + async getAssertionProofs(assertionId) { + const contractAddress = await this.getAssertionRegistryAddress(); const contractInstance = new this.web3.eth.Contract(DKGContract, contractAddress); - const issuer = await contractInstance.methods.getAssertionIssuer(proofs).call(); - return issuer; + const issuer = await contractInstance.methods.getAssertionIssuer(`0x${assertionId}`).call(); + const rootHash = await contractInstance.methods.getAssertionRootHash(`0x${assertionId}`).call(); + return { issuer, rootHash }; + } + + async getAssetProofs(ual) { + const contractAddress = this.config.hubContractAddress; + const contractInstance = new this.web3.eth.Contract(UAIRegistry, contractAddress); + + const issuer = await contractInstance.methods.getAssetController(`0x${ual}`).call(); + let assertionId = await contractInstance.methods.getAssetStateCommitHash(`0x${ual}`).call(); + if (assertionId === '0x0000000000000000000000000000000000000000000000000000000000000000') + assertionId = undefined; + else + assertionId = assertionId.slice(2); + return {issuer, assertionId}; + } + + + async getAssertionRegistryAddress() { + const contractAddress = this.config.hubContractAddress; + const contractInstance = new this.web3.eth.Contract(UAIRegistry, contractAddress); + + const address = await contractInstance.methods.getAssertionRegistry().call(); + return address; } async healthCheck() { diff --git a/modules/command/publish/send-assertion-command.js b/modules/command/publish/send-assertion-command.js index afc0625f60..57fbb5519a 100644 --- a/modules/command/publish/send-assertion-command.js +++ b/modules/command/publish/send-assertion-command.js @@ -27,7 +27,7 @@ class SendAssertionCommand extends Command { } let nodes = []; - for (const keyword of assertion.metadata.keywords) { + for (const keyword of assertion.metadata.keywords.concat(assertion.id)) { this.logger.info( `Searching for closest ${this.config.replicationFactor} node(s) for keyword ${keyword}`, ); diff --git a/modules/command/publish/submit-proofs-command.js b/modules/command/publish/submit-proofs-command.js index 1d86faa1d1..52540eb796 100644 --- a/modules/command/publish/submit-proofs-command.js +++ b/modules/command/publish/submit-proofs-command.js @@ -18,14 +18,25 @@ class SubmitProofsCommand extends Command { * @param command */ async execute(command) { - const { documentPath, handlerId } = command.data; + const { documentPath, handlerId, method } = command.data; try { let { nquads, assertion } = await this.fileService.loadJsonFromFile(documentPath); - //TODO extend for asset - this.logger.info(`Sending transaction to the blockchain: createAssertionRecord(${assertion.id},${assertion.rootHash})`); - const { transactionHash, blockchain } = await this.blockchainService.sendProofs(assertion); + this.logger.info(`Sending transaction to the blockchain`); + let result; + switch (method) { + case 'publish': + result = await this.blockchainService.createAssertionRecord(assertion.id, assertion.rootHash); + break; + case 'provision': + result = await this.blockchainService.registerAsset(assertion.metadata.UALs[0],assertion.metadata.type,assertion.metadata.UALs[0],assertion.id, assertion.rootHash, 1); + break; + case 'update': + result = await this.blockchainService.updateAsset(assertion.metadata.UALs[0],assertion.id, assertion.rootHash); + break; + } + const { transactionHash, blockchain } = result; this.logger.info(`Transaction hash is ${transactionHash} on ${blockchain}`); assertion.blockchain = { diff --git a/modules/controller/rpc-controller.js b/modules/controller/rpc-controller.js index 7ef7b02a6f..4b454dc9ba 100644 --- a/modules/controller/rpc-controller.js +++ b/modules/controller/rpc-controller.js @@ -191,16 +191,23 @@ class RpcController { this.logger.info(`Resolve for ${ids} with handler id ${handlerId} initiated.`); const response = []; - for (const id of ids) { - let result = await this.dataService.resolve(id, true); - if (result) { - let {nquads, isAsset} = result; + for (let id of ids) { + let isAsset = false; + let {assertionId} = await this.blockchainService.getAssetProofs(id); + if (assertionId) { + isAsset = true; + id = assertionId; + } + const result = await this.dataService.resolve(id, true); + + if (!(result && result.nquads)) { + let {nquads} = result; let assertion = await this.dataService.createAssertion(nquads); assertion.jsonld.metadata = JSON.parse(sortedStringify(assertion.jsonld.metadata)) assertion.jsonld.data = JSON.parse(sortedStringify(await this.dataService.fromNQuads(assertion.jsonld.data, assertion.jsonld.metadata.type))) response.push(isAsset ? { type: 'asset', - id: id, + id: assertion.jsonld.metadata.UALs[0], result: { metadata: { type: assertion.jsonld.metadata.type, @@ -222,14 +229,14 @@ class RpcController { this.logger.warn(`Found only ${nodes.length} node(s) for keyword ${id}`); nodes = [...new Set(nodes)]; for (const node of nodes) { - const result = await this.queryService.resolve(id, req.query.load, node); + const result = await this.queryService.resolve(id, req.query.load, isAsset, node); if (result) { - const {assertion, isAsset} = result; + const {assertion} = result; assertion.jsonld.metadata = JSON.parse(sortedStringify(assertion.jsonld.metadata)) assertion.jsonld.data = JSON.parse(sortedStringify(await this.dataService.fromNQuads(assertion.jsonld.data, assertion.jsonld.metadata.type))) response.push(isAsset ? { type: 'asset', - id: id, + id: assertion.jsonld.metadata.UALs[0], result: { metadata: { type: assertion.jsonld.metadata.type, diff --git a/modules/service/blockchain-service.js b/modules/service/blockchain-service.js index 6b05e2fec2..0061c36119 100644 --- a/modules/service/blockchain-service.js +++ b/modules/service/blockchain-service.js @@ -29,12 +29,22 @@ class BlockchainService { return this.implementation.getPublicKey(); } - async sendProofs(assertion) { - return this.implementation.sendProofs(assertion); + async createAssertionRecord(stateCommitHash, rootHash) { + return this.implementation.createAssertionRecord(stateCommitHash, rootHash); + } + async registerAsset(uai, type, alsoKnownAs, stateCommitHash, rootHash, tokenAmount) { + return this.implementation.registerAsset(uai, type, alsoKnownAs, stateCommitHash, rootHash, tokenAmount); + } + async updateAsset(UAI, newStateCommitHash, rootHash) { + return this.implementation.updateAsset(UAI, newStateCommitHash, rootHash); + } + + async getAssertionProofs(assertionId) { + return this.implementation.getAssertionProofs(assertionId); } - async getProofs(proofs) { - return this.implementation.getProofs(proofs); + async getAssetProofs(ual) { + return this.implementation.getAssetProofs(ual); } async healthCheck() { diff --git a/modules/service/data-service.js b/modules/service/data-service.js index 4fad15dd0e..a75f0bc18a 100644 --- a/modules/service/data-service.js +++ b/modules/service/data-service.js @@ -13,6 +13,7 @@ class DataService { this.networkService = ctx.networkService; this.nodeService = ctx.nodeService; this.workerPool = ctx.workerPool; + this.blockchainService = ctx.blockchainService; } getName() { @@ -132,7 +133,7 @@ class DataService { return {jsonld, nquads}; } - verifyAssertion(assertion, rdf) { + verifyAssertion(assertion, rdf, options = undefined) { return new Promise(async (resolve) => { try { // let dataHash; @@ -165,16 +166,48 @@ class DataService { } if (assertion.metadata.visibility) { - const calculateRootHash = this.validationService.calculateRootHash([...new Set(rdf)]); - //TODO integrate blockchain - // if (assertion.rootHash !== calculateRootHash) { - // this.logger.error({ - // msg: `Root hash ${assertion.rootHash} doesn't match with calculated ${calculateRootHash}`, - // Event_name: constants.ERROR_TYPE.VERIFY_ASSERTION_ERROR, - // Event_value1: 'Root hash not matching calculated', - // }); - // return resolve(false); - // } + if (assertion.metadata.UALs && (!options || (options && options.isAsset))){ + console.log(options); + const {issuer, assertionId} = await this.blockchainService.getAssetProofs(assertion.metadata.UALs[0]); + if (assertionId !== assertion.id) { + this.logger.error({ + msg: `Assertion ${assertion.id} doesn't match with calculated ${assertionId}`, + Event_name: constants.ERROR_TYPE.VERIFY_ASSERTION_ERROR, + Event_value1: 'AssertionId not matching calculated', + }); + return resolve(false); + } + if (issuer.toLowerCase() !== assertion.metadata.issuer.toLowerCase()) { + this.logger.error({ + msg: `Issuer ${issuer} doesn't match with received ${assertion.metadata.issuer}`, + Event_name: constants.ERROR_TYPE.VERIFY_ASSERTION_ERROR, + Event_value1: 'Issuer not matching', + }); + return resolve(false); + } + } else{ + const calculateRootHash = this.validationService.calculateRootHash([...new Set(rdf)]); + console.log(assertion.id); + const res = await this.blockchainService.getAssertionProofs(assertion.id); + console.log(res); + console.log(assertion.metadata); + if (res.rootHash !== `0x${calculateRootHash}`) { + this.logger.error({ + msg: `Root hash ${res.rootHash} doesn't match with calculated ${calculateRootHash}`, + Event_name: constants.ERROR_TYPE.VERIFY_ASSERTION_ERROR, + Event_value1: 'Root hash not matching calculated', + }); + return resolve(false); + } + if (res.issuer.toLowerCase() !== assertion.metadata.issuer.toLowerCase()) { + this.logger.error({ + msg: `Issuer ${res.issuer} doesn't match with received ${assertion.metadata.issuer}`, + Event_name: constants.ERROR_TYPE.VERIFY_ASSERTION_ERROR, + Event_value1: 'Issuer not matching', + }); + return resolve(false); + } + } } return resolve(true); } catch (e) { diff --git a/modules/service/publish-service.js b/modules/service/publish-service.js index d1c3ad84dd..9057f737d7 100644 --- a/modules/service/publish-service.js +++ b/modules/service/publish-service.js @@ -22,10 +22,13 @@ class PublishService { assertion.metadata.visibility = visibility; assertion.metadata.keywords = keywords; assertion.metadata.keywords.sort(); + let method = 'publish'; if (ual === null) { + method = 'provision'; ual = this.validationService.calculateHash(assertion.metadata.timestamp + assertion.metadata.type + assertion.metadata.issuer); assertion.metadata.UALs = [ual]; } else if (ual !== undefined) { + method = 'update'; assertion.metadata.UALs = [ual]; } @@ -67,7 +70,7 @@ class PublishService { sequence: commandSequence.slice(1), delay: 0, data: { - documentPath, handlerId, + documentPath, handlerId, method }, transactional: false, }); diff --git a/modules/service/query-service.js b/modules/service/query-service.js index 29dd38c953..91357d561b 100644 --- a/modules/service/query-service.js +++ b/modules/service/query-service.js @@ -10,7 +10,7 @@ class QueryService { this.fileService = ctx.fileService; } - async resolve(id, load, node) { + async resolve(id, load, isAssetRequested, node) { let result = await this.networkService.sendMessage('/resolve', id, node); if (!result) { @@ -19,7 +19,7 @@ class QueryService { const {nquads, isAsset} = result; let assertion = await this.dataService.createAssertion(nquads); - const status = await this.dataService.verifyAssertion(assertion.jsonld, assertion.nquads); + const status = await this.dataService.verifyAssertion(assertion.jsonld, assertion.nquads, {isAsset: isAssetRequested}); if (status && load) { await this.dataService.insert(nquads.join('\n'), `${constants.DID_PREFIX}:${assertion.json.id}`); From 0b7a15e1fa8ee8697d8325d6e81f2a5ef97c8226 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Fri, 11 Feb 2022 11:42:18 +0100 Subject: [PATCH 45/50] update --- build/contracts/DKGcontract.json | 2252 +++++---- build/contracts/Migrations.json | 6 +- build/contracts/UAIRegistry.json | 4168 +++++++++-------- config/config.json | 10 +- external/merkle-validation-service.js | 1 - external/web3-blockchain-service.js | 6 +- frameDocuments/nft.json | 4 + .../command/publish/submit-proofs-command.js | 2 +- modules/constants.js | 1 + modules/service/blockchain-service.js | 4 +- modules/service/data-service.js | 22 +- 11 files changed, 3385 insertions(+), 3091 deletions(-) create mode 100644 frameDocuments/nft.json diff --git a/build/contracts/DKGcontract.json b/build/contracts/DKGcontract.json index 7645328077..78a927e6ac 100644 --- a/build/contracts/DKGcontract.json +++ b/build/contracts/DKGcontract.json @@ -197,6 +197,11 @@ "name": "rootHash", "type": "bytes32" }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, { "internalType": "uint256", "name": "numberOfEpochs", @@ -366,15 +371,15 @@ "constant": true } ], - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token_address\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assertionIssuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assertionTimeToLive\",\"type\":\"uint256\"}],\"name\":\"AssertionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenAddressSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensCollected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationFailed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"TRAC_TOKEN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assertionTimeToLive\",\"type\":\"uint256\"}],\"name\":\"createAssertionRecord\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionIssuer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionNumberOfEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionRootHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"name\":\"getAssertionTask\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"task\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionTimeToLive\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timeToLive\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"epochAssertionProof\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"epochNumber\",\"type\":\"uint256\"}],\"name\":\"submitHoldingProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"epochAssertionProof\",\"type\":\"bytes32\"}],\"name\":\"verifyAssertionProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"proofValid\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/DKGcontract.sol\":\"DKGcontract\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/access/Ownable.sol\":{\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://90faf5851c02f9bd42c5bfb54d4f0421a2612f50ab80b2c4fa24fa3792071cc2\",\"dweb:/ipfs/QmRGM4F2PcGVF85aTfaA9YBhCHHDqrMhRjyp6fGeBTtirb\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"openzeppelin-solidity/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"project:/contracts/DKGcontract.sol\":{\"keccak256\":\"0xbcf9626ce20959efd101eb22aa1e3baf00e0f3174ea883e38e4fd60c09ce0b04\",\"urls\":[\"bzz-raw://d362a7308bfcdb308316868e5c31e43a38ea2f004523f0b32d4dbc44787d40ea\",\"dweb:/ipfs/QmbwTjuMNtaQRKKDzeK41EQmf1gChTso1dnGeYBrrfwVKF\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516110213803806110218339818101604052602081101561003357600080fd5b810190808051906020019092919050505060006100546101f760201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561012c57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fd82cad5fdc98633445b90f806f2e1a61a5409f92187ee9cd87f1da18c906926660405160405180910390a2506101ff565b600033905090565b610e138061020e6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80638da5cb5b116100715780638da5cb5b146102435780638f9cd32b146102775780639e50e72c146102ab578063b934b4e4146102ed578063ce64c6431461032f578063f2fde38b14610371576100b4565b80630828e9f3146100b957806308c4933b14610111578063193f9c7e1461015d5780636988bc03146101ab578063715018a6146101ed57806373a77389146101f7575b600080fd5b6100e5600480360360208110156100cf57600080fd5b81019080803590602001909291905050506103b5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101476004803603604081101561012757600080fd5b8101908080359060200190929190803590602001909291905050506103f2565b6040518082815260200191505060405180910390f35b6101936004803603604081101561017357600080fd5b8101908080359060200190929190803590602001909291905050506103fd565b60405180821515815260200191505060405180910390f35b6101d7600480360360208110156101c157600080fd5b8101908080359060200190929190505050610409565b6040518082815260200191505060405180910390f35b6101f5610429565b005b6102416004803603608081101561020d57600080fd5b8101908080359060200190929190803590602001909291908035906020019092919080359060200190929190505050610596565b005b61024b610939565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61027f610962565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102d7600480360360208110156102c157600080fd5b8101908080359060200190929190505050610988565b6040518082815260200191505060405180910390f35b6103196004803603602081101561030357600080fd5b81019080803590602001909291905050506109a8565b6040518082815260200191505060405180910390f35b61036f6004803603606081101561034557600080fd5b810190808035906020019092919080359060200190929190803590602001909291905050506109c8565b005b6103b36004803603602081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b4d565b005b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600043905092915050565b60006001905092915050565b600060036000838152602001908152602001600020600001549050919050565b610431610d3f565b73ffffffffffffffffffffffffffffffffffffffff1661044f610939565b73ffffffffffffffffffffffffffffffffffffffff16146104d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000801b84141561060f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b831415610688576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f726f6f744861736820686173682063616e6e6f74206265207a65726f0000000081525060200191505060405180910390fd5b60008214156106e2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610dbc6022913960400191505060405180910390fd5b600081141561073c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610d486027913960400191505060405180910390fd5b60006003600086815260200190815260200160002060020154146107c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f417373657274696f6e20616c726561647920657869737473210000000000000081525060200191505060405180910390fd5b816003600086815260200190815260200160002060010181905550806003600086815260200190815260200160002060000181905550426003600086815260200190815260200160002060020181905550826003600086815260200190815260200160002060040181905550336003600086815260200190815260200160002060030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550336004600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff1683857f25e2604032d2f5a218a9bed084fc10fd98b83e3b86a79ba39c214095984250168585604051808381526020018281526020019250505060405180910390a450505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000838152602001908152602001600020600101549050919050565b600060036000838152602001908152602001600020600401549050919050565b6000801b831415610a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b821415610a9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610d956027913960400191505060405180910390fd5b610aa783836103fd565b15610b0257803373ffffffffffffffffffffffffffffffffffffffff16847fce001fcd900079c312eaa96f5c1c389ffe207eb41e90197f5a011668b58ef598607b6040518082815260200191505060405180910390a4610b48565b803373ffffffffffffffffffffffffffffffffffffffff16847f37d4188105d31e43e2177257c4e9cc2c8eda5c0783943eb00abe942ac687b03a60405160405180910390a45b505050565b610b55610d3f565b73ffffffffffffffffffffffffffffffffffffffff16610b73610939565b73ffffffffffffffffffffffffffffffffffffffff1614610bfc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610d6f6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737365706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726fa2646970667358221220e9906c02530535e52f51357b5e50a4b090c7f3d6115a48819444a950a43b31cc64736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80638da5cb5b116100715780638da5cb5b146102435780638f9cd32b146102775780639e50e72c146102ab578063b934b4e4146102ed578063ce64c6431461032f578063f2fde38b14610371576100b4565b80630828e9f3146100b957806308c4933b14610111578063193f9c7e1461015d5780636988bc03146101ab578063715018a6146101ed57806373a77389146101f7575b600080fd5b6100e5600480360360208110156100cf57600080fd5b81019080803590602001909291905050506103b5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101476004803603604081101561012757600080fd5b8101908080359060200190929190803590602001909291905050506103f2565b6040518082815260200191505060405180910390f35b6101936004803603604081101561017357600080fd5b8101908080359060200190929190803590602001909291905050506103fd565b60405180821515815260200191505060405180910390f35b6101d7600480360360208110156101c157600080fd5b8101908080359060200190929190505050610409565b6040518082815260200191505060405180910390f35b6101f5610429565b005b6102416004803603608081101561020d57600080fd5b8101908080359060200190929190803590602001909291908035906020019092919080359060200190929190505050610596565b005b61024b610939565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61027f610962565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102d7600480360360208110156102c157600080fd5b8101908080359060200190929190505050610988565b6040518082815260200191505060405180910390f35b6103196004803603602081101561030357600080fd5b81019080803590602001909291905050506109a8565b6040518082815260200191505060405180910390f35b61036f6004803603606081101561034557600080fd5b810190808035906020019092919080359060200190929190803590602001909291905050506109c8565b005b6103b36004803603602081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b4d565b005b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600043905092915050565b60006001905092915050565b600060036000838152602001908152602001600020600001549050919050565b610431610d3f565b73ffffffffffffffffffffffffffffffffffffffff1661044f610939565b73ffffffffffffffffffffffffffffffffffffffff16146104d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000801b84141561060f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b831415610688576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f726f6f744861736820686173682063616e6e6f74206265207a65726f0000000081525060200191505060405180910390fd5b60008214156106e2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610dbc6022913960400191505060405180910390fd5b600081141561073c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610d486027913960400191505060405180910390fd5b60006003600086815260200190815260200160002060020154146107c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f417373657274696f6e20616c726561647920657869737473210000000000000081525060200191505060405180910390fd5b816003600086815260200190815260200160002060010181905550806003600086815260200190815260200160002060000181905550426003600086815260200190815260200160002060020181905550826003600086815260200190815260200160002060040181905550336003600086815260200190815260200160002060030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550336004600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff1683857f25e2604032d2f5a218a9bed084fc10fd98b83e3b86a79ba39c214095984250168585604051808381526020018281526020019250505060405180910390a450505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000838152602001908152602001600020600101549050919050565b600060036000838152602001908152602001600020600401549050919050565b6000801b831415610a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b821415610a9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610d956027913960400191505060405180910390fd5b610aa783836103fd565b15610b0257803373ffffffffffffffffffffffffffffffffffffffff16847fce001fcd900079c312eaa96f5c1c389ffe207eb41e90197f5a011668b58ef598607b6040518082815260200191505060405180910390a4610b48565b803373ffffffffffffffffffffffffffffffffffffffff16847f37d4188105d31e43e2177257c4e9cc2c8eda5c0783943eb00abe942ac687b03a60405160405180910390a45b505050565b610b55610d3f565b73ffffffffffffffffffffffffffffffffffffffff16610b73610939565b73ffffffffffffffffffffffffffffffffffffffff1614610bfc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610d6f6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737365706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726fa2646970667358221220e9906c02530535e52f51357b5e50a4b090c7f3d6115a48819444a950a43b31cc64736f6c63430007060033", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token_address\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assertionIssuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assertionTimeToLive\",\"type\":\"uint256\"}],\"name\":\"AssertionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenAddressSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensCollected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationFailed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"TRAC_TOKEN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assertionTimeToLive\",\"type\":\"uint256\"}],\"name\":\"createAssertionRecord\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionIssuer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionNumberOfEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"numberOfEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionRootHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"name\":\"getAssertionTask\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"task\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"}],\"name\":\"getAssertionTimeToLive\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timeToLive\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"epochAssertionProof\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"epochNumber\",\"type\":\"uint256\"}],\"name\":\"submitHoldingProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"assertionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"epochAssertionProof\",\"type\":\"bytes32\"}],\"name\":\"verifyAssertionProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"proofValid\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/DKGcontract.sol\":\"DKGcontract\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/access/Ownable.sol\":{\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://90faf5851c02f9bd42c5bfb54d4f0421a2612f50ab80b2c4fa24fa3792071cc2\",\"dweb:/ipfs/QmRGM4F2PcGVF85aTfaA9YBhCHHDqrMhRjyp6fGeBTtirb\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"openzeppelin-solidity/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"project:/contracts/DKGcontract.sol\":{\"keccak256\":\"0xea0c3c1edba3277ff8a18e50b054ab4d2e1f9434b2554270a4cccb3edb0d9ef3\",\"urls\":[\"bzz-raw://259759777c8a56dae6f5980dd9b6a27725636643e6cc54b0fd6e6f3e997176c6\",\"dweb:/ipfs/QmWzcVDUJ8ymwT6dYd15VhpyZsB9WeCs9BeomSVxr5Cer7\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516110423803806110428339818101604052602081101561003357600080fd5b810190808051906020019092919050505060006100546101f760201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561012c57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fd82cad5fdc98633445b90f806f2e1a61a5409f92187ee9cd87f1da18c906926660405160405180910390a2506101ff565b600033905090565b610e348061020e6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80638f9cd32b116100715780638f9cd32b1461022b5780639e50e72c1461025f578063b934b4e4146102a1578063ce64c643146102e3578063f164c43614610325578063f2fde38b14610391576100b4565b80630828e9f3146100b957806308c4933b14610111578063193f9c7e1461015d5780636988bc03146101ab578063715018a6146101ed5780638da5cb5b146101f7575b600080fd5b6100e5600480360360208110156100cf57600080fd5b81019080803590602001909291905050506103d5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101476004803603604081101561012757600080fd5b810190808035906020019092919080359060200190929190505050610412565b6040518082815260200191505060405180910390f35b6101936004803603604081101561017357600080fd5b81019080803590602001909291908035906020019092919050505061041d565b60405180821515815260200191505060405180910390f35b6101d7600480360360208110156101c157600080fd5b8101908080359060200190929190505050610429565b6040518082815260200191505060405180910390f35b6101f5610449565b005b6101ff6105b6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102336105df565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61028b6004803603602081101561027557600080fd5b8101908080359060200190929190505050610605565b6040518082815260200191505060405180910390f35b6102cd600480360360208110156102b757600080fd5b8101908080359060200190929190505050610625565b6040518082815260200191505060405180910390f35b610323600480360360608110156102f957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610645565b005b61038f600480360360a081101561033b57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291905050506107ca565b005b6103d3600480360360208110156103a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b6e565b005b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600043905092915050565b60006001905092915050565b600060036000838152602001908152602001600020600001549050919050565b610451610d60565b73ffffffffffffffffffffffffffffffffffffffff1661046f6105b6565b73ffffffffffffffffffffffffffffffffffffffff16146104f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000838152602001908152602001600020600101549050919050565b600060036000838152602001908152602001600020600401549050919050565b6000801b8314156106be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b82141561071a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610db66027913960400191505060405180910390fd5b610724838361041d565b1561077f57803373ffffffffffffffffffffffffffffffffffffffff16847fce001fcd900079c312eaa96f5c1c389ffe207eb41e90197f5a011668b58ef598607b6040518082815260200191505060405180910390a46107c5565b803373ffffffffffffffffffffffffffffffffffffffff16847f37d4188105d31e43e2177257c4e9cc2c8eda5c0783943eb00abe942ac687b03a60405160405180910390a45b505050565b6000801b851415610843576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b8414156108bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f726f6f744861736820686173682063616e6e6f74206265207a65726f0000000081525060200191505060405180910390fd5b6000821415610916576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610ddd6022913960400191505060405180910390fd5b6000811415610970576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610d696027913960400191505060405180910390fd5b60006003600087815260200190815260200160002060020154146109fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f417373657274696f6e20616c726561647920657869737473210000000000000081525060200191505060405180910390fd5b816003600087815260200190815260200160002060010181905550806003600087815260200190815260200160002060000181905550426003600087815260200190815260200160002060020181905550836003600087815260200190815260200160002060040181905550826003600087815260200190815260200160002060030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550826004600087815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff1684867f25e2604032d2f5a218a9bed084fc10fd98b83e3b86a79ba39c214095984250168585604051808381526020018281526020019250505060405180910390a45050505050565b610b76610d60565b73ffffffffffffffffffffffffffffffffffffffff16610b946105b6565b73ffffffffffffffffffffffffffffffffffffffff1614610c1d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ca3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610d906026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737365706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726fa2646970667358221220152e1139f6922ba82f151b38f91761c9b96c2f0c3be8314e4fb01b519122451964736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80638f9cd32b116100715780638f9cd32b1461022b5780639e50e72c1461025f578063b934b4e4146102a1578063ce64c643146102e3578063f164c43614610325578063f2fde38b14610391576100b4565b80630828e9f3146100b957806308c4933b14610111578063193f9c7e1461015d5780636988bc03146101ab578063715018a6146101ed5780638da5cb5b146101f7575b600080fd5b6100e5600480360360208110156100cf57600080fd5b81019080803590602001909291905050506103d5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101476004803603604081101561012757600080fd5b810190808035906020019092919080359060200190929190505050610412565b6040518082815260200191505060405180910390f35b6101936004803603604081101561017357600080fd5b81019080803590602001909291908035906020019092919050505061041d565b60405180821515815260200191505060405180910390f35b6101d7600480360360208110156101c157600080fd5b8101908080359060200190929190505050610429565b6040518082815260200191505060405180910390f35b6101f5610449565b005b6101ff6105b6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102336105df565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61028b6004803603602081101561027557600080fd5b8101908080359060200190929190505050610605565b6040518082815260200191505060405180910390f35b6102cd600480360360208110156102b757600080fd5b8101908080359060200190929190505050610625565b6040518082815260200191505060405180910390f35b610323600480360360608110156102f957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610645565b005b61038f600480360360a081101561033b57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291905050506107ca565b005b6103d3600480360360208110156103a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b6e565b005b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600043905092915050565b60006001905092915050565b600060036000838152602001908152602001600020600001549050919050565b610451610d60565b73ffffffffffffffffffffffffffffffffffffffff1661046f6105b6565b73ffffffffffffffffffffffffffffffffffffffff16146104f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000838152602001908152602001600020600101549050919050565b600060036000838152602001908152602001600020600401549050919050565b6000801b8314156106be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b82141561071a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610db66027913960400191505060405180910390fd5b610724838361041d565b1561077f57803373ffffffffffffffffffffffffffffffffffffffff16847fce001fcd900079c312eaa96f5c1c389ffe207eb41e90197f5a011668b58ef598607b6040518082815260200191505060405180910390a46107c5565b803373ffffffffffffffffffffffffffffffffffffffff16847f37d4188105d31e43e2177257c4e9cc2c8eda5c0783943eb00abe942ac687b03a60405160405180910390a45b505050565b6000801b851415610843576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f617373657274696f6e494420686173682063616e6e6f74206265207a65726f0081525060200191505060405180910390fd5b6000801b8414156108bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f726f6f744861736820686173682063616e6e6f74206265207a65726f0000000081525060200191505060405180910390fd5b6000821415610916576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610ddd6022913960400191505060405180910390fd5b6000811415610970576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180610d696027913960400191505060405180910390fd5b60006003600087815260200190815260200160002060020154146109fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f417373657274696f6e20616c726561647920657869737473210000000000000081525060200191505060405180910390fd5b816003600087815260200190815260200160002060010181905550806003600087815260200190815260200160002060000181905550426003600087815260200190815260200160002060020181905550836003600087815260200190815260200160002060040181905550826003600087815260200190815260200160002060030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550826004600087815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff1684867f25e2604032d2f5a218a9bed084fc10fd98b83e3b86a79ba39c214095984250168585604051808381526020018281526020019250505060405180910390a45050505050565b610b76610d60565b73ffffffffffffffffffffffffffffffffffffffff16610b946105b6565b73ffffffffffffffffffffffffffffffffffffffff1614610c1d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ca3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610d906026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737365706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726fa2646970667358221220152e1139f6922ba82f151b38f91761c9b96c2f0c3be8314e4fb01b519122451964736f6c63430007060033", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], - "sourceMap": "286:3619:7:-:0;;;1355:199;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;884:17:0;904:12;:10;;;:12;;:::i;:::-;884:32;;935:9;926:6;;:18;;;;;;;;;;;;;;;;;;992:9;959:43;;988:1;959:43;;;;;;;;;;;;850:159;1433:1:7;1410:25;;:13;:25;;;;1402:34;;;;;;1455:13;1440:5;;:29;;;;;;;;;;;;;;;;;;1494:13;1473:18;;:34;;;;;;;;;;;;;;;;;;1535:13;1519:30;;;;;;;;;;;;1355:199;286:3619;;598:104:6;651:15;685:10;678:17;;598:104;:::o;286:3619:7:-;;;;;;;", - "deployedSourceMap": "286:3619:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3185:129;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3779:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3046:134;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3459:156;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1717:145:0;;;:::i;:::-;;1567:990:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1085:85:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;368:33:7;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3617:159;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3316:141;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2572:469;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2011:240:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3185:129:7;3255:15;3282;:28;3298:11;3282:28;;;;;;;;;;;;;;;;;;;;;3275:35;;3185:129;;;:::o;3779:123::-;3862:12;3886;3879:19;;3779:123;;;;:::o;3046:134::-;3144:15;3171:4;3164:11;;3046:134;;;;:::o;3459:156::-;3533:18;3563:15;:28;3579:11;3563:28;;;;;;;;;;;:48;;;3556:55;;3459:156;;;:::o;1717:145:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1823:1:::1;1786:40;;1807:6;::::0;::::1;;;;;;;;1786:40;;;;;;;;;;;;1853:1;1836:6:::0;::::1;:19;;;;;;;;;;;;;;;;;;1717:145::o:0;1567:990:7:-;1724:1;1709:16;;:11;:16;;1701:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1785:1;1773:13;;:8;:13;;1765:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1849:1;1831:14;:19;;1823:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1924:1;1901:19;:24;;1893:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2024:1;1981:15;:28;1997:11;1981:28;;;;;;;;;;;:41;;;:44;1973:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2159:14;2113:15;:28;2129:11;2113:28;;;;;;;;;;;:43;;:60;;;;2228:19;2177:15;:28;2193:11;2177:28;;;;;;;;;;;:48;;:70;;;;2295:15;2251;:28;2267:11;2251:28;;;;;;;;;;;:41;;:59;;;;2354:8;2314:15;:28;2330:11;2314:28;;;;;;;;;;;:37;;:48;;;;2404:10;2366:15;:28;2382:11;2366:28;;;;;;;;;;;:35;;;:48;;;;;;;;;;;;;;;;;;2449:10;2418:15;:28;2434:11;2418:28;;;;;;;;;;;;:41;;;;;;;;;;;;;;;;;;2507:10;2469:84;;2498:8;2486:11;2469:84;2518:14;2533:19;2469:84;;;;;;;;;;;;;;;;;;;;;;;;1567:990;;;;:::o;1085:85:0:-;1131:7;1157:6;;;;;;;;;;;1150:13;;1085:85;:::o;368:33:7:-;;;;;;;;;;;;;:::o;3617:159::-;3695:22;3729:15;:28;3745:11;3729:28;;;;;;;;;;;:43;;;3722:50;;3617:159;;;:::o;3316:141::-;3388:16;3416:15;:28;3432:11;3416:28;;;;;;;;;;;:37;;;3409:44;;3316:141;;;:::o;2572:469::-;2707:1;2692:16;;:11;:16;;2684:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2779:1;2756:24;;:19;:24;;2748:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2833:54;2854:11;2867:19;2833:20;:54::i;:::-;2829:208;;;2937:11;2926:10;2898:56;;2914:11;2898:56;2950:3;2898:56;;;;;;;;;;;;;;;;;;2829:208;;;3019:11;3008:10;2977:54;;2996:11;2977:54;;;;;;;;;;2829:208;2572:469;;;:::o;2011:240:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2119:1:::1;2099:22;;:8;:22;;;;2091:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2208:8;2179:38;;2200:6;::::0;::::1;;;;;;;;2179:38;;;;;;;;;;;;2236:8;2227:6;::::0;:17:::1;;;;;;;;;;;;;;;;;;2011:240:::0;:::o;598:104:6:-;651:15;685:10;678:17;;598:104;:::o", - "source": "pragma solidity >=0.6.0 <0.8.0;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/access/Ownable.sol\";\n\n\n// mock contract for now, we will add the hub and the rest later\ncontract DKGcontract is Ownable {\n\n\n\tusing SafeMath for uint256;\n\tIERC20 token;\n\n\taddress public TRAC_TOKEN_ADDRESS;\n\n\tstruct AssertionRecord{\n\t\t// bytes32 assertionID; // hash (multihash) of the assertion\n\t\tuint256 assertionTimeToLive;\n\t\tuint256 numberOfEpochs;\n\t\tuint256 creationTime;\n\t\taddress issuer;\n\t\tbytes32 rootHash;\n\t\tbytes32 data; // for extensibility\n\t\t// TODO: include Token management\n\t}\n\n\tmapping(bytes32 => AssertionRecord) internal assertionRecord; // assertionRecord[assertionID] , formerly offer[offerID]\n\tmapping(bytes32 => address) internal assertionIssuer; // mapping assertionID -> assertionIssuer\n\n\n\t// events\n\tevent TokenAddressSet(address indexed token);\n\tevent AssertionCreated(bytes32 indexed assertionID, bytes32 indexed rootHash, address indexed assertionIssuer, uint256 numberOfEpochs, uint256 assertionTimeToLive);\n\tevent TokensCollected(bytes32 indexed assertionID, address indexed prover, uint256 indexed epoch, uint256 amount);\n\tevent VerificationFailed(bytes32 indexed assertionID, address indexed prover, uint256 indexed epoch);\n\n\n\n\tconstructor(address token_address) public {\n\t\trequire(token_address!=address(0));\n\t\ttoken = IERC20(token_address);\n\t\tTRAC_TOKEN_ADDRESS = token_address;\n\t\t\n\t\temit TokenAddressSet(token_address);\n\n\t}\n\n\t/* DC */\n\tfunction createAssertionRecord(bytes32 assertionID, bytes32 rootHash, uint256 numberOfEpochs, uint256 assertionTimeToLive) public {\n\t\trequire(assertionID != 0, \"assertionID hash cannot be zero\");\n\t\trequire(rootHash != 0, \"rootHash hash cannot be zero\");\n\t\trequire(numberOfEpochs != 0, \"numberOfEpochs hash cannot be zero\");\n\t\trequire(assertionTimeToLive != 0, \"assertionTimeToLive hash cannot be zero\");\n\t\trequire(assertionRecord[assertionID].creationTime==0, \"Assertion already exists!\");\n\n\t\t// transfer token to contract here (next version)\n\n\t\tassertionRecord[assertionID].numberOfEpochs = numberOfEpochs;\n\t\tassertionRecord[assertionID].assertionTimeToLive = assertionTimeToLive;\n\t\tassertionRecord[assertionID].creationTime = block.timestamp;\n\t\tassertionRecord[assertionID].rootHash = rootHash;\n\t\tassertionRecord[assertionID].issuer = msg.sender;\n\t\tassertionIssuer[assertionID] = msg.sender;\n\n\t\temit AssertionCreated(assertionID,rootHash,msg.sender,numberOfEpochs,assertionTimeToLive);\n\t}\n\n\n\t/* DH */\n\n\tfunction submitHoldingProof(bytes32 assertionID, bytes32 epochAssertionProof, uint256 epochNumber) \n\tpublic {\n\t\trequire(assertionID != 0, \"assertionID hash cannot be zero\");\n\t\trequire(epochAssertionProof != 0, \"epochAssertionProof hash cannot be zero\");\n\n\t\tif (verifyAssertionProof(assertionID, epochAssertionProof)){\n\t\t\temit TokensCollected(assertionID,msg.sender,epochNumber, 123);\n\t\t\t} else {\n\t\t\t\temit VerificationFailed(assertionID,msg.sender,epochNumber);\n\t\t\t}\n\n\t}\n\n\n\n\tfunction verifyAssertionProof(bytes32 assertionID, bytes32 epochAssertionProof) \n\t\tpublic returns(bool proofValid){\n\t\treturn true;\n\n\t}\n\n\n\n\tfunction getAssertionIssuer(bytes32 assertionID)\n\tpublic view returns(address creator){\n\t\treturn assertionIssuer[assertionID];\n\t}\n\tfunction getAssertionRootHash(bytes32 assertionID)\n\tpublic view returns(bytes32 rootHash){\n\t\treturn assertionRecord[assertionID].rootHash;\n\t}\n\tfunction getAssertionTimeToLive(bytes32 assertionID)\n\tpublic view returns(uint256 timeToLive){\n\t\treturn assertionRecord[assertionID].assertionTimeToLive;\n\t}\n\tfunction getAssertionNumberOfEpochs(bytes32 assertionID)\n\tpublic view returns(uint256 numberOfEpochs){\n\t\treturn assertionRecord[assertionID].numberOfEpochs;\n\t}\n\n\tfunction getAssertionTask(bytes32 assertionID, uint256 epoch)\n\tpublic view returns(uint256 task){\n\t\treturn block.number;\n\t}\n\n}", + "sourceMap": "286:3623:7:-:0;;;1355:199;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;884:17:0;904:12;:10;;;:12;;:::i;:::-;884:32;;935:9;926:6;;:18;;;;;;;;;;;;;;;;;;992:9;959:43;;988:1;959:43;;;;;;;;;;;;850:159;1433:1:7;1410:25;;:13;:25;;;;1402:34;;;;;;1455:13;1440:5;;:29;;;;;;;;;;;;;;;;;;1494:13;1473:18;;:34;;;;;;;;;;;;;;;;;;1535:13;1519:30;;;;;;;;;;;;1355:199;286:3623;;598:104:6;651:15;685:10;678:17;;598:104;:::o;286:3623:7:-;;;;;;;", + "deployedSourceMap": "286:3623:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3189:129;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3783:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3050:134;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3463:156;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1717:145:0;;;:::i;:::-;;1085:85;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;368:33:7;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3621:159;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3320:141;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2576:469;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1567:994;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2011:240:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3189:129:7;3259:15;3286;:28;3302:11;3286:28;;;;;;;;;;;;;;;;;;;;;3279:35;;3189:129;;;:::o;3783:123::-;3866:12;3890;3883:19;;3783:123;;;;:::o;3050:134::-;3148:15;3175:4;3168:11;;3050:134;;;;:::o;3463:156::-;3537:18;3567:15;:28;3583:11;3567:28;;;;;;;;;;;:48;;;3560:55;;3463:156;;;:::o;1717:145:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1823:1:::1;1786:40;;1807:6;::::0;::::1;;;;;;;;1786:40;;;;;;;;;;;;1853:1;1836:6:::0;::::1;:19;;;;;;;;;;;;;;;;;;1717:145::o:0;1085:85::-;1131:7;1157:6;;;;;;;;;;;1150:13;;1085:85;:::o;368:33:7:-;;;;;;;;;;;;;:::o;3621:159::-;3699:22;3733:15;:28;3749:11;3733:28;;;;;;;;;;;:43;;;3726:50;;3621:159;;;:::o;3320:141::-;3392:16;3420:15;:28;3436:11;3420:28;;;;;;;;;;;:37;;;3413:44;;3320:141;;;:::o;2576:469::-;2711:1;2696:16;;:11;:16;;2688:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2783:1;2760:24;;:19;:24;;2752:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2837:54;2858:11;2871:19;2837:20;:54::i;:::-;2833:208;;;2941:11;2930:10;2902:56;;2918:11;2902:56;2954:3;2902:56;;;;;;;;;;;;;;;;;;2833:208;;;3023:11;3012:10;2981:54;;3000:11;2981:54;;;;;;;;;;2833:208;2576:469;;;:::o;1567:994::-;1740:1;1725:16;;:11;:16;;1717:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1801:1;1789:13;;:8;:13;;1781:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1865:1;1847:14;:19;;1839:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1940:1;1917:19;:24;;1909:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2040:1;1997:15;:28;2013:11;1997:28;;;;;;;;;;;:41;;;:44;1989:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2175:14;2129:15;:28;2145:11;2129:28;;;;;;;;;;;:43;;:60;;;;2244:19;2193:15;:28;2209:11;2193:28;;;;;;;;;;;:48;;:70;;;;2311:15;2267;:28;2283:11;2267:28;;;;;;;;;;;:41;;:59;;;;2370:8;2330:15;:28;2346:11;2330:28;;;;;;;;;;;:37;;:48;;;;2420:6;2382:15;:28;2398:11;2382:28;;;;;;;;;;;:35;;;:44;;;;;;;;;;;;;;;;;;2461:6;2430:15;:28;2446:11;2430:28;;;;;;;;;;;;:37;;;;;;;;;;;;;;;;;;2515:6;2477:80;;2506:8;2494:11;2477:80;2522:14;2537:19;2477:80;;;;;;;;;;;;;;;;;;;;;;;;1567:994;;;;;:::o;2011:240:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2119:1:::1;2099:22;;:8;:22;;;;2091:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2208:8;2179:38;;2200:6;::::0;::::1;;;;;;;;2179:38;;;;;;;;;;;;2236:8;2227:6;::::0;:17:::1;;;;;;;;;;;;;;;;;;2011:240:::0;:::o;598:104:6:-;651:15;685:10;678:17;;598:104;:::o", + "source": "pragma solidity >=0.6.0 <0.8.0;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/access/Ownable.sol\";\n\n\n// mock contract for now, we will add the hub and the rest later\ncontract DKGcontract is Ownable {\n\n\n\tusing SafeMath for uint256;\n\tIERC20 token;\n\n\taddress public TRAC_TOKEN_ADDRESS;\n\n\tstruct AssertionRecord{\n\t\t// bytes32 assertionID; // hash (multihash) of the assertion\n\t\tuint256 assertionTimeToLive;\n\t\tuint256 numberOfEpochs;\n\t\tuint256 creationTime;\n\t\taddress issuer;\n\t\tbytes32 rootHash;\n\t\tbytes32 data; // for extensibility\n\t\t// TODO: include Token management\n\t}\n\n\tmapping(bytes32 => AssertionRecord) internal assertionRecord; // assertionRecord[assertionID] , formerly offer[offerID]\n\tmapping(bytes32 => address) internal assertionIssuer; // mapping assertionID -> assertionIssuer\n\n\n\t// events\n\tevent TokenAddressSet(address indexed token);\n\tevent AssertionCreated(bytes32 indexed assertionID, bytes32 indexed rootHash, address indexed assertionIssuer, uint256 numberOfEpochs, uint256 assertionTimeToLive);\n\tevent TokensCollected(bytes32 indexed assertionID, address indexed prover, uint256 indexed epoch, uint256 amount);\n\tevent VerificationFailed(bytes32 indexed assertionID, address indexed prover, uint256 indexed epoch);\n\n\n\n\tconstructor(address token_address) public {\n\t\trequire(token_address!=address(0));\n\t\ttoken = IERC20(token_address);\n\t\tTRAC_TOKEN_ADDRESS = token_address;\n\t\t\n\t\temit TokenAddressSet(token_address);\n\n\t}\n\n\t/* DC */\n\tfunction createAssertionRecord(bytes32 assertionID, bytes32 rootHash, address issuer, uint256 numberOfEpochs, uint256 assertionTimeToLive) public {\n\t\trequire(assertionID != 0, \"assertionID hash cannot be zero\");\n\t\trequire(rootHash != 0, \"rootHash hash cannot be zero\");\n\t\trequire(numberOfEpochs != 0, \"numberOfEpochs hash cannot be zero\");\n\t\trequire(assertionTimeToLive != 0, \"assertionTimeToLive hash cannot be zero\");\n\t\trequire(assertionRecord[assertionID].creationTime==0, \"Assertion already exists!\");\n\n\t\t// transfer token to contract here (next version)\n\n\t\tassertionRecord[assertionID].numberOfEpochs = numberOfEpochs;\n\t\tassertionRecord[assertionID].assertionTimeToLive = assertionTimeToLive;\n\t\tassertionRecord[assertionID].creationTime = block.timestamp;\n\t\tassertionRecord[assertionID].rootHash = rootHash;\n\t\tassertionRecord[assertionID].issuer = issuer;\n\t\tassertionIssuer[assertionID] = issuer;\n\n\t\temit AssertionCreated(assertionID,rootHash,issuer,numberOfEpochs,assertionTimeToLive);\n\t}\n\n\n\t/* DH */\n\n\tfunction submitHoldingProof(bytes32 assertionID, bytes32 epochAssertionProof, uint256 epochNumber) \n\tpublic {\n\t\trequire(assertionID != 0, \"assertionID hash cannot be zero\");\n\t\trequire(epochAssertionProof != 0, \"epochAssertionProof hash cannot be zero\");\n\n\t\tif (verifyAssertionProof(assertionID, epochAssertionProof)){\n\t\t\temit TokensCollected(assertionID,msg.sender,epochNumber, 123);\n\t\t\t} else {\n\t\t\t\temit VerificationFailed(assertionID,msg.sender,epochNumber);\n\t\t\t}\n\n\t}\n\n\n\n\tfunction verifyAssertionProof(bytes32 assertionID, bytes32 epochAssertionProof) \n\t\tpublic returns(bool proofValid){\n\t\treturn true;\n\n\t}\n\n\n\n\tfunction getAssertionIssuer(bytes32 assertionID)\n\tpublic view returns(address creator){\n\t\treturn assertionIssuer[assertionID];\n\t}\n\tfunction getAssertionRootHash(bytes32 assertionID)\n\tpublic view returns(bytes32 rootHash){\n\t\treturn assertionRecord[assertionID].rootHash;\n\t}\n\tfunction getAssertionTimeToLive(bytes32 assertionID)\n\tpublic view returns(uint256 timeToLive){\n\t\treturn assertionRecord[assertionID].assertionTimeToLive;\n\t}\n\tfunction getAssertionNumberOfEpochs(bytes32 assertionID)\n\tpublic view returns(uint256 numberOfEpochs){\n\t\treturn assertionRecord[assertionID].numberOfEpochs;\n\t}\n\n\tfunction getAssertionTask(bytes32 assertionID, uint256 epoch)\n\tpublic view returns(uint256 task){\n\t\treturn block.number;\n\t}\n\n}", "sourcePath": "/Users/miloskotlar/dkg-onchain-module-v6/contracts/DKGcontract.sol", "ast": { "absolutePath": "project:/contracts/DKGcontract.sol", @@ -383,7 +388,7 @@ 815 ], "DKGcontract": [ - 1139 + 1138 ], "IERC20": [ 676 @@ -395,7 +400,7 @@ 476 ] }, - "id": 1140, + "id": 1139, "nodeType": "SourceUnit", "nodes": [ { @@ -417,7 +422,7 @@ "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", "id": 818, "nodeType": "ImportDirective", - "scope": 1140, + "scope": 1139, "sourceUnit": 677, "src": "33:64:7", "symbolAliases": [], @@ -428,7 +433,7 @@ "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", "id": 819, "nodeType": "ImportDirective", - "scope": 1140, + "scope": 1139, "sourceUnit": 477, "src": "98:59:7", "symbolAliases": [], @@ -439,7 +444,7 @@ "file": "openzeppelin-solidity/contracts/access/Ownable.sol", "id": 820, "nodeType": "ImportDirective", - "scope": 1140, + "scope": 1139, "sourceUnit": 110, "src": "158:60:7", "symbolAliases": [], @@ -471,9 +476,9 @@ ], "contractKind": "contract", "fullyImplemented": true, - "id": 1139, + "id": 1138, "linearizedBaseContracts": [ - 1139, + 1138, 109, 815 ], @@ -512,7 +517,7 @@ "mutability": "mutable", "name": "token", "nodeType": "VariableDeclaration", - "scope": 1139, + "scope": 1138, "src": "352:12:7", "stateVariable": true, "storageLocation": "default", @@ -540,7 +545,7 @@ "mutability": "mutable", "name": "TRAC_TOKEN_ADDRESS", "nodeType": "VariableDeclaration", - "scope": 1139, + "scope": 1138, "src": "368:33:7", "stateVariable": true, "storageLocation": "default", @@ -725,7 +730,7 @@ ], "name": "AssertionRecord", "nodeType": "StructDefinition", - "scope": 1139, + "scope": 1138, "src": "405:281:7", "visibility": "public" }, @@ -735,7 +740,7 @@ "mutability": "mutable", "name": "assertionRecord", "nodeType": "VariableDeclaration", - "scope": 1139, + "scope": 1138, "src": "689:60:7", "stateVariable": true, "storageLocation": "default", @@ -781,7 +786,7 @@ "mutability": "mutable", "name": "assertionIssuer", "nodeType": "VariableDeclaration", - "scope": 1139, + "scope": 1138, "src": "810:52:7", "stateVariable": true, "storageLocation": "default", @@ -1595,7 +1600,7 @@ "parameters": [], "src": "1398:0:7" }, - "scope": 1139, + "scope": 1138, "src": "1355:199:7", "stateMutability": "nonpayable", "virtual": false, @@ -1603,9 +1608,9 @@ }, { "body": { - "id": 1015, + "id": 1014, "nodeType": "Block", - "src": "1697:860:7", + "src": "1713:848:7", "statements": [ { "expression": { @@ -1615,18 +1620,18 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 927, + "id": 929, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 925, + "id": 927, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 915, - "src": "1709:11:7", + "src": "1725:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1636,21 +1641,21 @@ "operator": "!=", "rightExpression": { "hexValue": "30", - "id": 926, + "id": 928, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1724:1:7", + "src": "1740:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "1709:16:7", + "src": "1725:16:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1658,14 +1663,14 @@ }, { "hexValue": "617373657274696f6e494420686173682063616e6e6f74206265207a65726f", - "id": 928, + "id": 930, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1727:33:7", + "src": "1743:33:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_649a3d58a096eb864e1646a68edf6e493c6de795be271ef6a8cd2b478518591c", "typeString": "literal_string \"assertionID hash cannot be zero\"" @@ -1684,7 +1689,7 @@ "typeString": "literal_string \"assertionID hash cannot be zero\"" } ], - "id": 924, + "id": 926, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -1692,13 +1697,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "1701:7:7", + "src": "1717:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 929, + "id": 931, "isConstant": false, "isLValue": false, "isPure": false, @@ -1706,16 +1711,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1701:60:7", + "src": "1717:60:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 930, + "id": 932, "nodeType": "ExpressionStatement", - "src": "1701:60:7" + "src": "1717:60:7" }, { "expression": { @@ -1725,18 +1730,18 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 934, + "id": 936, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 932, + "id": 934, "name": "rootHash", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 917, - "src": "1773:8:7", + "src": "1789:8:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1746,21 +1751,21 @@ "operator": "!=", "rightExpression": { "hexValue": "30", - "id": 933, + "id": 935, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1785:1:7", + "src": "1801:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "1773:13:7", + "src": "1789:13:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1768,14 +1773,14 @@ }, { "hexValue": "726f6f744861736820686173682063616e6e6f74206265207a65726f", - "id": 935, + "id": 937, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1788:30:7", + "src": "1804:30:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_224e5e3aafad117a551900ad41b6b8fd4124c64978d6cb6f2d999d30b5a7caf6", "typeString": "literal_string \"rootHash hash cannot be zero\"" @@ -1794,7 +1799,7 @@ "typeString": "literal_string \"rootHash hash cannot be zero\"" } ], - "id": 931, + "id": 933, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -1802,13 +1807,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "1765:7:7", + "src": "1781:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 936, + "id": 938, "isConstant": false, "isLValue": false, "isPure": false, @@ -1816,16 +1821,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1765:54:7", + "src": "1781:54:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 937, + "id": 939, "nodeType": "ExpressionStatement", - "src": "1765:54:7" + "src": "1781:54:7" }, { "expression": { @@ -1835,18 +1840,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 941, + "id": 943, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 939, + "id": 941, "name": "numberOfEpochs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 919, - "src": "1831:14:7", + "referencedDeclaration": 921, + "src": "1847:14:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1856,21 +1861,21 @@ "operator": "!=", "rightExpression": { "hexValue": "30", - "id": 940, + "id": 942, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1849:1:7", + "src": "1865:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "1831:19:7", + "src": "1847:19:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1878,14 +1883,14 @@ }, { "hexValue": "6e756d6265724f6645706f63687320686173682063616e6e6f74206265207a65726f", - "id": 942, + "id": 944, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1852:36:7", + "src": "1868:36:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_fa4af5b2a5d3b443608ae031fd9009eab2ce4cb844577b417eed67d3d60328f1", "typeString": "literal_string \"numberOfEpochs hash cannot be zero\"" @@ -1904,7 +1909,7 @@ "typeString": "literal_string \"numberOfEpochs hash cannot be zero\"" } ], - "id": 938, + "id": 940, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -1912,13 +1917,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "1823:7:7", + "src": "1839:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 943, + "id": 945, "isConstant": false, "isLValue": false, "isPure": false, @@ -1926,16 +1931,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1823:66:7", + "src": "1839:66:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 944, + "id": 946, "nodeType": "ExpressionStatement", - "src": "1823:66:7" + "src": "1839:66:7" }, { "expression": { @@ -1945,18 +1950,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 948, + "id": 950, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 946, + "id": 948, "name": "assertionTimeToLive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 921, - "src": "1901:19:7", + "referencedDeclaration": 923, + "src": "1917:19:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1966,21 +1971,21 @@ "operator": "!=", "rightExpression": { "hexValue": "30", - "id": 947, + "id": 949, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1924:1:7", + "src": "1940:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "1901:24:7", + "src": "1917:24:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1988,14 +1993,14 @@ }, { "hexValue": "617373657274696f6e54696d65546f4c69766520686173682063616e6e6f74206265207a65726f", - "id": 949, + "id": 951, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "1927:41:7", + "src": "1943:41:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_069e2edd21d0b2ae0e0fdeacec1cd50fed913131221cbb295c527db83a0001af", "typeString": "literal_string \"assertionTimeToLive hash cannot be zero\"" @@ -2014,7 +2019,7 @@ "typeString": "literal_string \"assertionTimeToLive hash cannot be zero\"" } ], - "id": 945, + "id": 947, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -2022,13 +2027,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "1893:7:7", + "src": "1909:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 950, + "id": 952, "isConstant": false, "isLValue": false, "isPure": false, @@ -2036,16 +2041,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1893:76:7", + "src": "1909:76:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 951, + "id": 953, "nodeType": "ExpressionStatement", - "src": "1893:76:7" + "src": "1909:76:7" }, { "expression": { @@ -2055,7 +2060,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 958, + "id": 960, "isConstant": false, "isLValue": false, "isPure": false, @@ -2063,25 +2068,25 @@ "leftExpression": { "expression": { "baseExpression": { - "id": 953, + "id": 955, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 846, - "src": "1981:15:7", + "src": "1997:15:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 955, + "id": 957, "indexExpression": { - "id": 954, + "id": 956, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 915, - "src": "1997:11:7", + "src": "2013:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2092,13 +2097,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1981:28:7", + "src": "1997:28:7", "typeDescriptions": { "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 956, + "id": 958, "isConstant": false, "isLValue": true, "isPure": false, @@ -2106,7 +2111,7 @@ "memberName": "creationTime", "nodeType": "MemberAccess", "referencedDeclaration": 835, - "src": "1981:41:7", + "src": "1997:41:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2116,21 +2121,21 @@ "operator": "==", "rightExpression": { "hexValue": "30", - "id": 957, + "id": 959, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2024:1:7", + "src": "2040:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "1981:44:7", + "src": "1997:44:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2138,14 +2143,14 @@ }, { "hexValue": "417373657274696f6e20616c72656164792065786973747321", - "id": 959, + "id": 961, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2027:27:7", + "src": "2043:27:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_533fbfe4d9ec6c5b4aac3ac2c85a5993318086c6dfacddd0ec06ea4b669082d1", "typeString": "literal_string \"Assertion already exists!\"" @@ -2164,7 +2169,7 @@ "typeString": "literal_string \"Assertion already exists!\"" } ], - "id": 952, + "id": 954, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -2172,13 +2177,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "1973:7:7", + "src": "1989:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 960, + "id": 962, "isConstant": false, "isLValue": false, "isPure": false, @@ -2186,20 +2191,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1973:82:7", + "src": "1989:82:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 961, + "id": 963, "nodeType": "ExpressionStatement", - "src": "1973:82:7" + "src": "1989:82:7" }, { "expression": { - "id": 967, + "id": 969, "isConstant": false, "isLValue": false, "isPure": false, @@ -2207,25 +2212,25 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 962, + "id": 964, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 846, - "src": "2113:15:7", + "src": "2129:15:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 964, + "id": 966, "indexExpression": { - "id": 963, + "id": 965, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 915, - "src": "2129:11:7", + "src": "2145:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2236,13 +2241,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2113:28:7", + "src": "2129:28:7", "typeDescriptions": { "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 965, + "id": 967, "isConstant": false, "isLValue": true, "isPure": false, @@ -2250,7 +2255,7 @@ "memberName": "numberOfEpochs", "nodeType": "MemberAccess", "referencedDeclaration": 833, - "src": "2113:43:7", + "src": "2129:43:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2259,30 +2264,30 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 966, + "id": 968, "name": "numberOfEpochs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 919, - "src": "2159:14:7", + "referencedDeclaration": 921, + "src": "2175:14:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2113:60:7", + "src": "2129:60:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 968, + "id": 970, "nodeType": "ExpressionStatement", - "src": "2113:60:7" + "src": "2129:60:7" }, { "expression": { - "id": 974, + "id": 976, "isConstant": false, "isLValue": false, "isPure": false, @@ -2290,25 +2295,25 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 969, + "id": 971, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 846, - "src": "2177:15:7", + "src": "2193:15:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 971, + "id": 973, "indexExpression": { - "id": 970, + "id": 972, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 915, - "src": "2193:11:7", + "src": "2209:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2319,13 +2324,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2177:28:7", + "src": "2193:28:7", "typeDescriptions": { "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 972, + "id": 974, "isConstant": false, "isLValue": true, "isPure": false, @@ -2333,7 +2338,7 @@ "memberName": "assertionTimeToLive", "nodeType": "MemberAccess", "referencedDeclaration": 831, - "src": "2177:48:7", + "src": "2193:48:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2342,30 +2347,30 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 973, + "id": 975, "name": "assertionTimeToLive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 921, - "src": "2228:19:7", + "referencedDeclaration": 923, + "src": "2244:19:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2177:70:7", + "src": "2193:70:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 975, + "id": 977, "nodeType": "ExpressionStatement", - "src": "2177:70:7" + "src": "2193:70:7" }, { "expression": { - "id": 982, + "id": 984, "isConstant": false, "isLValue": false, "isPure": false, @@ -2373,25 +2378,25 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 976, + "id": 978, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 846, - "src": "2251:15:7", + "src": "2267:15:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 978, + "id": 980, "indexExpression": { - "id": 977, + "id": 979, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 915, - "src": "2267:11:7", + "src": "2283:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2402,13 +2407,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2251:28:7", + "src": "2267:28:7", "typeDescriptions": { "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 979, + "id": 981, "isConstant": false, "isLValue": true, "isPure": false, @@ -2416,7 +2421,7 @@ "memberName": "creationTime", "nodeType": "MemberAccess", "referencedDeclaration": 835, - "src": "2251:41:7", + "src": "2267:41:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2426,43 +2431,43 @@ "operator": "=", "rightHandSide": { "expression": { - "id": 980, + "id": 982, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967292, - "src": "2295:5:7", + "src": "2311:5:7", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 981, + "id": 983, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "src": "2295:15:7", + "src": "2311:15:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2251:59:7", + "src": "2267:59:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 983, + "id": 985, "nodeType": "ExpressionStatement", - "src": "2251:59:7" + "src": "2267:59:7" }, { "expression": { - "id": 989, + "id": 991, "isConstant": false, "isLValue": false, "isPure": false, @@ -2470,25 +2475,25 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 984, + "id": 986, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 846, - "src": "2314:15:7", + "src": "2330:15:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 986, + "id": 988, "indexExpression": { - "id": 985, + "id": 987, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 915, - "src": "2330:11:7", + "src": "2346:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2499,13 +2504,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2314:28:7", + "src": "2330:28:7", "typeDescriptions": { "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 987, + "id": 989, "isConstant": false, "isLValue": true, "isPure": false, @@ -2513,7 +2518,7 @@ "memberName": "rootHash", "nodeType": "MemberAccess", "referencedDeclaration": 839, - "src": "2314:37:7", + "src": "2330:37:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2522,30 +2527,30 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 988, + "id": 990, "name": "rootHash", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 917, - "src": "2354:8:7", + "src": "2370:8:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "src": "2314:48:7", + "src": "2330:48:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "id": 990, + "id": 992, "nodeType": "ExpressionStatement", - "src": "2314:48:7" + "src": "2330:48:7" }, { "expression": { - "id": 997, + "id": 998, "isConstant": false, "isLValue": false, "isPure": false, @@ -2553,25 +2558,25 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 991, + "id": 993, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 846, - "src": "2366:15:7", + "src": "2382:15:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 993, + "id": 995, "indexExpression": { - "id": 992, + "id": 994, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 915, - "src": "2382:11:7", + "src": "2398:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2582,13 +2587,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2366:28:7", + "src": "2382:28:7", "typeDescriptions": { "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 994, + "id": 996, "isConstant": false, "isLValue": true, "isPure": false, @@ -2596,7 +2601,7 @@ "memberName": "issuer", "nodeType": "MemberAccess", "referencedDeclaration": 837, - "src": "2366:35:7", + "src": "2382:35:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2605,40 +2610,26 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "expression": { - "id": 995, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "2404:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "2404:10:7", + "id": 997, + "name": "issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 919, + "src": "2420:6:7", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "src": "2366:48:7", + "src": "2382:44:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 998, + "id": 999, "nodeType": "ExpressionStatement", - "src": "2366:48:7" + "src": "2382:44:7" }, { "expression": { @@ -2649,25 +2640,25 @@ "lValueRequested": false, "leftHandSide": { "baseExpression": { - "id": 999, + "id": 1000, "name": "assertionIssuer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 850, - "src": "2418:15:7", + "src": "2430:15:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", "typeString": "mapping(bytes32 => address)" } }, - "id": 1001, + "id": 1002, "indexExpression": { - "id": 1000, + "id": 1001, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 915, - "src": "2434:11:7", + "src": "2446:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2678,7 +2669,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "2418:28:7", + "src": "2430:28:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2687,32 +2678,18 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "expression": { - "id": 1002, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "2449:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, "id": 1003, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "2449:10:7", + "name": "issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 919, + "src": "2461:6:7", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "src": "2418:41:7", + "src": "2430:37:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2720,7 +2697,7 @@ }, "id": 1005, "nodeType": "ExpressionStatement", - "src": "2418:41:7" + "src": "2430:37:7" }, { "eventCall": { @@ -2731,7 +2708,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 915, - "src": "2486:11:7", + "src": "2494:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2743,57 +2720,43 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 917, - "src": "2498:8:7", + "src": "2506:8:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "expression": { - "id": 1009, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "2507:3:7", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "2507:10:7", + "id": 1009, + "name": "issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 919, + "src": "2515:6:7", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_address", + "typeString": "address" } }, { - "id": 1011, + "id": 1010, "name": "numberOfEpochs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 919, - "src": "2518:14:7", + "referencedDeclaration": 921, + "src": "2522:14:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "id": 1012, + "id": 1011, "name": "assertionTimeToLive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 921, - "src": "2533:19:7", + "referencedDeclaration": 923, + "src": "2537:19:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2811,8 +2774,8 @@ "typeString": "bytes32" }, { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_address", + "typeString": "address" }, { "typeIdentifier": "t_uint256", @@ -2828,13 +2791,13 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 866, - "src": "2469:16:7", + "src": "2477:16:7", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (bytes32,bytes32,address,uint256,uint256)" } }, - "id": 1013, + "id": 1012, "isConstant": false, "isLValue": false, "isPure": false, @@ -2842,28 +2805,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2469:84:7", + "src": "2477:80:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1014, + "id": 1013, "nodeType": "EmitStatement", - "src": "2464:89:7" + "src": "2472:85:7" } ] }, - "functionSelector": "73a77389", - "id": 1016, + "functionSelector": "f164c436", + "id": 1015, "implemented": true, "kind": "function", "modifiers": [], "name": "createAssertionRecord", "nodeType": "FunctionDefinition", "parameters": { - "id": 922, + "id": 924, "nodeType": "ParameterList", "parameters": [ { @@ -2872,7 +2835,7 @@ "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "scope": 1016, + "scope": 1015, "src": "1598:19:7", "stateVariable": false, "storageLocation": "default", @@ -2898,7 +2861,7 @@ "mutability": "mutable", "name": "rootHash", "nodeType": "VariableDeclaration", - "scope": 1016, + "scope": 1015, "src": "1619:16:7", "stateVariable": false, "storageLocation": "default", @@ -2922,10 +2885,37 @@ "constant": false, "id": 919, "mutability": "mutable", + "name": "issuer", + "nodeType": "VariableDeclaration", + "scope": 1015, + "src": "1637:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 918, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1637:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 921, + "mutability": "mutable", "name": "numberOfEpochs", "nodeType": "VariableDeclaration", - "scope": 1016, - "src": "1637:22:7", + "scope": 1015, + "src": "1653:22:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2933,10 +2923,10 @@ "typeString": "uint256" }, "typeName": { - "id": 918, + "id": 920, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1637:7:7", + "src": "1653:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2946,12 +2936,12 @@ }, { "constant": false, - "id": 921, + "id": 923, "mutability": "mutable", "name": "assertionTimeToLive", "nodeType": "VariableDeclaration", - "scope": 1016, - "src": "1661:27:7", + "scope": 1015, + "src": "1677:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2959,10 +2949,10 @@ "typeString": "uint256" }, "typeName": { - "id": 920, + "id": 922, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1661:7:7", + "src": "1677:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2971,25 +2961,25 @@ "visibility": "internal" } ], - "src": "1597:92:7" + "src": "1597:108:7" }, "returnParameters": { - "id": 923, + "id": 925, "nodeType": "ParameterList", "parameters": [], - "src": "1697:0:7" + "src": "1713:0:7" }, - "scope": 1139, - "src": "1567:990:7", + "scope": 1138, + "src": "1567:994:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { - "id": 1061, + "id": 1060, "nodeType": "Block", - "src": "2680:361:7", + "src": "2684:361:7", "statements": [ { "expression": { @@ -2999,18 +2989,18 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 1028, + "id": 1027, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 1026, + "id": 1025, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1018, - "src": "2692:11:7", + "referencedDeclaration": 1017, + "src": "2696:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3020,21 +3010,21 @@ "operator": "!=", "rightExpression": { "hexValue": "30", - "id": 1027, + "id": 1026, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2707:1:7", + "src": "2711:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "2692:16:7", + "src": "2696:16:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3042,14 +3032,14 @@ }, { "hexValue": "617373657274696f6e494420686173682063616e6e6f74206265207a65726f", - "id": 1029, + "id": 1028, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2710:33:7", + "src": "2714:33:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_649a3d58a096eb864e1646a68edf6e493c6de795be271ef6a8cd2b478518591c", "typeString": "literal_string \"assertionID hash cannot be zero\"" @@ -3068,7 +3058,7 @@ "typeString": "literal_string \"assertionID hash cannot be zero\"" } ], - "id": 1025, + "id": 1024, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -3076,13 +3066,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "2684:7:7", + "src": "2688:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1030, + "id": 1029, "isConstant": false, "isLValue": false, "isPure": false, @@ -3090,16 +3080,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2684:60:7", + "src": "2688:60:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1031, + "id": 1030, "nodeType": "ExpressionStatement", - "src": "2684:60:7" + "src": "2688:60:7" }, { "expression": { @@ -3109,18 +3099,18 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 1035, + "id": 1034, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 1033, + "id": 1032, "name": "epochAssertionProof", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1020, - "src": "2756:19:7", + "referencedDeclaration": 1019, + "src": "2760:19:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3130,21 +3120,21 @@ "operator": "!=", "rightExpression": { "hexValue": "30", - "id": 1034, + "id": 1033, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2779:1:7", + "src": "2783:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "2756:24:7", + "src": "2760:24:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3152,14 +3142,14 @@ }, { "hexValue": "65706f6368417373657274696f6e50726f6f6620686173682063616e6e6f74206265207a65726f", - "id": 1036, + "id": 1035, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2782:41:7", + "src": "2786:41:7", "typeDescriptions": { "typeIdentifier": "t_stringliteral_51a89ccd247a0e5232bbda470ea88b3fa7ebe5c9c4e686866df3ae98cc738613", "typeString": "literal_string \"epochAssertionProof hash cannot be zero\"" @@ -3178,7 +3168,7 @@ "typeString": "literal_string \"epochAssertionProof hash cannot be zero\"" } ], - "id": 1032, + "id": 1031, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -3186,13 +3176,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "2748:7:7", + "src": "2752:7:7", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1037, + "id": 1036, "isConstant": false, "isLValue": false, "isPure": false, @@ -3200,39 +3190,39 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2748:76:7", + "src": "2752:76:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1038, + "id": 1037, "nodeType": "ExpressionStatement", - "src": "2748:76:7" + "src": "2752:76:7" }, { "condition": { "arguments": [ { - "id": 1040, + "id": 1039, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1018, - "src": "2854:11:7", + "referencedDeclaration": 1017, + "src": "2858:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "id": 1041, + "id": 1040, "name": "epochAssertionProof", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1020, - "src": "2867:19:7", + "referencedDeclaration": 1019, + "src": "2871:19:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3250,18 +3240,18 @@ "typeString": "bytes32" } ], - "id": 1039, + "id": 1038, "name": "verifyAssertionProof", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1074, - "src": "2833:20:7", + "referencedDeclaration": 1073, + "src": "2837:20:7", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$_t_bool_$", "typeString": "function (bytes32,bytes32) returns (bool)" } }, - "id": 1042, + "id": 1041, "isConstant": false, "isLValue": false, "isPure": false, @@ -3269,7 +3259,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2833:54:7", + "src": "2837:54:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -3277,20 +3267,20 @@ } }, "falseBody": { - "id": 1059, + "id": 1058, "nodeType": "Block", - "src": "2966:71:7", + "src": "2970:71:7", "statements": [ { "eventCall": { "arguments": [ { - "id": 1053, + "id": 1052, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1018, - "src": "2996:11:7", + "referencedDeclaration": 1017, + "src": "3000:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3298,37 +3288,37 @@ }, { "expression": { - "id": 1054, + "id": 1053, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967281, - "src": "3008:3:7", + "src": "3012:3:7", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 1055, + "id": 1054, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "src": "3008:10:7", + "src": "3012:10:7", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { - "id": 1056, + "id": 1055, "name": "epochNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1022, - "src": "3019:11:7", + "referencedDeclaration": 1021, + "src": "3023:11:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3350,18 +3340,18 @@ "typeString": "uint256" } ], - "id": 1052, + "id": 1051, "name": "VerificationFailed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 884, - "src": "2977:18:7", + "src": "2981:18:7", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (bytes32,address,uint256)" } }, - "id": 1057, + "id": 1056, "isConstant": false, "isLValue": false, "isPure": false, @@ -3369,37 +3359,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2977:54:7", + "src": "2981:54:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1058, + "id": 1057, "nodeType": "EmitStatement", - "src": "2972:59:7" + "src": "2976:59:7" } ] }, - "id": 1060, + "id": 1059, "nodeType": "IfStatement", - "src": "2829:208:7", + "src": "2833:208:7", "trueBody": { - "id": 1051, + "id": 1050, "nodeType": "Block", - "src": "2888:72:7", + "src": "2892:72:7", "statements": [ { "eventCall": { "arguments": [ { - "id": 1044, + "id": 1043, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1018, - "src": "2914:11:7", + "referencedDeclaration": 1017, + "src": "2918:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3407,37 +3397,37 @@ }, { "expression": { - "id": 1045, + "id": 1044, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967281, - "src": "2926:3:7", + "src": "2930:3:7", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 1046, + "id": 1045, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "src": "2926:10:7", + "src": "2930:10:7", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { - "id": 1047, + "id": 1046, "name": "epochNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1022, - "src": "2937:11:7", + "referencedDeclaration": 1021, + "src": "2941:11:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3445,14 +3435,14 @@ }, { "hexValue": "313233", - "id": 1048, + "id": 1047, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2950:3:7", + "src": "2954:3:7", "typeDescriptions": { "typeIdentifier": "t_rational_123_by_1", "typeString": "int_const 123" @@ -3479,18 +3469,18 @@ "typeString": "int_const 123" } ], - "id": 1043, + "id": 1042, "name": "TokensCollected", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 876, - "src": "2898:15:7", + "src": "2902:15:7", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (bytes32,address,uint256,uint256)" } }, - "id": 1049, + "id": 1048, "isConstant": false, "isLValue": false, "isPure": false, @@ -3498,16 +3488,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2898:56:7", + "src": "2902:56:7", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1050, + "id": 1049, "nodeType": "EmitStatement", - "src": "2893:61:7" + "src": "2897:61:7" } ] } @@ -3515,24 +3505,24 @@ ] }, "functionSelector": "ce64c643", - "id": 1062, + "id": 1061, "implemented": true, "kind": "function", "modifiers": [], "name": "submitHoldingProof", "nodeType": "FunctionDefinition", "parameters": { - "id": 1023, + "id": 1022, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1018, + "id": 1017, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "scope": 1062, - "src": "2600:19:7", + "scope": 1061, + "src": "2604:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3540,10 +3530,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1017, + "id": 1016, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2600:7:7", + "src": "2604:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3553,12 +3543,12 @@ }, { "constant": false, - "id": 1020, + "id": 1019, "mutability": "mutable", "name": "epochAssertionProof", "nodeType": "VariableDeclaration", - "scope": 1062, - "src": "2621:27:7", + "scope": 1061, + "src": "2625:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3566,10 +3556,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1019, + "id": 1018, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2621:7:7", + "src": "2625:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3579,12 +3569,12 @@ }, { "constant": false, - "id": 1022, + "id": 1021, "mutability": "mutable", "name": "epochNumber", "nodeType": "VariableDeclaration", - "scope": 1062, - "src": "2650:19:7", + "scope": 1061, + "src": "2654:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3592,10 +3582,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1021, + "id": 1020, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2650:7:7", + "src": "2654:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3604,69 +3594,69 @@ "visibility": "internal" } ], - "src": "2599:71:7" + "src": "2603:71:7" }, "returnParameters": { - "id": 1024, + "id": 1023, "nodeType": "ParameterList", "parameters": [], - "src": "2680:0:7" + "src": "2684:0:7" }, - "scope": 1139, - "src": "2572:469:7", + "scope": 1138, + "src": "2576:469:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { - "id": 1073, + "id": 1072, "nodeType": "Block", - "src": "3160:20:7", + "src": "3164:20:7", "statements": [ { "expression": { "hexValue": "74727565", - "id": 1071, + "id": 1070, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "3171:4:7", + "src": "3175:4:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, - "functionReturnParameters": 1070, - "id": 1072, + "functionReturnParameters": 1069, + "id": 1071, "nodeType": "Return", - "src": "3164:11:7" + "src": "3168:11:7" } ] }, "functionSelector": "193f9c7e", - "id": 1074, + "id": 1073, "implemented": true, "kind": "function", "modifiers": [], "name": "verifyAssertionProof", "nodeType": "FunctionDefinition", "parameters": { - "id": 1067, + "id": 1066, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1064, + "id": 1063, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "scope": 1074, - "src": "3076:19:7", + "scope": 1073, + "src": "3080:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3674,10 +3664,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1063, + "id": 1062, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3076:7:7", + "src": "3080:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3687,12 +3677,12 @@ }, { "constant": false, - "id": 1066, + "id": 1065, "mutability": "mutable", "name": "epochAssertionProof", "nodeType": "VariableDeclaration", - "scope": 1074, - "src": "3097:27:7", + "scope": 1073, + "src": "3101:27:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3700,10 +3690,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1065, + "id": 1064, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3097:7:7", + "src": "3101:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3712,20 +3702,20 @@ "visibility": "internal" } ], - "src": "3075:50:7" + "src": "3079:50:7" }, "returnParameters": { - "id": 1070, + "id": 1069, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1069, + "id": 1068, "mutability": "mutable", "name": "proofValid", "nodeType": "VariableDeclaration", - "scope": 1074, - "src": "3144:15:7", + "scope": 1073, + "src": "3148:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3733,10 +3723,10 @@ "typeString": "bool" }, "typeName": { - "id": 1068, + "id": 1067, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "3144:4:7", + "src": "3148:4:7", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3745,42 +3735,42 @@ "visibility": "internal" } ], - "src": "3143:17:7" + "src": "3147:17:7" }, - "scope": 1139, - "src": "3046:134:7", + "scope": 1138, + "src": "3050:134:7", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { - "id": 1085, + "id": 1084, "nodeType": "Block", - "src": "3271:43:7", + "src": "3275:43:7", "statements": [ { "expression": { "baseExpression": { - "id": 1081, + "id": 1080, "name": "assertionIssuer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 850, - "src": "3282:15:7", + "src": "3286:15:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", "typeString": "mapping(bytes32 => address)" } }, - "id": 1083, + "id": 1082, "indexExpression": { - "id": 1082, + "id": 1081, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1076, - "src": "3298:11:7", + "referencedDeclaration": 1075, + "src": "3302:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3791,38 +3781,38 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3282:28:7", + "src": "3286:28:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "functionReturnParameters": 1080, - "id": 1084, + "functionReturnParameters": 1079, + "id": 1083, "nodeType": "Return", - "src": "3275:35:7" + "src": "3279:35:7" } ] }, "functionSelector": "0828e9f3", - "id": 1086, + "id": 1085, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssertionIssuer", "nodeType": "FunctionDefinition", "parameters": { - "id": 1077, + "id": 1076, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1076, + "id": 1075, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "scope": 1086, - "src": "3213:19:7", + "scope": 1085, + "src": "3217:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3830,10 +3820,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1075, + "id": 1074, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3213:7:7", + "src": "3217:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3842,20 +3832,20 @@ "visibility": "internal" } ], - "src": "3212:21:7" + "src": "3216:21:7" }, "returnParameters": { - "id": 1080, + "id": 1079, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1079, + "id": 1078, "mutability": "mutable", "name": "creator", "nodeType": "VariableDeclaration", - "scope": 1086, - "src": "3255:15:7", + "scope": 1085, + "src": "3259:15:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3863,10 +3853,10 @@ "typeString": "address" }, "typeName": { - "id": 1078, + "id": 1077, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3255:7:7", + "src": "3259:7:7", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -3876,43 +3866,43 @@ "visibility": "internal" } ], - "src": "3254:17:7" + "src": "3258:17:7" }, - "scope": 1139, - "src": "3185:129:7", + "scope": 1138, + "src": "3189:129:7", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 1098, + "id": 1097, "nodeType": "Block", - "src": "3405:52:7", + "src": "3409:52:7", "statements": [ { "expression": { "expression": { "baseExpression": { - "id": 1093, + "id": 1092, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 846, - "src": "3416:15:7", + "src": "3420:15:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 1095, + "id": 1094, "indexExpression": { - "id": 1094, + "id": 1093, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1088, - "src": "3432:11:7", + "referencedDeclaration": 1087, + "src": "3436:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3923,13 +3913,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3416:28:7", + "src": "3420:28:7", "typeDescriptions": { "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 1096, + "id": 1095, "isConstant": false, "isLValue": true, "isPure": false, @@ -3937,38 +3927,38 @@ "memberName": "rootHash", "nodeType": "MemberAccess", "referencedDeclaration": 839, - "src": "3416:37:7", + "src": "3420:37:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "functionReturnParameters": 1092, - "id": 1097, + "functionReturnParameters": 1091, + "id": 1096, "nodeType": "Return", - "src": "3409:44:7" + "src": "3413:44:7" } ] }, "functionSelector": "b934b4e4", - "id": 1099, + "id": 1098, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssertionRootHash", "nodeType": "FunctionDefinition", "parameters": { - "id": 1089, + "id": 1088, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1088, + "id": 1087, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "scope": 1099, - "src": "3346:19:7", + "scope": 1098, + "src": "3350:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3976,10 +3966,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1087, + "id": 1086, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3346:7:7", + "src": "3350:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3988,20 +3978,20 @@ "visibility": "internal" } ], - "src": "3345:21:7" + "src": "3349:21:7" }, "returnParameters": { - "id": 1092, + "id": 1091, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1091, + "id": 1090, "mutability": "mutable", "name": "rootHash", "nodeType": "VariableDeclaration", - "scope": 1099, - "src": "3388:16:7", + "scope": 1098, + "src": "3392:16:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4009,10 +3999,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1090, + "id": 1089, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3388:7:7", + "src": "3392:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4021,43 +4011,43 @@ "visibility": "internal" } ], - "src": "3387:18:7" + "src": "3391:18:7" }, - "scope": 1139, - "src": "3316:141:7", + "scope": 1138, + "src": "3320:141:7", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 1111, + "id": 1110, "nodeType": "Block", - "src": "3552:63:7", + "src": "3556:63:7", "statements": [ { "expression": { "expression": { "baseExpression": { - "id": 1106, + "id": 1105, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 846, - "src": "3563:15:7", + "src": "3567:15:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 1108, + "id": 1107, "indexExpression": { - "id": 1107, + "id": 1106, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1101, - "src": "3579:11:7", + "referencedDeclaration": 1100, + "src": "3583:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4068,13 +4058,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3563:28:7", + "src": "3567:28:7", "typeDescriptions": { "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 1109, + "id": 1108, "isConstant": false, "isLValue": true, "isPure": false, @@ -4082,38 +4072,38 @@ "memberName": "assertionTimeToLive", "nodeType": "MemberAccess", "referencedDeclaration": 831, - "src": "3563:48:7", + "src": "3567:48:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 1105, - "id": 1110, + "functionReturnParameters": 1104, + "id": 1109, "nodeType": "Return", - "src": "3556:55:7" + "src": "3560:55:7" } ] }, "functionSelector": "6988bc03", - "id": 1112, + "id": 1111, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssertionTimeToLive", "nodeType": "FunctionDefinition", "parameters": { - "id": 1102, + "id": 1101, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1101, + "id": 1100, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "scope": 1112, - "src": "3491:19:7", + "scope": 1111, + "src": "3495:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4121,10 +4111,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1100, + "id": 1099, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3491:7:7", + "src": "3495:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4133,20 +4123,20 @@ "visibility": "internal" } ], - "src": "3490:21:7" + "src": "3494:21:7" }, "returnParameters": { - "id": 1105, + "id": 1104, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1104, + "id": 1103, "mutability": "mutable", "name": "timeToLive", "nodeType": "VariableDeclaration", - "scope": 1112, - "src": "3533:18:7", + "scope": 1111, + "src": "3537:18:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4154,10 +4144,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1103, + "id": 1102, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3533:7:7", + "src": "3537:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4166,43 +4156,43 @@ "visibility": "internal" } ], - "src": "3532:20:7" + "src": "3536:20:7" }, - "scope": 1139, - "src": "3459:156:7", + "scope": 1138, + "src": "3463:156:7", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 1124, + "id": 1123, "nodeType": "Block", - "src": "3718:58:7", + "src": "3722:58:7", "statements": [ { "expression": { "expression": { "baseExpression": { - "id": 1119, + "id": 1118, "name": "assertionRecord", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 846, - "src": "3729:15:7", + "src": "3733:15:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssertionRecord_$842_storage_$", "typeString": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)" } }, - "id": 1121, + "id": 1120, "indexExpression": { - "id": 1120, + "id": 1119, "name": "assertionID", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1114, - "src": "3745:11:7", + "referencedDeclaration": 1113, + "src": "3749:11:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4213,13 +4203,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3729:28:7", + "src": "3733:28:7", "typeDescriptions": { "typeIdentifier": "t_struct$_AssertionRecord_$842_storage", "typeString": "struct DKGcontract.AssertionRecord storage ref" } }, - "id": 1122, + "id": 1121, "isConstant": false, "isLValue": true, "isPure": false, @@ -4227,38 +4217,38 @@ "memberName": "numberOfEpochs", "nodeType": "MemberAccess", "referencedDeclaration": 833, - "src": "3729:43:7", + "src": "3733:43:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 1118, - "id": 1123, + "functionReturnParameters": 1117, + "id": 1122, "nodeType": "Return", - "src": "3722:50:7" + "src": "3726:50:7" } ] }, "functionSelector": "9e50e72c", - "id": 1125, + "id": 1124, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssertionNumberOfEpochs", "nodeType": "FunctionDefinition", "parameters": { - "id": 1115, + "id": 1114, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1114, + "id": 1113, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "scope": 1125, - "src": "3653:19:7", + "scope": 1124, + "src": "3657:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4266,10 +4256,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1113, + "id": 1112, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3653:7:7", + "src": "3657:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4278,20 +4268,20 @@ "visibility": "internal" } ], - "src": "3652:21:7" + "src": "3656:21:7" }, "returnParameters": { - "id": 1118, + "id": 1117, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1117, + "id": 1116, "mutability": "mutable", "name": "numberOfEpochs", "nodeType": "VariableDeclaration", - "scope": 1125, - "src": "3695:22:7", + "scope": 1124, + "src": "3699:22:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4299,10 +4289,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1116, + "id": 1115, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3695:7:7", + "src": "3699:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4311,73 +4301,73 @@ "visibility": "internal" } ], - "src": "3694:24:7" + "src": "3698:24:7" }, - "scope": 1139, - "src": "3617:159:7", + "scope": 1138, + "src": "3621:159:7", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 1137, + "id": 1136, "nodeType": "Block", - "src": "3875:27:7", + "src": "3879:27:7", "statements": [ { "expression": { "expression": { - "id": 1134, + "id": 1133, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967292, - "src": "3886:5:7", + "src": "3890:5:7", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 1135, + "id": 1134, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "number", "nodeType": "MemberAccess", - "src": "3886:12:7", + "src": "3890:12:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 1133, - "id": 1136, + "functionReturnParameters": 1132, + "id": 1135, "nodeType": "Return", - "src": "3879:19:7" + "src": "3883:19:7" } ] }, "functionSelector": "08c4933b", - "id": 1138, + "id": 1137, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssertionTask", "nodeType": "FunctionDefinition", "parameters": { - "id": 1130, + "id": 1129, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1127, + "id": 1126, "mutability": "mutable", "name": "assertionID", "nodeType": "VariableDeclaration", - "scope": 1138, - "src": "3805:19:7", + "scope": 1137, + "src": "3809:19:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4385,10 +4375,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1126, + "id": 1125, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3805:7:7", + "src": "3809:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4398,12 +4388,12 @@ }, { "constant": false, - "id": 1129, + "id": 1128, "mutability": "mutable", "name": "epoch", "nodeType": "VariableDeclaration", - "scope": 1138, - "src": "3826:13:7", + "scope": 1137, + "src": "3830:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4411,10 +4401,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1128, + "id": 1127, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3826:7:7", + "src": "3830:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4423,20 +4413,20 @@ "visibility": "internal" } ], - "src": "3804:36:7" + "src": "3808:36:7" }, "returnParameters": { - "id": 1133, + "id": 1132, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1132, + "id": 1131, "mutability": "mutable", "name": "task", "nodeType": "VariableDeclaration", - "scope": 1138, - "src": "3862:12:7", + "scope": 1137, + "src": "3866:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4444,10 +4434,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1131, + "id": 1130, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3862:7:7", + "src": "3866:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4456,20 +4446,20 @@ "visibility": "internal" } ], - "src": "3861:14:7" + "src": "3865:14:7" }, - "scope": 1139, - "src": "3779:123:7", + "scope": 1138, + "src": "3783:123:7", "stateMutability": "view", "virtual": false, "visibility": "public" } ], - "scope": 1140, - "src": "286:3619:7" + "scope": 1139, + "src": "286:3623:7" } ], - "src": "0:3905:7" + "src": "0:3909:7" }, "legacyAST": { "attributes": { @@ -4479,7 +4469,7 @@ 815 ], "DKGcontract": [ - 1139 + 1138 ], "IERC20": [ 676 @@ -4514,7 +4504,7 @@ "SourceUnit": 677, "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", - "scope": 1140, + "scope": 1139, "symbolAliases": [ null ], @@ -4529,7 +4519,7 @@ "SourceUnit": 477, "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "scope": 1140, + "scope": 1139, "symbolAliases": [ null ], @@ -4544,7 +4534,7 @@ "SourceUnit": 110, "absolutePath": "openzeppelin-solidity/contracts/access/Ownable.sol", "file": "openzeppelin-solidity/contracts/access/Ownable.sol", - "scope": 1140, + "scope": 1139, "symbolAliases": [ null ], @@ -4564,12 +4554,12 @@ "contractKind": "contract", "fullyImplemented": true, "linearizedBaseContracts": [ - 1139, + 1138, 109, 815 ], "name": "DKGcontract", - "scope": 1140 + "scope": 1139 }, "children": [ { @@ -4621,7 +4611,7 @@ "constant": false, "mutability": "mutable", "name": "token", - "scope": 1139, + "scope": 1138, "stateVariable": true, "storageLocation": "default", "type": "contract IERC20", @@ -4649,7 +4639,7 @@ "functionSelector": "8f9cd32b", "mutability": "mutable", "name": "TRAC_TOKEN_ADDRESS", - "scope": 1139, + "scope": 1138, "stateVariable": true, "storageLocation": "default", "type": "address", @@ -4675,7 +4665,7 @@ "attributes": { "canonicalName": "DKGcontract.AssertionRecord", "name": "AssertionRecord", - "scope": 1139, + "scope": 1138, "visibility": "public" }, "children": [ @@ -4846,7 +4836,7 @@ "constant": false, "mutability": "mutable", "name": "assertionRecord", - "scope": 1139, + "scope": 1138, "stateVariable": true, "storageLocation": "default", "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord)", @@ -4892,7 +4882,7 @@ "constant": false, "mutability": "mutable", "name": "assertionIssuer", - "scope": 1139, + "scope": 1138, "stateVariable": true, "storageLocation": "default", "type": "mapping(bytes32 => address)", @@ -5369,7 +5359,7 @@ null ], "name": "", - "scope": 1139, + "scope": 1138, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -5770,7 +5760,7 @@ }, { "attributes": { - "functionSelector": "73a77389", + "functionSelector": "f164c436", "implemented": true, "isConstructor": false, "kind": "function", @@ -5778,7 +5768,7 @@ null ], "name": "createAssertionRecord", - "scope": 1139, + "scope": 1138, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -5791,7 +5781,7 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "scope": 1016, + "scope": 1015, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -5817,7 +5807,7 @@ "constant": false, "mutability": "mutable", "name": "rootHash", - "scope": 1016, + "scope": 1015, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -5842,18 +5832,19 @@ "attributes": { "constant": false, "mutability": "mutable", - "name": "numberOfEpochs", - "scope": 1016, + "name": "issuer", + "scope": 1015, "stateVariable": false, "storageLocation": "default", - "type": "uint256", + "type": "address", "visibility": "internal" }, "children": [ { "attributes": { - "name": "uint256", - "type": "uint256" + "name": "address", + "stateMutability": "nonpayable", + "type": "address" }, "id": 918, "name": "ElementaryTypeName", @@ -5862,14 +5853,14 @@ ], "id": 919, "name": "VariableDeclaration", - "src": "1637:22:7" + "src": "1637:14:7" }, { "attributes": { "constant": false, "mutability": "mutable", - "name": "assertionTimeToLive", - "scope": 1016, + "name": "numberOfEpochs", + "scope": 1015, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -5883,17 +5874,43 @@ }, "id": 920, "name": "ElementaryTypeName", - "src": "1661:7:7" + "src": "1653:7:7" } ], "id": 921, "name": "VariableDeclaration", - "src": "1661:27:7" + "src": "1653:22:7" + }, + { + "attributes": { + "constant": false, + "mutability": "mutable", + "name": "assertionTimeToLive", + "scope": 1015, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 922, + "name": "ElementaryTypeName", + "src": "1677:7:7" + } + ], + "id": 923, + "name": "VariableDeclaration", + "src": "1677:27:7" } ], - "id": 922, + "id": 924, "name": "ParameterList", - "src": "1597:92:7" + "src": "1597:108:7" }, { "attributes": { @@ -5902,9 +5919,9 @@ ] }, "children": [], - "id": 923, + "id": 925, "name": "ParameterList", - "src": "1697:0:7" + "src": "1713:0:7" }, { "children": [ @@ -5945,9 +5962,9 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 924, + "id": 926, "name": "Identifier", - "src": "1701:7:7" + "src": "1717:7:7" }, { "attributes": { @@ -5972,9 +5989,9 @@ "type": "bytes32", "value": "assertionID" }, - "id": 925, + "id": 927, "name": "Identifier", - "src": "1709:11:7" + "src": "1725:11:7" }, { "attributes": { @@ -5987,14 +6004,14 @@ "type": "int_const 0", "value": "0" }, - "id": 926, + "id": 928, "name": "Literal", - "src": "1724:1:7" + "src": "1740:1:7" } ], - "id": 927, + "id": 929, "name": "BinaryOperation", - "src": "1709:16:7" + "src": "1725:16:7" }, { "attributes": { @@ -6007,19 +6024,19 @@ "type": "literal_string \"assertionID hash cannot be zero\"", "value": "assertionID hash cannot be zero" }, - "id": 928, + "id": 930, "name": "Literal", - "src": "1727:33:7" + "src": "1743:33:7" } ], - "id": 929, + "id": 931, "name": "FunctionCall", - "src": "1701:60:7" + "src": "1717:60:7" } ], - "id": 930, + "id": 932, "name": "ExpressionStatement", - "src": "1701:60:7" + "src": "1717:60:7" }, { "children": [ @@ -6058,9 +6075,9 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 931, + "id": 933, "name": "Identifier", - "src": "1765:7:7" + "src": "1781:7:7" }, { "attributes": { @@ -6085,9 +6102,9 @@ "type": "bytes32", "value": "rootHash" }, - "id": 932, + "id": 934, "name": "Identifier", - "src": "1773:8:7" + "src": "1789:8:7" }, { "attributes": { @@ -6100,14 +6117,14 @@ "type": "int_const 0", "value": "0" }, - "id": 933, + "id": 935, "name": "Literal", - "src": "1785:1:7" + "src": "1801:1:7" } ], - "id": 934, + "id": 936, "name": "BinaryOperation", - "src": "1773:13:7" + "src": "1789:13:7" }, { "attributes": { @@ -6120,19 +6137,19 @@ "type": "literal_string \"rootHash hash cannot be zero\"", "value": "rootHash hash cannot be zero" }, - "id": 935, + "id": 937, "name": "Literal", - "src": "1788:30:7" + "src": "1804:30:7" } ], - "id": 936, + "id": 938, "name": "FunctionCall", - "src": "1765:54:7" + "src": "1781:54:7" } ], - "id": 937, + "id": 939, "name": "ExpressionStatement", - "src": "1765:54:7" + "src": "1781:54:7" }, { "children": [ @@ -6171,9 +6188,9 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 938, + "id": 940, "name": "Identifier", - "src": "1823:7:7" + "src": "1839:7:7" }, { "attributes": { @@ -6194,13 +6211,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 919, + "referencedDeclaration": 921, "type": "uint256", "value": "numberOfEpochs" }, - "id": 939, + "id": 941, "name": "Identifier", - "src": "1831:14:7" + "src": "1847:14:7" }, { "attributes": { @@ -6213,14 +6230,14 @@ "type": "int_const 0", "value": "0" }, - "id": 940, + "id": 942, "name": "Literal", - "src": "1849:1:7" + "src": "1865:1:7" } ], - "id": 941, + "id": 943, "name": "BinaryOperation", - "src": "1831:19:7" + "src": "1847:19:7" }, { "attributes": { @@ -6233,19 +6250,19 @@ "type": "literal_string \"numberOfEpochs hash cannot be zero\"", "value": "numberOfEpochs hash cannot be zero" }, - "id": 942, + "id": 944, "name": "Literal", - "src": "1852:36:7" + "src": "1868:36:7" } ], - "id": 943, + "id": 945, "name": "FunctionCall", - "src": "1823:66:7" + "src": "1839:66:7" } ], - "id": 944, + "id": 946, "name": "ExpressionStatement", - "src": "1823:66:7" + "src": "1839:66:7" }, { "children": [ @@ -6284,9 +6301,9 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 945, + "id": 947, "name": "Identifier", - "src": "1893:7:7" + "src": "1909:7:7" }, { "attributes": { @@ -6307,13 +6324,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 921, + "referencedDeclaration": 923, "type": "uint256", "value": "assertionTimeToLive" }, - "id": 946, + "id": 948, "name": "Identifier", - "src": "1901:19:7" + "src": "1917:19:7" }, { "attributes": { @@ -6326,14 +6343,14 @@ "type": "int_const 0", "value": "0" }, - "id": 947, + "id": 949, "name": "Literal", - "src": "1924:1:7" + "src": "1940:1:7" } ], - "id": 948, + "id": 950, "name": "BinaryOperation", - "src": "1901:24:7" + "src": "1917:24:7" }, { "attributes": { @@ -6346,19 +6363,19 @@ "type": "literal_string \"assertionTimeToLive hash cannot be zero\"", "value": "assertionTimeToLive hash cannot be zero" }, - "id": 949, + "id": 951, "name": "Literal", - "src": "1927:41:7" + "src": "1943:41:7" } ], - "id": 950, + "id": 952, "name": "FunctionCall", - "src": "1893:76:7" + "src": "1909:76:7" } ], - "id": 951, + "id": 953, "name": "ExpressionStatement", - "src": "1893:76:7" + "src": "1909:76:7" }, { "children": [ @@ -6397,9 +6414,9 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 952, + "id": 954, "name": "Identifier", - "src": "1973:7:7" + "src": "1989:7:7" }, { "attributes": { @@ -6444,9 +6461,9 @@ "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 953, + "id": 955, "name": "Identifier", - "src": "1981:15:7" + "src": "1997:15:7" }, { "attributes": { @@ -6457,19 +6474,19 @@ "type": "bytes32", "value": "assertionID" }, - "id": 954, + "id": 956, "name": "Identifier", - "src": "1997:11:7" + "src": "2013:11:7" } ], - "id": 955, + "id": 957, "name": "IndexAccess", - "src": "1981:28:7" + "src": "1997:28:7" } ], - "id": 956, + "id": 958, "name": "MemberAccess", - "src": "1981:41:7" + "src": "1997:41:7" }, { "attributes": { @@ -6482,14 +6499,14 @@ "type": "int_const 0", "value": "0" }, - "id": 957, + "id": 959, "name": "Literal", - "src": "2024:1:7" + "src": "2040:1:7" } ], - "id": 958, + "id": 960, "name": "BinaryOperation", - "src": "1981:44:7" + "src": "1997:44:7" }, { "attributes": { @@ -6502,19 +6519,19 @@ "type": "literal_string \"Assertion already exists!\"", "value": "Assertion already exists!" }, - "id": 959, + "id": 961, "name": "Literal", - "src": "2027:27:7" + "src": "2043:27:7" } ], - "id": 960, + "id": 962, "name": "FunctionCall", - "src": "1973:82:7" + "src": "1989:82:7" } ], - "id": 961, + "id": 963, "name": "ExpressionStatement", - "src": "1973:82:7" + "src": "1989:82:7" }, { "children": [ @@ -6557,9 +6574,9 @@ "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 962, + "id": 964, "name": "Identifier", - "src": "2113:15:7" + "src": "2129:15:7" }, { "attributes": { @@ -6570,42 +6587,42 @@ "type": "bytes32", "value": "assertionID" }, - "id": 963, + "id": 965, "name": "Identifier", - "src": "2129:11:7" + "src": "2145:11:7" } ], - "id": 964, + "id": 966, "name": "IndexAccess", - "src": "2113:28:7" + "src": "2129:28:7" } ], - "id": 965, + "id": 967, "name": "MemberAccess", - "src": "2113:43:7" + "src": "2129:43:7" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 919, + "referencedDeclaration": 921, "type": "uint256", "value": "numberOfEpochs" }, - "id": 966, + "id": 968, "name": "Identifier", - "src": "2159:14:7" + "src": "2175:14:7" } ], - "id": 967, + "id": 969, "name": "Assignment", - "src": "2113:60:7" + "src": "2129:60:7" } ], - "id": 968, + "id": 970, "name": "ExpressionStatement", - "src": "2113:60:7" + "src": "2129:60:7" }, { "children": [ @@ -6648,9 +6665,9 @@ "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 969, + "id": 971, "name": "Identifier", - "src": "2177:15:7" + "src": "2193:15:7" }, { "attributes": { @@ -6661,42 +6678,42 @@ "type": "bytes32", "value": "assertionID" }, - "id": 970, + "id": 972, "name": "Identifier", - "src": "2193:11:7" + "src": "2209:11:7" } ], - "id": 971, + "id": 973, "name": "IndexAccess", - "src": "2177:28:7" + "src": "2193:28:7" } ], - "id": 972, + "id": 974, "name": "MemberAccess", - "src": "2177:48:7" + "src": "2193:48:7" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 921, + "referencedDeclaration": 923, "type": "uint256", "value": "assertionTimeToLive" }, - "id": 973, + "id": 975, "name": "Identifier", - "src": "2228:19:7" + "src": "2244:19:7" } ], - "id": 974, + "id": 976, "name": "Assignment", - "src": "2177:70:7" + "src": "2193:70:7" } ], - "id": 975, + "id": 977, "name": "ExpressionStatement", - "src": "2177:70:7" + "src": "2193:70:7" }, { "children": [ @@ -6739,9 +6756,9 @@ "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 976, + "id": 978, "name": "Identifier", - "src": "2251:15:7" + "src": "2267:15:7" }, { "attributes": { @@ -6752,19 +6769,19 @@ "type": "bytes32", "value": "assertionID" }, - "id": 977, + "id": 979, "name": "Identifier", - "src": "2267:11:7" + "src": "2283:11:7" } ], - "id": 978, + "id": 980, "name": "IndexAccess", - "src": "2251:28:7" + "src": "2267:28:7" } ], - "id": 979, + "id": 981, "name": "MemberAccess", - "src": "2251:41:7" + "src": "2267:41:7" }, { "attributes": { @@ -6785,24 +6802,24 @@ "type": "block", "value": "block" }, - "id": 980, + "id": 982, "name": "Identifier", - "src": "2295:5:7" + "src": "2311:5:7" } ], - "id": 981, + "id": 983, "name": "MemberAccess", - "src": "2295:15:7" + "src": "2311:15:7" } ], - "id": 982, + "id": 984, "name": "Assignment", - "src": "2251:59:7" + "src": "2267:59:7" } ], - "id": 983, + "id": 985, "name": "ExpressionStatement", - "src": "2251:59:7" + "src": "2267:59:7" }, { "children": [ @@ -6845,9 +6862,9 @@ "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 984, + "id": 986, "name": "Identifier", - "src": "2314:15:7" + "src": "2330:15:7" }, { "attributes": { @@ -6858,19 +6875,19 @@ "type": "bytes32", "value": "assertionID" }, - "id": 985, + "id": 987, "name": "Identifier", - "src": "2330:11:7" + "src": "2346:11:7" } ], - "id": 986, + "id": 988, "name": "IndexAccess", - "src": "2314:28:7" + "src": "2330:28:7" } ], - "id": 987, + "id": 989, "name": "MemberAccess", - "src": "2314:37:7" + "src": "2330:37:7" }, { "attributes": { @@ -6881,19 +6898,19 @@ "type": "bytes32", "value": "rootHash" }, - "id": 988, + "id": 990, "name": "Identifier", - "src": "2354:8:7" + "src": "2370:8:7" } ], - "id": 989, + "id": 991, "name": "Assignment", - "src": "2314:48:7" + "src": "2330:48:7" } ], - "id": 990, + "id": 992, "name": "ExpressionStatement", - "src": "2314:48:7" + "src": "2330:48:7" }, { "children": [ @@ -6936,9 +6953,9 @@ "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 991, + "id": 993, "name": "Identifier", - "src": "2366:15:7" + "src": "2382:15:7" }, { "attributes": { @@ -6949,57 +6966,42 @@ "type": "bytes32", "value": "assertionID" }, - "id": 992, + "id": 994, "name": "Identifier", - "src": "2382:11:7" + "src": "2398:11:7" } ], - "id": 993, + "id": 995, "name": "IndexAccess", - "src": "2366:28:7" + "src": "2382:28:7" } ], - "id": 994, + "id": 996, "name": "MemberAccess", - "src": "2366:35:7" + "src": "2382:35:7" }, { "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "type": "address payable" + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 919, + "type": "address", + "value": "issuer" }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 4294967281, - "type": "msg", - "value": "msg" - }, - "id": 995, - "name": "Identifier", - "src": "2404:3:7" - } - ], - "id": 996, - "name": "MemberAccess", - "src": "2404:10:7" + "id": 997, + "name": "Identifier", + "src": "2420:6:7" } ], - "id": 997, + "id": 998, "name": "Assignment", - "src": "2366:48:7" + "src": "2382:44:7" } ], - "id": 998, + "id": 999, "name": "ExpressionStatement", - "src": "2366:48:7" + "src": "2382:44:7" }, { "children": [ @@ -7031,9 +7033,9 @@ "type": "mapping(bytes32 => address)", "value": "assertionIssuer" }, - "id": 999, + "id": 1000, "name": "Identifier", - "src": "2418:15:7" + "src": "2430:15:7" }, { "attributes": { @@ -7044,52 +7046,37 @@ "type": "bytes32", "value": "assertionID" }, - "id": 1000, + "id": 1001, "name": "Identifier", - "src": "2434:11:7" + "src": "2446:11:7" } ], - "id": 1001, + "id": 1002, "name": "IndexAccess", - "src": "2418:28:7" + "src": "2430:28:7" }, { "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "type": "address payable" + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 919, + "type": "address", + "value": "issuer" }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 4294967281, - "type": "msg", - "value": "msg" - }, - "id": 1002, - "name": "Identifier", - "src": "2449:3:7" - } - ], "id": 1003, - "name": "MemberAccess", - "src": "2449:10:7" + "name": "Identifier", + "src": "2461:6:7" } ], "id": 1004, "name": "Assignment", - "src": "2418:41:7" + "src": "2430:37:7" } ], "id": 1005, "name": "ExpressionStatement", - "src": "2418:41:7" + "src": "2430:37:7" }, { "children": [ @@ -7120,8 +7107,8 @@ "typeString": "bytes32" }, { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_address", + "typeString": "address" }, { "typeIdentifier": "t_uint256", @@ -7141,7 +7128,7 @@ }, "id": 1006, "name": "Identifier", - "src": "2469:16:7" + "src": "2477:16:7" }, { "attributes": { @@ -7154,7 +7141,7 @@ }, "id": 1007, "name": "Identifier", - "src": "2486:11:7" + "src": "2494:11:7" }, { "attributes": { @@ -7167,81 +7154,66 @@ }, "id": 1008, "name": "Identifier", - "src": "2498:8:7" + "src": "2506:8:7" }, { "attributes": { - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "type": "address payable" + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 919, + "type": "address", + "value": "issuer" }, - "children": [ - { - "attributes": { - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 4294967281, - "type": "msg", - "value": "msg" - }, - "id": 1009, - "name": "Identifier", - "src": "2507:3:7" - } - ], - "id": 1010, - "name": "MemberAccess", - "src": "2507:10:7" + "id": 1009, + "name": "Identifier", + "src": "2515:6:7" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 919, + "referencedDeclaration": 921, "type": "uint256", "value": "numberOfEpochs" }, - "id": 1011, + "id": 1010, "name": "Identifier", - "src": "2518:14:7" + "src": "2522:14:7" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 921, + "referencedDeclaration": 923, "type": "uint256", "value": "assertionTimeToLive" }, - "id": 1012, + "id": 1011, "name": "Identifier", - "src": "2533:19:7" + "src": "2537:19:7" } ], - "id": 1013, + "id": 1012, "name": "FunctionCall", - "src": "2469:84:7" + "src": "2477:80:7" } ], - "id": 1014, + "id": 1013, "name": "EmitStatement", - "src": "2464:89:7" + "src": "2472:85:7" } ], - "id": 1015, + "id": 1014, "name": "Block", - "src": "1697:860:7" + "src": "1713:848:7" } ], - "id": 1016, + "id": 1015, "name": "FunctionDefinition", - "src": "1567:990:7" + "src": "1567:994:7" }, { "attributes": { @@ -7253,7 +7225,7 @@ null ], "name": "submitHoldingProof", - "scope": 1139, + "scope": 1138, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -7266,7 +7238,7 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "scope": 1062, + "scope": 1061, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -7278,21 +7250,21 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1017, + "id": 1016, "name": "ElementaryTypeName", - "src": "2600:7:7" + "src": "2604:7:7" } ], - "id": 1018, + "id": 1017, "name": "VariableDeclaration", - "src": "2600:19:7" + "src": "2604:19:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "epochAssertionProof", - "scope": 1062, + "scope": 1061, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -7304,21 +7276,21 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1019, + "id": 1018, "name": "ElementaryTypeName", - "src": "2621:7:7" + "src": "2625:7:7" } ], - "id": 1020, + "id": 1019, "name": "VariableDeclaration", - "src": "2621:27:7" + "src": "2625:27:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "epochNumber", - "scope": 1062, + "scope": 1061, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -7330,19 +7302,19 @@ "name": "uint256", "type": "uint256" }, - "id": 1021, + "id": 1020, "name": "ElementaryTypeName", - "src": "2650:7:7" + "src": "2654:7:7" } ], - "id": 1022, + "id": 1021, "name": "VariableDeclaration", - "src": "2650:19:7" + "src": "2654:19:7" } ], - "id": 1023, + "id": 1022, "name": "ParameterList", - "src": "2599:71:7" + "src": "2603:71:7" }, { "attributes": { @@ -7351,9 +7323,9 @@ ] }, "children": [], - "id": 1024, + "id": 1023, "name": "ParameterList", - "src": "2680:0:7" + "src": "2684:0:7" }, { "children": [ @@ -7394,9 +7366,9 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1025, + "id": 1024, "name": "Identifier", - "src": "2684:7:7" + "src": "2688:7:7" }, { "attributes": { @@ -7417,13 +7389,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1018, + "referencedDeclaration": 1017, "type": "bytes32", "value": "assertionID" }, - "id": 1026, + "id": 1025, "name": "Identifier", - "src": "2692:11:7" + "src": "2696:11:7" }, { "attributes": { @@ -7436,14 +7408,14 @@ "type": "int_const 0", "value": "0" }, - "id": 1027, + "id": 1026, "name": "Literal", - "src": "2707:1:7" + "src": "2711:1:7" } ], - "id": 1028, + "id": 1027, "name": "BinaryOperation", - "src": "2692:16:7" + "src": "2696:16:7" }, { "attributes": { @@ -7456,19 +7428,19 @@ "type": "literal_string \"assertionID hash cannot be zero\"", "value": "assertionID hash cannot be zero" }, - "id": 1029, + "id": 1028, "name": "Literal", - "src": "2710:33:7" + "src": "2714:33:7" } ], - "id": 1030, + "id": 1029, "name": "FunctionCall", - "src": "2684:60:7" + "src": "2688:60:7" } ], - "id": 1031, + "id": 1030, "name": "ExpressionStatement", - "src": "2684:60:7" + "src": "2688:60:7" }, { "children": [ @@ -7507,9 +7479,9 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1032, + "id": 1031, "name": "Identifier", - "src": "2748:7:7" + "src": "2752:7:7" }, { "attributes": { @@ -7530,13 +7502,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1020, + "referencedDeclaration": 1019, "type": "bytes32", "value": "epochAssertionProof" }, - "id": 1033, + "id": 1032, "name": "Identifier", - "src": "2756:19:7" + "src": "2760:19:7" }, { "attributes": { @@ -7549,14 +7521,14 @@ "type": "int_const 0", "value": "0" }, - "id": 1034, + "id": 1033, "name": "Literal", - "src": "2779:1:7" + "src": "2783:1:7" } ], - "id": 1035, + "id": 1034, "name": "BinaryOperation", - "src": "2756:24:7" + "src": "2760:24:7" }, { "attributes": { @@ -7569,19 +7541,19 @@ "type": "literal_string \"epochAssertionProof hash cannot be zero\"", "value": "epochAssertionProof hash cannot be zero" }, - "id": 1036, + "id": 1035, "name": "Literal", - "src": "2782:41:7" + "src": "2786:41:7" } ], - "id": 1037, + "id": 1036, "name": "FunctionCall", - "src": "2748:76:7" + "src": "2752:76:7" } ], - "id": 1038, + "id": 1037, "name": "ExpressionStatement", - "src": "2748:76:7" + "src": "2752:76:7" }, { "children": [ @@ -7615,44 +7587,44 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1074, + "referencedDeclaration": 1073, "type": "function (bytes32,bytes32) returns (bool)", "value": "verifyAssertionProof" }, - "id": 1039, + "id": 1038, "name": "Identifier", - "src": "2833:20:7" + "src": "2837:20:7" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1018, + "referencedDeclaration": 1017, "type": "bytes32", "value": "assertionID" }, - "id": 1040, + "id": 1039, "name": "Identifier", - "src": "2854:11:7" + "src": "2858:11:7" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1020, + "referencedDeclaration": 1019, "type": "bytes32", "value": "epochAssertionProof" }, - "id": 1041, + "id": 1040, "name": "Identifier", - "src": "2867:19:7" + "src": "2871:19:7" } ], - "id": 1042, + "id": 1041, "name": "FunctionCall", - "src": "2833:54:7" + "src": "2837:54:7" }, { "children": [ @@ -7700,22 +7672,22 @@ "type": "function (bytes32,address,uint256,uint256)", "value": "TokensCollected" }, - "id": 1043, + "id": 1042, "name": "Identifier", - "src": "2898:15:7" + "src": "2902:15:7" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1018, + "referencedDeclaration": 1017, "type": "bytes32", "value": "assertionID" }, - "id": 1044, + "id": 1043, "name": "Identifier", - "src": "2914:11:7" + "src": "2918:11:7" }, { "attributes": { @@ -7736,27 +7708,27 @@ "type": "msg", "value": "msg" }, - "id": 1045, + "id": 1044, "name": "Identifier", - "src": "2926:3:7" + "src": "2930:3:7" } ], - "id": 1046, + "id": 1045, "name": "MemberAccess", - "src": "2926:10:7" + "src": "2930:10:7" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1022, + "referencedDeclaration": 1021, "type": "uint256", "value": "epochNumber" }, - "id": 1047, + "id": 1046, "name": "Identifier", - "src": "2937:11:7" + "src": "2941:11:7" }, { "attributes": { @@ -7769,24 +7741,24 @@ "type": "int_const 123", "value": "123" }, - "id": 1048, + "id": 1047, "name": "Literal", - "src": "2950:3:7" + "src": "2954:3:7" } ], - "id": 1049, + "id": 1048, "name": "FunctionCall", - "src": "2898:56:7" + "src": "2902:56:7" } ], - "id": 1050, + "id": 1049, "name": "EmitStatement", - "src": "2893:61:7" + "src": "2897:61:7" } ], - "id": 1051, + "id": 1050, "name": "Block", - "src": "2888:72:7" + "src": "2892:72:7" }, { "children": [ @@ -7830,22 +7802,22 @@ "type": "function (bytes32,address,uint256)", "value": "VerificationFailed" }, - "id": 1052, + "id": 1051, "name": "Identifier", - "src": "2977:18:7" + "src": "2981:18:7" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1018, + "referencedDeclaration": 1017, "type": "bytes32", "value": "assertionID" }, - "id": 1053, + "id": 1052, "name": "Identifier", - "src": "2996:11:7" + "src": "3000:11:7" }, { "attributes": { @@ -7866,57 +7838,57 @@ "type": "msg", "value": "msg" }, - "id": 1054, + "id": 1053, "name": "Identifier", - "src": "3008:3:7" + "src": "3012:3:7" } ], - "id": 1055, + "id": 1054, "name": "MemberAccess", - "src": "3008:10:7" + "src": "3012:10:7" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1022, + "referencedDeclaration": 1021, "type": "uint256", "value": "epochNumber" }, - "id": 1056, + "id": 1055, "name": "Identifier", - "src": "3019:11:7" + "src": "3023:11:7" } ], - "id": 1057, + "id": 1056, "name": "FunctionCall", - "src": "2977:54:7" + "src": "2981:54:7" } ], - "id": 1058, + "id": 1057, "name": "EmitStatement", - "src": "2972:59:7" + "src": "2976:59:7" } ], - "id": 1059, + "id": 1058, "name": "Block", - "src": "2966:71:7" + "src": "2970:71:7" } ], - "id": 1060, + "id": 1059, "name": "IfStatement", - "src": "2829:208:7" + "src": "2833:208:7" } ], - "id": 1061, + "id": 1060, "name": "Block", - "src": "2680:361:7" + "src": "2684:361:7" } ], - "id": 1062, + "id": 1061, "name": "FunctionDefinition", - "src": "2572:469:7" + "src": "2576:469:7" }, { "attributes": { @@ -7928,7 +7900,7 @@ null ], "name": "verifyAssertionProof", - "scope": 1139, + "scope": 1138, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -7941,7 +7913,7 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "scope": 1074, + "scope": 1073, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -7953,21 +7925,21 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1063, + "id": 1062, "name": "ElementaryTypeName", - "src": "3076:7:7" + "src": "3080:7:7" } ], - "id": 1064, + "id": 1063, "name": "VariableDeclaration", - "src": "3076:19:7" + "src": "3080:19:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "epochAssertionProof", - "scope": 1074, + "scope": 1073, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -7979,19 +7951,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1065, + "id": 1064, "name": "ElementaryTypeName", - "src": "3097:7:7" + "src": "3101:7:7" } ], - "id": 1066, + "id": 1065, "name": "VariableDeclaration", - "src": "3097:27:7" + "src": "3101:27:7" } ], - "id": 1067, + "id": 1066, "name": "ParameterList", - "src": "3075:50:7" + "src": "3079:50:7" }, { "children": [ @@ -8000,7 +7972,7 @@ "constant": false, "mutability": "mutable", "name": "proofValid", - "scope": 1074, + "scope": 1073, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -8012,25 +7984,25 @@ "name": "bool", "type": "bool" }, - "id": 1068, + "id": 1067, "name": "ElementaryTypeName", - "src": "3144:4:7" + "src": "3148:4:7" } ], - "id": 1069, + "id": 1068, "name": "VariableDeclaration", - "src": "3144:15:7" + "src": "3148:15:7" } ], - "id": 1070, + "id": 1069, "name": "ParameterList", - "src": "3143:17:7" + "src": "3147:17:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 1070 + "functionReturnParameters": 1069 }, "children": [ { @@ -8044,24 +8016,24 @@ "type": "bool", "value": "true" }, - "id": 1071, + "id": 1070, "name": "Literal", - "src": "3171:4:7" + "src": "3175:4:7" } ], - "id": 1072, + "id": 1071, "name": "Return", - "src": "3164:11:7" + "src": "3168:11:7" } ], - "id": 1073, + "id": 1072, "name": "Block", - "src": "3160:20:7" + "src": "3164:20:7" } ], - "id": 1074, + "id": 1073, "name": "FunctionDefinition", - "src": "3046:134:7" + "src": "3050:134:7" }, { "attributes": { @@ -8073,7 +8045,7 @@ null ], "name": "getAssertionIssuer", - "scope": 1139, + "scope": 1138, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -8086,7 +8058,7 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "scope": 1086, + "scope": 1085, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -8098,19 +8070,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1075, + "id": 1074, "name": "ElementaryTypeName", - "src": "3213:7:7" + "src": "3217:7:7" } ], - "id": 1076, + "id": 1075, "name": "VariableDeclaration", - "src": "3213:19:7" + "src": "3217:19:7" } ], - "id": 1077, + "id": 1076, "name": "ParameterList", - "src": "3212:21:7" + "src": "3216:21:7" }, { "children": [ @@ -8119,7 +8091,7 @@ "constant": false, "mutability": "mutable", "name": "creator", - "scope": 1086, + "scope": 1085, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -8132,25 +8104,25 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1078, + "id": 1077, "name": "ElementaryTypeName", - "src": "3255:7:7" + "src": "3259:7:7" } ], - "id": 1079, + "id": 1078, "name": "VariableDeclaration", - "src": "3255:15:7" + "src": "3259:15:7" } ], - "id": 1080, + "id": 1079, "name": "ParameterList", - "src": "3254:17:7" + "src": "3258:17:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 1080 + "functionReturnParameters": 1079 }, "children": [ { @@ -8171,42 +8143,42 @@ "type": "mapping(bytes32 => address)", "value": "assertionIssuer" }, - "id": 1081, + "id": 1080, "name": "Identifier", - "src": "3282:15:7" + "src": "3286:15:7" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1076, + "referencedDeclaration": 1075, "type": "bytes32", "value": "assertionID" }, - "id": 1082, + "id": 1081, "name": "Identifier", - "src": "3298:11:7" + "src": "3302:11:7" } ], - "id": 1083, + "id": 1082, "name": "IndexAccess", - "src": "3282:28:7" + "src": "3286:28:7" } ], - "id": 1084, + "id": 1083, "name": "Return", - "src": "3275:35:7" + "src": "3279:35:7" } ], - "id": 1085, + "id": 1084, "name": "Block", - "src": "3271:43:7" + "src": "3275:43:7" } ], - "id": 1086, + "id": 1085, "name": "FunctionDefinition", - "src": "3185:129:7" + "src": "3189:129:7" }, { "attributes": { @@ -8218,7 +8190,7 @@ null ], "name": "getAssertionRootHash", - "scope": 1139, + "scope": 1138, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -8231,7 +8203,7 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "scope": 1099, + "scope": 1098, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -8243,19 +8215,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1087, + "id": 1086, "name": "ElementaryTypeName", - "src": "3346:7:7" + "src": "3350:7:7" } ], - "id": 1088, + "id": 1087, "name": "VariableDeclaration", - "src": "3346:19:7" + "src": "3350:19:7" } ], - "id": 1089, + "id": 1088, "name": "ParameterList", - "src": "3345:21:7" + "src": "3349:21:7" }, { "children": [ @@ -8264,7 +8236,7 @@ "constant": false, "mutability": "mutable", "name": "rootHash", - "scope": 1099, + "scope": 1098, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -8276,25 +8248,25 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1090, + "id": 1089, "name": "ElementaryTypeName", - "src": "3388:7:7" + "src": "3392:7:7" } ], - "id": 1091, + "id": 1090, "name": "VariableDeclaration", - "src": "3388:16:7" + "src": "3392:16:7" } ], - "id": 1092, + "id": 1091, "name": "ParameterList", - "src": "3387:18:7" + "src": "3391:18:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 1092 + "functionReturnParameters": 1091 }, "children": [ { @@ -8326,47 +8298,47 @@ "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 1093, + "id": 1092, "name": "Identifier", - "src": "3416:15:7" + "src": "3420:15:7" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1088, + "referencedDeclaration": 1087, "type": "bytes32", "value": "assertionID" }, - "id": 1094, + "id": 1093, "name": "Identifier", - "src": "3432:11:7" + "src": "3436:11:7" } ], - "id": 1095, + "id": 1094, "name": "IndexAccess", - "src": "3416:28:7" + "src": "3420:28:7" } ], - "id": 1096, + "id": 1095, "name": "MemberAccess", - "src": "3416:37:7" + "src": "3420:37:7" } ], - "id": 1097, + "id": 1096, "name": "Return", - "src": "3409:44:7" + "src": "3413:44:7" } ], - "id": 1098, + "id": 1097, "name": "Block", - "src": "3405:52:7" + "src": "3409:52:7" } ], - "id": 1099, + "id": 1098, "name": "FunctionDefinition", - "src": "3316:141:7" + "src": "3320:141:7" }, { "attributes": { @@ -8378,7 +8350,7 @@ null ], "name": "getAssertionTimeToLive", - "scope": 1139, + "scope": 1138, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -8391,7 +8363,7 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "scope": 1112, + "scope": 1111, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -8403,19 +8375,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1100, + "id": 1099, "name": "ElementaryTypeName", - "src": "3491:7:7" + "src": "3495:7:7" } ], - "id": 1101, + "id": 1100, "name": "VariableDeclaration", - "src": "3491:19:7" + "src": "3495:19:7" } ], - "id": 1102, + "id": 1101, "name": "ParameterList", - "src": "3490:21:7" + "src": "3494:21:7" }, { "children": [ @@ -8424,7 +8396,7 @@ "constant": false, "mutability": "mutable", "name": "timeToLive", - "scope": 1112, + "scope": 1111, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -8436,25 +8408,25 @@ "name": "uint256", "type": "uint256" }, - "id": 1103, + "id": 1102, "name": "ElementaryTypeName", - "src": "3533:7:7" + "src": "3537:7:7" } ], - "id": 1104, + "id": 1103, "name": "VariableDeclaration", - "src": "3533:18:7" + "src": "3537:18:7" } ], - "id": 1105, + "id": 1104, "name": "ParameterList", - "src": "3532:20:7" + "src": "3536:20:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 1105 + "functionReturnParameters": 1104 }, "children": [ { @@ -8486,47 +8458,47 @@ "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 1106, + "id": 1105, "name": "Identifier", - "src": "3563:15:7" + "src": "3567:15:7" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1101, + "referencedDeclaration": 1100, "type": "bytes32", "value": "assertionID" }, - "id": 1107, + "id": 1106, "name": "Identifier", - "src": "3579:11:7" + "src": "3583:11:7" } ], - "id": 1108, + "id": 1107, "name": "IndexAccess", - "src": "3563:28:7" + "src": "3567:28:7" } ], - "id": 1109, + "id": 1108, "name": "MemberAccess", - "src": "3563:48:7" + "src": "3567:48:7" } ], - "id": 1110, + "id": 1109, "name": "Return", - "src": "3556:55:7" + "src": "3560:55:7" } ], - "id": 1111, + "id": 1110, "name": "Block", - "src": "3552:63:7" + "src": "3556:63:7" } ], - "id": 1112, + "id": 1111, "name": "FunctionDefinition", - "src": "3459:156:7" + "src": "3463:156:7" }, { "attributes": { @@ -8538,7 +8510,7 @@ null ], "name": "getAssertionNumberOfEpochs", - "scope": 1139, + "scope": 1138, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -8551,7 +8523,7 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "scope": 1125, + "scope": 1124, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -8563,19 +8535,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1113, + "id": 1112, "name": "ElementaryTypeName", - "src": "3653:7:7" + "src": "3657:7:7" } ], - "id": 1114, + "id": 1113, "name": "VariableDeclaration", - "src": "3653:19:7" + "src": "3657:19:7" } ], - "id": 1115, + "id": 1114, "name": "ParameterList", - "src": "3652:21:7" + "src": "3656:21:7" }, { "children": [ @@ -8584,7 +8556,7 @@ "constant": false, "mutability": "mutable", "name": "numberOfEpochs", - "scope": 1125, + "scope": 1124, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -8596,25 +8568,25 @@ "name": "uint256", "type": "uint256" }, - "id": 1116, + "id": 1115, "name": "ElementaryTypeName", - "src": "3695:7:7" + "src": "3699:7:7" } ], - "id": 1117, + "id": 1116, "name": "VariableDeclaration", - "src": "3695:22:7" + "src": "3699:22:7" } ], - "id": 1118, + "id": 1117, "name": "ParameterList", - "src": "3694:24:7" + "src": "3698:24:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 1118 + "functionReturnParameters": 1117 }, "children": [ { @@ -8646,47 +8618,47 @@ "type": "mapping(bytes32 => struct DKGcontract.AssertionRecord storage ref)", "value": "assertionRecord" }, - "id": 1119, + "id": 1118, "name": "Identifier", - "src": "3729:15:7" + "src": "3733:15:7" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1114, + "referencedDeclaration": 1113, "type": "bytes32", "value": "assertionID" }, - "id": 1120, + "id": 1119, "name": "Identifier", - "src": "3745:11:7" + "src": "3749:11:7" } ], - "id": 1121, + "id": 1120, "name": "IndexAccess", - "src": "3729:28:7" + "src": "3733:28:7" } ], - "id": 1122, + "id": 1121, "name": "MemberAccess", - "src": "3729:43:7" + "src": "3733:43:7" } ], - "id": 1123, + "id": 1122, "name": "Return", - "src": "3722:50:7" + "src": "3726:50:7" } ], - "id": 1124, + "id": 1123, "name": "Block", - "src": "3718:58:7" + "src": "3722:58:7" } ], - "id": 1125, + "id": 1124, "name": "FunctionDefinition", - "src": "3617:159:7" + "src": "3621:159:7" }, { "attributes": { @@ -8698,7 +8670,7 @@ null ], "name": "getAssertionTask", - "scope": 1139, + "scope": 1138, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -8711,7 +8683,7 @@ "constant": false, "mutability": "mutable", "name": "assertionID", - "scope": 1138, + "scope": 1137, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -8723,21 +8695,21 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1126, + "id": 1125, "name": "ElementaryTypeName", - "src": "3805:7:7" + "src": "3809:7:7" } ], - "id": 1127, + "id": 1126, "name": "VariableDeclaration", - "src": "3805:19:7" + "src": "3809:19:7" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "epoch", - "scope": 1138, + "scope": 1137, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -8749,19 +8721,19 @@ "name": "uint256", "type": "uint256" }, - "id": 1128, + "id": 1127, "name": "ElementaryTypeName", - "src": "3826:7:7" + "src": "3830:7:7" } ], - "id": 1129, + "id": 1128, "name": "VariableDeclaration", - "src": "3826:13:7" + "src": "3830:13:7" } ], - "id": 1130, + "id": 1129, "name": "ParameterList", - "src": "3804:36:7" + "src": "3808:36:7" }, { "children": [ @@ -8770,7 +8742,7 @@ "constant": false, "mutability": "mutable", "name": "task", - "scope": 1138, + "scope": 1137, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -8782,25 +8754,25 @@ "name": "uint256", "type": "uint256" }, - "id": 1131, + "id": 1130, "name": "ElementaryTypeName", - "src": "3862:7:7" + "src": "3866:7:7" } ], - "id": 1132, + "id": 1131, "name": "VariableDeclaration", - "src": "3862:12:7" + "src": "3866:12:7" } ], - "id": 1133, + "id": 1132, "name": "ParameterList", - "src": "3861:14:7" + "src": "3865:14:7" }, { "children": [ { "attributes": { - "functionReturnParameters": 1133 + "functionReturnParameters": 1132 }, "children": [ { @@ -8822,39 +8794,39 @@ "type": "block", "value": "block" }, - "id": 1134, + "id": 1133, "name": "Identifier", - "src": "3886:5:7" + "src": "3890:5:7" } ], - "id": 1135, + "id": 1134, "name": "MemberAccess", - "src": "3886:12:7" + "src": "3890:12:7" } ], - "id": 1136, + "id": 1135, "name": "Return", - "src": "3879:19:7" + "src": "3883:19:7" } ], - "id": 1137, + "id": 1136, "name": "Block", - "src": "3875:27:7" + "src": "3879:27:7" } ], - "id": 1138, + "id": 1137, "name": "FunctionDefinition", - "src": "3779:123:7" + "src": "3783:123:7" } ], - "id": 1139, + "id": 1138, "name": "ContractDefinition", - "src": "286:3619:7" + "src": "286:3623:7" } ], - "id": 1140, + "id": 1139, "name": "SourceUnit", - "src": "0:3905:7" + "src": "0:3909:7" }, "compiler": { "name": "solc", @@ -9122,12 +9094,12 @@ } }, "links": {}, - "address": "0xFA421f2b10FBebaAeC281eb6734b0fA9Cc8dbbD7", - "transactionHash": "0x2dbb7b757b489a838946b9be4f817dc491f23464cc297e94acbfc4cf84de5649" + "address": "0xEd8ecA1917F586B67D2fB88930002E60828958a6", + "transactionHash": "0x130e35fb264aec93b34330b463b8bcc846c5f926a9df3326a6a7ca3fe0fd0831" } }, "schemaVersion": "3.4.3", - "updatedAt": "2022-02-10T19:25:20.337Z", + "updatedAt": "2022-02-11T10:13:46.687Z", "networkType": "ethereum", "devdoc": { "kind": "dev", diff --git a/build/contracts/Migrations.json b/build/contracts/Migrations.json index 5d732743ac..9c21cdc643 100644 --- a/build/contracts/Migrations.json +++ b/build/contracts/Migrations.json @@ -948,12 +948,12 @@ "80001": { "events": {}, "links": {}, - "address": "0x3Fb8427f61A41796C51547c31bF4353c46e893c9", - "transactionHash": "0x1b0b4954d56c9ca9871b090935c343c259e961ad1d4dba6a2e282dbc6ab78f76" + "address": "0xB0d4300e8376F3d9c58eF8edD534A8b42cf964aE", + "transactionHash": "0xf8ad7ba3a442068ff480d9d70bf65320a5cf92073592d52f953ab16b560e699b" } }, "schemaVersion": "3.4.3", - "updatedAt": "2022-02-10T19:25:20.343Z", + "updatedAt": "2022-02-11T10:13:46.713Z", "networkType": "ethereum", "devdoc": { "methods": {} diff --git a/build/contracts/UAIRegistry.json b/build/contracts/UAIRegistry.json index a2386188a8..19077cca02 100644 --- a/build/contracts/UAIRegistry.json +++ b/build/contracts/UAIRegistry.json @@ -412,15 +412,15 @@ "type": "function" } ], - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"assertionRegistryAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"}],\"name\":\"TokensDepositedToAsset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"}],\"name\":\"UAICreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assertionRegistryAddress\",\"type\":\"address\"}],\"name\":\"UAIRegistryInit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"}],\"name\":\"UAIUpdatedState\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"UAIstatus\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"assetRecords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"creationTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"alsoKnownAs\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_type\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"controller\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"assetStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"depositTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAssertionRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"assertionRegistry\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"getAssetAKA\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"alsoKnownAs\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"getAssetController\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"controller\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"getAssetCreationTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"creationTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"getAssetStateCommitHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_type\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"alsoKnownAs\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"}],\"name\":\"registerAsset\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateCommitHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"name\":\"updateAssetState\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"depositTokens(uint256,bytes32)\":{\"details\":\"Deposits tokens in ``amount`` to specific ``UAI``\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/UAIRegistry.sol\":\"UAIRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/access/Ownable.sol\":{\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://90faf5851c02f9bd42c5bfb54d4f0421a2612f50ab80b2c4fa24fa3792071cc2\",\"dweb:/ipfs/QmRGM4F2PcGVF85aTfaA9YBhCHHDqrMhRjyp6fGeBTtirb\"]},\"openzeppelin-solidity/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd970f51e3a77790c2f02b5b1759827c3b897c3d98c407b3631e8af32e3dc93c\",\"dweb:/ipfs/QmPF85Amgbqjk3SNZKsPCsqCw8JfwYEPMnnhvMJUyX58je\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol\":{\"keccak256\":\"0x61321d2c86346045bf394885ee3afeecc65f9daad2694bc19110967588fd7b5d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1703b877203e0447ede72dcf73f1c4f2089b415bd1c44877904128a64fafed5b\",\"dweb:/ipfs/QmaZoYDo2FWtKcwCc9zuabU6zri8KV9xJrhU614d93sLid\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"openzeppelin-solidity/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0x2d99a0deb6648c34fbc66d6ac4a2d64798d7a5321b45624f6736fadc63da1962\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2dcdce5ede1e5e650d174ec0b35be7d47b6a50f30bc895ef0d9e59fb75052e45\",\"dweb:/ipfs/QmQ2XFsDLTYqfEdw7pYzHiGtFRY11yQm4b6ynYgKqDxeB8\"]},\"openzeppelin-solidity/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"project:/contracts/DKGcontract.sol\":{\"keccak256\":\"0xbcf9626ce20959efd101eb22aa1e3baf00e0f3174ea883e38e4fd60c09ce0b04\",\"urls\":[\"bzz-raw://d362a7308bfcdb308316868e5c31e43a38ea2f004523f0b32d4dbc44787d40ea\",\"dweb:/ipfs/QmbwTjuMNtaQRKKDzeK41EQmf1gChTso1dnGeYBrrfwVKF\"]},\"project:/contracts/UAIRegistry.sol\":{\"keccak256\":\"0xccc8c80e25573c2b05f01530713cb579e08b68786c40f955b628f61e5d4bd81c\",\"urls\":[\"bzz-raw://9179d4492b4f66b48e8a55741135ada16ee00baaa5994e97b3a94122fda3a517\",\"dweb:/ipfs/QmREpbCAB3z9m2Xsk5noZwaH9Wgh4b9zpfibJpYWJQwDir\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516119733803806119738339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050600061005e61027d60201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561013657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561017057600080fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f52db5c2cb9235be3e8a3fe47f4ec4bc55b5e28aa119b750b0e766b1cb00c9aa760405160405180910390a25050610285565b600033905090565b6116df806102946000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806377636d1d1161008c5780638da5cb5b116100665780638da5cb5b146103bf578063a9cd6a2d146103f3578063d15b223e14610449578063f2fde38b14610481576100ea565b806377636d1d146102ae57806378e98392146103065780637f58afc81461037d576100ea565b806334e5197b116100c857806334e5197b146101de57806352569b9d146102205780636f3a922914610262578063715018a6146102a4576100ea565b806309600fa6146100ef57806309added7146101665780632f1704bc146101aa575b600080fd5b61011b6004803603602081101561010557600080fd5b81019080803590602001909291905050506104c5565b604051808681526020018581526020018460ff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019550505050505060405180910390f35b6101926004803603602081101561017c57600080fd5b8101908080359060200190929190505050610528565b60405180821515815260200191505060405180910390f35b6101b2610548565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61020a600480360360208110156101f457600080fd5b8101908080359060200190929190505050610572565b6040518082815260200191505060405180910390f35b61024c6004803603602081101561023657600080fd5b810190808035906020019092919050505061058a565b6040518082815260200191505060405180910390f35b61028e6004803603602081101561027857600080fd5b81019080803590602001909291905050506105aa565b6040518082815260200191505060405180910390f35b6102ac6105ca565b005b6102da600480360360208110156102c457600080fd5b8101908080359060200190929190505050610737565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610367600480360360c081101561031c57600080fd5b8101908080359060200190929190803560ff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050610777565b6040518082815260200191505060405180910390f35b6103a96004803603602081101561039357600080fd5b8101908080359060200190929190505050610b53565b6040518082815260200191505060405180910390f35b6103c7610b73565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104336004803603606081101561040957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610b9c565b6040518082815260200191505060405180910390f35b61047f6004803603604081101561045f57600080fd5b810190808035906020019092919080359060200190929190505050610e19565b005b6104c36004803603602081101561049757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112b2565b005b60046020528060005260406000206000915090508060000154908060010154908060020160009054906101000a900460ff16908060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154905085565b60056020528060005260406000206000915054906101000a900460ff1681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60066020528060005260406000206000915090505481565b600060046000838152602001908152602001600020600301549050919050565b600060046000838152602001908152602001600020600101549050919050565b6105d26114a4565b73ffffffffffffffffffffffffffffffffffffffff166105f0610b73565b73ffffffffffffffffffffffffffffffffffffffff1614610679576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006004600083815260200190815260200160002060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060001b8714156107f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5541492063616e6e6f74206265207a65726f000000000000000000000000000081525060200191505060405180910390fd5b60038660ff161061084e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116686021913960400191505060405180910390fd5b6000801b8514156108c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f616c736f4b6e6f776e41732063616e6e6f74206265207a65726f00000000000081525060200191505060405180910390fd5b6000801b841415610940576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f7374617465436f6d6d6974486173682063616e6e6f74206265207a65726f000081525060200191505060405180910390fd5b600015156005600089815260200190815260200160002060009054906101000a900460ff1615151461097157600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373a7738985856001806040518563ffffffff1660e01b815260040180858152602001848152602001838152602001828152602001945050505050600060405180830381600087803b1580156109ff57600080fd5b505af1158015610a13573d6000803e3d6000fd5b50505050836004600089815260200190815260200160002060030181905550856004600089815260200190815260200160002060020160006101000a81548160ff021916908360ff160217905550846004600089815260200190815260200160002060010181905550336004600089815260200190815260200160002060020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555042600460008981526020019081526020016000206000018190555060016005600089815260200190815260200160002060006101000a81548160ff02191690831515021790555083877f2f87578a4aeec4a0b61bbcea1767fec00fa79a35cf600b258509e25acdaba8e760405160405180910390a38690509695505050505050565b600060046000838152602001908152602001600020600001549050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060001b841415610c17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5541492063616e6e6f74206265207a65726f000000000000000000000000000081525060200191505060405180910390fd5b600115156005600086815260200190815260200160002060009054906101000a900460ff16151514610cb1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4173736574206d7573742065786973740000000000000000000000000000000081525060200191505060405180910390fd5b6000801b831415610d0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116896021913960400191505060405180910390fd5b610d1784336114ac565b610d2057600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373a7738984846001806040518563ffffffff1660e01b815260040180858152602001848152602001838152602001828152602001945050505050600060405180830381600087803b158015610dae57600080fd5b505af1158015610dc2573d6000803e3d6000fd5b5050505082600460008681526020019081526020016000206003018190555082847fa83f066abfa07a77196c29bd4b7aab88f194feaa03d9769ec2ceccf6701d06de60405160405180910390a38390509392505050565b60008211610e8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f416d6f756e742063616e6e6f74206265207a65726f000000000000000000000081525060200191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610f3757600080fd5b505afa158015610f4b573d6000803e3d6000fd5b505050506040513d6020811015610f6157600080fd5b81019080805190602001909291905050501015610fc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603e815260200180611607603e913960400191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561105357600080fd5b505afa158015611067573d6000803e3d6000fd5b505050506040513d602081101561107d57600080fd5b810190808051906020019092919050505010156110e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d8152602001806115ca603d913960400191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561119857600080fd5b505af11580156111ac573d6000803e3d6000fd5b505050506040513d60208110156111c257600080fd5b810190808051906020019092919050505090508061122b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116456023913960400191505060405180910390fd5b61125183600660008581526020019081526020016000205461151b90919063ffffffff16565b60066000848152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff1683837f2460c4e801cd784222555963fc8a1f1497f9ce3b23446fa14da62d317098933360405160405180910390a4505050565b6112ba6114a4565b73ffffffffffffffffffffffffffffffffffffffff166112d8610b73565b73ffffffffffffffffffffffffffffffffffffffff1614611361576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806115a46026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b60006004600084815260200190815260200160002060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080828401905083811015611599576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737353656e6465722062616c616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e742153656e64657220616c6c6f77616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e74546f6b656e207472616e73616374696f6e20657865637574696f6e206661696c6564215f7479706520616c6c6f7765642076616c7565733a20302c312c322028574950296e65775374617465436f6d6d6974486173682063616e6e6f74206265207a65726fa2646970667358221220ba0992a1275bbde52e5ec43a9e876357a0b660ab7a8a9001a6dd6b975bbe94bf64736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806377636d1d1161008c5780638da5cb5b116100665780638da5cb5b146103bf578063a9cd6a2d146103f3578063d15b223e14610449578063f2fde38b14610481576100ea565b806377636d1d146102ae57806378e98392146103065780637f58afc81461037d576100ea565b806334e5197b116100c857806334e5197b146101de57806352569b9d146102205780636f3a922914610262578063715018a6146102a4576100ea565b806309600fa6146100ef57806309added7146101665780632f1704bc146101aa575b600080fd5b61011b6004803603602081101561010557600080fd5b81019080803590602001909291905050506104c5565b604051808681526020018581526020018460ff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019550505050505060405180910390f35b6101926004803603602081101561017c57600080fd5b8101908080359060200190929190505050610528565b60405180821515815260200191505060405180910390f35b6101b2610548565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61020a600480360360208110156101f457600080fd5b8101908080359060200190929190505050610572565b6040518082815260200191505060405180910390f35b61024c6004803603602081101561023657600080fd5b810190808035906020019092919050505061058a565b6040518082815260200191505060405180910390f35b61028e6004803603602081101561027857600080fd5b81019080803590602001909291905050506105aa565b6040518082815260200191505060405180910390f35b6102ac6105ca565b005b6102da600480360360208110156102c457600080fd5b8101908080359060200190929190505050610737565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610367600480360360c081101561031c57600080fd5b8101908080359060200190929190803560ff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050610777565b6040518082815260200191505060405180910390f35b6103a96004803603602081101561039357600080fd5b8101908080359060200190929190505050610b53565b6040518082815260200191505060405180910390f35b6103c7610b73565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104336004803603606081101561040957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610b9c565b6040518082815260200191505060405180910390f35b61047f6004803603604081101561045f57600080fd5b810190808035906020019092919080359060200190929190505050610e19565b005b6104c36004803603602081101561049757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112b2565b005b60046020528060005260406000206000915090508060000154908060010154908060020160009054906101000a900460ff16908060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154905085565b60056020528060005260406000206000915054906101000a900460ff1681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60066020528060005260406000206000915090505481565b600060046000838152602001908152602001600020600301549050919050565b600060046000838152602001908152602001600020600101549050919050565b6105d26114a4565b73ffffffffffffffffffffffffffffffffffffffff166105f0610b73565b73ffffffffffffffffffffffffffffffffffffffff1614610679576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006004600083815260200190815260200160002060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060001b8714156107f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5541492063616e6e6f74206265207a65726f000000000000000000000000000081525060200191505060405180910390fd5b60038660ff161061084e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116686021913960400191505060405180910390fd5b6000801b8514156108c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f616c736f4b6e6f776e41732063616e6e6f74206265207a65726f00000000000081525060200191505060405180910390fd5b6000801b841415610940576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f7374617465436f6d6d6974486173682063616e6e6f74206265207a65726f000081525060200191505060405180910390fd5b600015156005600089815260200190815260200160002060009054906101000a900460ff1615151461097157600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373a7738985856001806040518563ffffffff1660e01b815260040180858152602001848152602001838152602001828152602001945050505050600060405180830381600087803b1580156109ff57600080fd5b505af1158015610a13573d6000803e3d6000fd5b50505050836004600089815260200190815260200160002060030181905550856004600089815260200190815260200160002060020160006101000a81548160ff021916908360ff160217905550846004600089815260200190815260200160002060010181905550336004600089815260200190815260200160002060020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555042600460008981526020019081526020016000206000018190555060016005600089815260200190815260200160002060006101000a81548160ff02191690831515021790555083877f2f87578a4aeec4a0b61bbcea1767fec00fa79a35cf600b258509e25acdaba8e760405160405180910390a38690509695505050505050565b600060046000838152602001908152602001600020600001549050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060001b841415610c17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5541492063616e6e6f74206265207a65726f000000000000000000000000000081525060200191505060405180910390fd5b600115156005600086815260200190815260200160002060009054906101000a900460ff16151514610cb1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4173736574206d7573742065786973740000000000000000000000000000000081525060200191505060405180910390fd5b6000801b831415610d0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116896021913960400191505060405180910390fd5b610d1784336114ac565b610d2057600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373a7738984846001806040518563ffffffff1660e01b815260040180858152602001848152602001838152602001828152602001945050505050600060405180830381600087803b158015610dae57600080fd5b505af1158015610dc2573d6000803e3d6000fd5b5050505082600460008681526020019081526020016000206003018190555082847fa83f066abfa07a77196c29bd4b7aab88f194feaa03d9769ec2ceccf6701d06de60405160405180910390a38390509392505050565b60008211610e8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f416d6f756e742063616e6e6f74206265207a65726f000000000000000000000081525060200191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610f3757600080fd5b505afa158015610f4b573d6000803e3d6000fd5b505050506040513d6020811015610f6157600080fd5b81019080805190602001909291905050501015610fc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603e815260200180611607603e913960400191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561105357600080fd5b505afa158015611067573d6000803e3d6000fd5b505050506040513d602081101561107d57600080fd5b810190808051906020019092919050505010156110e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d8152602001806115ca603d913960400191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561119857600080fd5b505af11580156111ac573d6000803e3d6000fd5b505050506040513d60208110156111c257600080fd5b810190808051906020019092919050505090508061122b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116456023913960400191505060405180910390fd5b61125183600660008581526020019081526020016000205461151b90919063ffffffff16565b60066000848152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff1683837f2460c4e801cd784222555963fc8a1f1497f9ce3b23446fa14da62d317098933360405160405180910390a4505050565b6112ba6114a4565b73ffffffffffffffffffffffffffffffffffffffff166112d8610b73565b73ffffffffffffffffffffffffffffffffffffffff1614611361576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806115a46026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b60006004600084815260200190815260200160002060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600080828401905083811015611599576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737353656e6465722062616c616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e742153656e64657220616c6c6f77616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e74546f6b656e207472616e73616374696f6e20657865637574696f6e206661696c6564215f7479706520616c6c6f7765642076616c7565733a20302c312c322028574950296e65775374617465436f6d6d6974486173682063616e6e6f74206265207a65726fa2646970667358221220ba0992a1275bbde52e5ec43a9e876357a0b660ab7a8a9001a6dd6b975bbe94bf64736f6c63430007060033", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"assertionRegistryAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"}],\"name\":\"TokensDepositedToAsset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"}],\"name\":\"UAICreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assertionRegistryAddress\",\"type\":\"address\"}],\"name\":\"UAIRegistryInit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"}],\"name\":\"UAIUpdatedState\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"UAIstatus\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"assetRecords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"creationTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"alsoKnownAs\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_type\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"controller\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"assetStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"depositTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAssertionRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"assertionRegistry\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"getAssetAKA\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"alsoKnownAs\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"getAssetController\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"controller\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"getAssetCreationTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"creationTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"}],\"name\":\"getAssetStateCommitHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_type\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"alsoKnownAs\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"stateCommitHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"}],\"name\":\"registerAsset\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"UAI\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateCommitHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rootHash\",\"type\":\"bytes32\"}],\"name\":\"updateAssetState\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"depositTokens(uint256,bytes32)\":{\"details\":\"Deposits tokens in ``amount`` to specific ``UAI``\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/UAIRegistry.sol\":\"UAIRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/access/Ownable.sol\":{\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://90faf5851c02f9bd42c5bfb54d4f0421a2612f50ab80b2c4fa24fa3792071cc2\",\"dweb:/ipfs/QmRGM4F2PcGVF85aTfaA9YBhCHHDqrMhRjyp6fGeBTtirb\"]},\"openzeppelin-solidity/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd970f51e3a77790c2f02b5b1759827c3b897c3d98c407b3631e8af32e3dc93c\",\"dweb:/ipfs/QmPF85Amgbqjk3SNZKsPCsqCw8JfwYEPMnnhvMJUyX58je\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol\":{\"keccak256\":\"0x61321d2c86346045bf394885ee3afeecc65f9daad2694bc19110967588fd7b5d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1703b877203e0447ede72dcf73f1c4f2089b415bd1c44877904128a64fafed5b\",\"dweb:/ipfs/QmaZoYDo2FWtKcwCc9zuabU6zri8KV9xJrhU614d93sLid\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"openzeppelin-solidity/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0x2d99a0deb6648c34fbc66d6ac4a2d64798d7a5321b45624f6736fadc63da1962\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2dcdce5ede1e5e650d174ec0b35be7d47b6a50f30bc895ef0d9e59fb75052e45\",\"dweb:/ipfs/QmQ2XFsDLTYqfEdw7pYzHiGtFRY11yQm4b6ynYgKqDxeB8\"]},\"openzeppelin-solidity/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"project:/contracts/DKGcontract.sol\":{\"keccak256\":\"0xea0c3c1edba3277ff8a18e50b054ab4d2e1f9434b2554270a4cccb3edb0d9ef3\",\"urls\":[\"bzz-raw://259759777c8a56dae6f5980dd9b6a27725636643e6cc54b0fd6e6f3e997176c6\",\"dweb:/ipfs/QmWzcVDUJ8ymwT6dYd15VhpyZsB9WeCs9BeomSVxr5Cer7\"]},\"project:/contracts/UAIRegistry.sol\":{\"keccak256\":\"0xc1f3db75475a1fab7aef0b5cf05e3b51cd88da6650d8c86f2c407f6c233e4c1e\",\"urls\":[\"bzz-raw://e9d01a85357bf1630109d13100a7d162e2ebd0c600db5180c83d8d3bb2428ab8\",\"dweb:/ipfs/QmZh1YAkw9K9TjUAvPpZYuTLeEt7qfuTNy2KgHR7kzq5aj\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516119af3803806119af8339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050600061005e61027d60201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561013657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561017057600080fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f52db5c2cb9235be3e8a3fe47f4ec4bc55b5e28aa119b750b0e766b1cb00c9aa760405160405180910390a25050610285565b600033905090565b61171b806102946000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806377636d1d1161008c5780638da5cb5b116100665780638da5cb5b146103bf578063a9cd6a2d146103f3578063d15b223e14610449578063f2fde38b14610481576100ea565b806377636d1d146102ae57806378e98392146103065780637f58afc81461037d576100ea565b806334e5197b116100c857806334e5197b146101de57806352569b9d146102205780636f3a922914610262578063715018a6146102a4576100ea565b806309600fa6146100ef57806309added7146101665780632f1704bc146101aa575b600080fd5b61011b6004803603602081101561010557600080fd5b81019080803590602001909291905050506104c5565b604051808681526020018581526020018460ff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019550505050505060405180910390f35b6101926004803603602081101561017c57600080fd5b8101908080359060200190929190505050610528565b60405180821515815260200191505060405180910390f35b6101b2610548565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61020a600480360360208110156101f457600080fd5b8101908080359060200190929190505050610572565b6040518082815260200191505060405180910390f35b61024c6004803603602081101561023657600080fd5b810190808035906020019092919050505061058a565b6040518082815260200191505060405180910390f35b61028e6004803603602081101561027857600080fd5b81019080803590602001909291905050506105aa565b6040518082815260200191505060405180910390f35b6102ac6105ca565b005b6102da600480360360208110156102c457600080fd5b8101908080359060200190929190505050610737565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610367600480360360c081101561031c57600080fd5b8101908080359060200190929190803560ff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050610777565b6040518082815260200191505060405180910390f35b6103a96004803603602081101561039357600080fd5b8101908080359060200190929190505050610b71565b6040518082815260200191505060405180910390f35b6103c7610b91565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104336004803603606081101561040957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610bba565b6040518082815260200191505060405180910390f35b61047f6004803603604081101561045f57600080fd5b810190808035906020019092919080359060200190929190505050610e55565b005b6104c36004803603602081101561049757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112ee565b005b60046020528060005260406000206000915090508060000154908060010154908060020160009054906101000a900460ff16908060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154905085565b60056020528060005260406000206000915054906101000a900460ff1681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60066020528060005260406000206000915090505481565b600060046000838152602001908152602001600020600301549050919050565b600060046000838152602001908152602001600020600101549050919050565b6105d26114e0565b73ffffffffffffffffffffffffffffffffffffffff166105f0610b91565b73ffffffffffffffffffffffffffffffffffffffff1614610679576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006004600083815260200190815260200160002060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060001b8714156107f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5541492063616e6e6f74206265207a65726f000000000000000000000000000081525060200191505060405180910390fd5b60038660ff161061084e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116a46021913960400191505060405180910390fd5b6000801b8514156108c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f616c736f4b6e6f776e41732063616e6e6f74206265207a65726f00000000000081525060200191505060405180910390fd5b6000801b841415610940576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f7374617465436f6d6d6974486173682063616e6e6f74206265207a65726f000081525060200191505060405180910390fd5b600015156005600089815260200190815260200160002060009054906101000a900460ff1615151461097157600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f164c4368585336001806040518663ffffffff1660e01b8152600401808681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200195505050505050600060405180830381600087803b158015610a1d57600080fd5b505af1158015610a31573d6000803e3d6000fd5b50505050836004600089815260200190815260200160002060030181905550856004600089815260200190815260200160002060020160006101000a81548160ff021916908360ff160217905550846004600089815260200190815260200160002060010181905550336004600089815260200190815260200160002060020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555042600460008981526020019081526020016000206000018190555060016005600089815260200190815260200160002060006101000a81548160ff02191690831515021790555083877f2f87578a4aeec4a0b61bbcea1767fec00fa79a35cf600b258509e25acdaba8e760405160405180910390a38690509695505050505050565b600060046000838152602001908152602001600020600001549050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060001b841415610c35576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5541492063616e6e6f74206265207a65726f000000000000000000000000000081525060200191505060405180910390fd5b600115156005600086815260200190815260200160002060009054906101000a900460ff16151514610ccf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4173736574206d7573742065786973740000000000000000000000000000000081525060200191505060405180910390fd5b6000801b831415610d2b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116c56021913960400191505060405180910390fd5b610d3584336114e8565b610d3e57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f164c4368484336001806040518663ffffffff1660e01b8152600401808681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200195505050505050600060405180830381600087803b158015610dea57600080fd5b505af1158015610dfe573d6000803e3d6000fd5b5050505082600460008681526020019081526020016000206003018190555082847fa83f066abfa07a77196c29bd4b7aab88f194feaa03d9769ec2ceccf6701d06de60405160405180910390a38390509392505050565b60008211610ecb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f416d6f756e742063616e6e6f74206265207a65726f000000000000000000000081525060200191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610f7357600080fd5b505afa158015610f87573d6000803e3d6000fd5b505050506040513d6020811015610f9d57600080fd5b81019080805190602001909291905050501015611005576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603e815260200180611643603e913960400191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561108f57600080fd5b505afa1580156110a3573d6000803e3d6000fd5b505050506040513d60208110156110b957600080fd5b81019080805190602001909291905050501015611121576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611606603d913960400191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156111d457600080fd5b505af11580156111e8573d6000803e3d6000fd5b505050506040513d60208110156111fe57600080fd5b8101908080519060200190929190505050905080611267576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116816023913960400191505060405180910390fd5b61128d83600660008581526020019081526020016000205461155790919063ffffffff16565b60066000848152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff1683837f2460c4e801cd784222555963fc8a1f1497f9ce3b23446fa14da62d317098933360405160405180910390a4505050565b6112f66114e0565b73ffffffffffffffffffffffffffffffffffffffff16611314610b91565b73ffffffffffffffffffffffffffffffffffffffff161461139d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611423576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806115e06026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b60006004600084815260200190815260200160002060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b6000808284019050838110156115d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737353656e6465722062616c616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e742153656e64657220616c6c6f77616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e74546f6b656e207472616e73616374696f6e20657865637574696f6e206661696c6564215f7479706520616c6c6f7765642076616c7565733a20302c312c322028574950296e65775374617465436f6d6d6974486173682063616e6e6f74206265207a65726fa2646970667358221220b378009612cd1f68ed8ba5b39d8c4663c4577bff6db30499a5ca911b102a86b664736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806377636d1d1161008c5780638da5cb5b116100665780638da5cb5b146103bf578063a9cd6a2d146103f3578063d15b223e14610449578063f2fde38b14610481576100ea565b806377636d1d146102ae57806378e98392146103065780637f58afc81461037d576100ea565b806334e5197b116100c857806334e5197b146101de57806352569b9d146102205780636f3a922914610262578063715018a6146102a4576100ea565b806309600fa6146100ef57806309added7146101665780632f1704bc146101aa575b600080fd5b61011b6004803603602081101561010557600080fd5b81019080803590602001909291905050506104c5565b604051808681526020018581526020018460ff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019550505050505060405180910390f35b6101926004803603602081101561017c57600080fd5b8101908080359060200190929190505050610528565b60405180821515815260200191505060405180910390f35b6101b2610548565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61020a600480360360208110156101f457600080fd5b8101908080359060200190929190505050610572565b6040518082815260200191505060405180910390f35b61024c6004803603602081101561023657600080fd5b810190808035906020019092919050505061058a565b6040518082815260200191505060405180910390f35b61028e6004803603602081101561027857600080fd5b81019080803590602001909291905050506105aa565b6040518082815260200191505060405180910390f35b6102ac6105ca565b005b6102da600480360360208110156102c457600080fd5b8101908080359060200190929190505050610737565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610367600480360360c081101561031c57600080fd5b8101908080359060200190929190803560ff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050610777565b6040518082815260200191505060405180910390f35b6103a96004803603602081101561039357600080fd5b8101908080359060200190929190505050610b71565b6040518082815260200191505060405180910390f35b6103c7610b91565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104336004803603606081101561040957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610bba565b6040518082815260200191505060405180910390f35b61047f6004803603604081101561045f57600080fd5b810190808035906020019092919080359060200190929190505050610e55565b005b6104c36004803603602081101561049757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112ee565b005b60046020528060005260406000206000915090508060000154908060010154908060020160009054906101000a900460ff16908060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154905085565b60056020528060005260406000206000915054906101000a900460ff1681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60066020528060005260406000206000915090505481565b600060046000838152602001908152602001600020600301549050919050565b600060046000838152602001908152602001600020600101549050919050565b6105d26114e0565b73ffffffffffffffffffffffffffffffffffffffff166105f0610b91565b73ffffffffffffffffffffffffffffffffffffffff1614610679576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006004600083815260200190815260200160002060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060001b8714156107f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5541492063616e6e6f74206265207a65726f000000000000000000000000000081525060200191505060405180910390fd5b60038660ff161061084e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116a46021913960400191505060405180910390fd5b6000801b8514156108c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f616c736f4b6e6f776e41732063616e6e6f74206265207a65726f00000000000081525060200191505060405180910390fd5b6000801b841415610940576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f7374617465436f6d6d6974486173682063616e6e6f74206265207a65726f000081525060200191505060405180910390fd5b600015156005600089815260200190815260200160002060009054906101000a900460ff1615151461097157600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f164c4368585336001806040518663ffffffff1660e01b8152600401808681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200195505050505050600060405180830381600087803b158015610a1d57600080fd5b505af1158015610a31573d6000803e3d6000fd5b50505050836004600089815260200190815260200160002060030181905550856004600089815260200190815260200160002060020160006101000a81548160ff021916908360ff160217905550846004600089815260200190815260200160002060010181905550336004600089815260200190815260200160002060020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555042600460008981526020019081526020016000206000018190555060016005600089815260200190815260200160002060006101000a81548160ff02191690831515021790555083877f2f87578a4aeec4a0b61bbcea1767fec00fa79a35cf600b258509e25acdaba8e760405160405180910390a38690509695505050505050565b600060046000838152602001908152602001600020600001549050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060001b841415610c35576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f5541492063616e6e6f74206265207a65726f000000000000000000000000000081525060200191505060405180910390fd5b600115156005600086815260200190815260200160002060009054906101000a900460ff16151514610ccf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4173736574206d7573742065786973740000000000000000000000000000000081525060200191505060405180910390fd5b6000801b831415610d2b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116c56021913960400191505060405180910390fd5b610d3584336114e8565b610d3e57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f164c4368484336001806040518663ffffffff1660e01b8152600401808681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200195505050505050600060405180830381600087803b158015610dea57600080fd5b505af1158015610dfe573d6000803e3d6000fd5b5050505082600460008681526020019081526020016000206003018190555082847fa83f066abfa07a77196c29bd4b7aab88f194feaa03d9769ec2ceccf6701d06de60405160405180910390a38390509392505050565b60008211610ecb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f416d6f756e742063616e6e6f74206265207a65726f000000000000000000000081525060200191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610f7357600080fd5b505afa158015610f87573d6000803e3d6000fd5b505050506040513d6020811015610f9d57600080fd5b81019080805190602001909291905050501015611005576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603e815260200180611643603e913960400191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561108f57600080fd5b505afa1580156110a3573d6000803e3d6000fd5b505050506040513d60208110156110b957600080fd5b81019080805190602001909291905050501015611121576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611606603d913960400191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156111d457600080fd5b505af11580156111e8573d6000803e3d6000fd5b505050506040513d60208110156111fe57600080fd5b8101908080519060200190929190505050905080611267576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116816023913960400191505060405180910390fd5b61128d83600660008581526020019081526020016000205461155790919063ffffffff16565b60066000848152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff1683837f2460c4e801cd784222555963fc8a1f1497f9ce3b23446fa14da62d317098933360405160405180910390a4505050565b6112f66114e0565b73ffffffffffffffffffffffffffffffffffffffff16611314610b91565b73ffffffffffffffffffffffffffffffffffffffff161461139d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611423576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806115e06026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b60006004600084815260200190815260200160002060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905092915050565b6000808284019050838110156115d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737353656e6465722062616c616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e742153656e64657220616c6c6f77616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e74546f6b656e207472616e73616374696f6e20657865637574696f6e206661696c6564215f7479706520616c6c6f7765642076616c7565733a20302c312c322028574950296e65775374617465436f6d6d6974486173682063616e6e6f74206265207a65726fa2646970667358221220b378009612cd1f68ed8ba5b39d8c4663c4577bff6db30499a5ca911b102a86b664736f6c63430007060033", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], - "sourceMap": "623:4950:8:-:0;;;1526:365;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;884:17:0;904:12;:10;;;:12;;:::i;:::-;884:32;;935:9;926:6;;:18;;;;;;;;;;;;;;;;;;992:9;959:43;;988:1;959:43;;;;;;;;;;;;850:159;1636:1:8;1614:24;;:12;:24;;;;1606:33;;;;;;1685:1;1651:36;;:24;:36;;;;1643:45;;;;;;1708:12;1693:5;;:28;;;;;;;;;;;;;;;;;;1752:24;1725;;:51;;;;;;;;;;;;;;;;;;1812:24;1780:17;;:57;;;;;;;;;;;;;;;;;;1862:24;1846:41;;;;;;;;;;;;1526:365;;623:4950;;598:104:6;651:15;685:10;678:17;;598:104;:::o;623:4950:8:-;;;;;;;", - "deployedSourceMap": "623:4950:8:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1042:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1096:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;4095:117;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;1141:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3560:138;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3827:118;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1717:145:0;;;:::i;:::-;;3701:123:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;1894:1071;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3948:144;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1085:85:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;2970:574:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4792:776;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2011:240:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1042:51:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1096:41::-;;;;;;;;;;;;;;;;;;;;;;:::o;4095:117::-;4147:25;4184:24;;;;;;;;;;;4177:31;;4095:117;:::o;1141:45::-;;;;;;;;;;;;;;;;;:::o;3560:138::-;3626:23;3661:12;:17;3674:3;3661:17;;;;;;;;;;;:33;;;3654:40;;3560:138;;;:::o;3827:118::-;3881:19;3912:12;:17;3925:3;3912:17;;;;;;;;;;;:29;;;3905:36;;3827:118;;;:::o;1717:145:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1823:1:::1;1786:40;;1807:6;::::0;::::1;;;;;;;;1786:40;;;;;;;;;;;;1853:1;1836:6:::0;::::1;:19;;;;;;;;;;;;;;;;;;1717:145::o:0;3701:123:8:-;3762:18;3792:12;:17;3805:3;3792:17;;;;;;;;;;;:28;;;;;;;;;;;;3785:35;;3701:123;;;:::o;1894:1071::-;2044:7;2070:1;2065:6;;:3;:6;;2057:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2114:1;2106:5;:9;;;2098:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2178:1;2165:14;;:11;:14;;2157:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2239:1;2222:18;;:15;:18;;2214:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2305:5;2287:23;;:9;:14;2297:3;2287:14;;;;;;;;;;;;;;;;;;;;;:23;;;2279:33;;;;;;2472:17;;;;;;;;;;;:39;;;2512:15;2529:8;2539:1;2542;2472:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2628:15;2592:12;:17;2605:3;2592:17;;;;;;;;;;;:33;;:51;;;;2673:5;2647:12;:17;2660:3;2647:17;;;;;;;;;;;:23;;;:31;;;;;;;;;;;;;;;;;;2714:11;2682:12;:17;2695:3;2682:17;;;;;;;;;;;:29;;:43;;;;2760:10;2729:12;:17;2742:3;2729:17;;;;;;;;;;;:28;;;:41;;;;;;;;;;;;;;;;;;2864:15;2826:12;:17;2839:3;2826:17;;;;;;;;;;;:35;;:53;;;;2900:4;2883:9;:14;2893:3;2883:14;;;;;;;;;;;;:21;;;;;;;;;;;;;;;;;;2930:15;2925:3;2914:32;;;;;;;;;;2958:3;2951:10;;1894:1071;;;;;;;;:::o;3948:144::-;4016:25;4053:12;:17;4066:3;4053:17;;;;;;;;;;;:35;;;4046:42;;3948:144;;;:::o;1085:85:0:-;1131:7;1157:6;;;;;;;;;;;1150:13;;1085:85;:::o;2970:574:8:-;3071:7;3098:1;3093:6;;:3;:6;;3085:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3152:4;3134:22;;:9;:14;3144:3;3134:14;;;;;;;;;;;;;;;;;;;;;:22;;;3126:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3210:1;3190:21;;:18;:21;;3182:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3261:23;3269:3;3273:10;3261:7;:23::i;:::-;3253:32;;;;;;3292:17;;;;;;;;;;;:39;;;3332:18;3352:8;3362:1;3365;3292:75;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3418:18;3381:12;:17;3394:3;3381:17;;;;;;;;;;;:33;;:55;;;;3506:18;3501:3;3485:40;;;;;;;;;;3537:3;3530:10;;2970:574;;;;;:::o;4792:776::-;4875:1;4868:6;:8;4860:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4964:6;4918:5;;;;;;;;;;;:15;;;4934:10;4954:4;4918:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:52;;4910:127;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5084:6;5053:5;;;;;;;;;;;:15;;;5069:10;5053:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:37;;5045:111;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5165:23;5191:5;;;;;;;;;;;:18;;;5210:10;5230:4;5237:6;5191:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5165:79;;5260:18;5252:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5481:27;5501:6;5481:10;:15;5492:3;5481:15;;;;;;;;;;;;:19;;:27;;;;:::i;:::-;5463:10;:15;5474:3;5463:15;;;;;;;;;;;:45;;;;5552:10;5517:46;;5545:6;5540:3;5517:46;;;;;;;;;;4792:776;;;:::o;2011:240:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2119:1:::1;2099:22;;:8;:22;;;;2091:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2208:8;2179:38;;2200:6;::::0;::::1;;;;;;;;2179:38;;;;;;;;;;;;2236:8;2227:6;::::0;:17:::1;;;;;;;;;;;;;;;;;;2011:240:::0;:::o;598:104:6:-;651:15;685:10;678:17;;598:104;:::o;4581:129:8:-;4644:4;4674:12;:17;4687:3;4674:17;;;;;;;;;;;:28;;;;;;;;;;;;4665:37;;:5;:37;;;4658:44;;4581:129;;;;:::o;2690:175:2:-;2748:7;2767:9;2783:1;2779;:5;2767:17;;2807:1;2802;:6;;2794:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2857:1;2850:8;;;2690:175;;;;:::o", - "source": "pragma solidity >=0.6.0 <0.8.0;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC721/IERC721.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/access/Ownable.sol\";\nimport \"./DKGcontract.sol\";\n\n/*\n\nUAI/UALs essentially are:\n\n- DID/DID URLs native to the OriginTrail DKG\n- uniquely identify physical or digital assets (DID subjects)\n- have one or more \"owners\" (DID controllers)\n\nThe specification for UAI/UALs is currently WIP.\n\n*/\n\ncontract UAIRegistry is Ownable {\n\n\tenum AssetType{\n\t\tNative,\n\t\tERC721,\n\t\tERC1155\n\t}\n\n\tusing SafeMath for uint256;\n\tIERC20 token;\n\tDKGcontract AssertionRegistry;\n\taddress AssertionRegistryAddress;\n\n\tstruct AssetRecord{\n\t\tuint256 creationTimestamp;\n\t\tbytes32 alsoKnownAs; // alternative ID, as defined in DID-core spec, PoC address + tokenURI\n\t\tuint8 _type;\n\t\taddress controller; // tbd \n\t\tbytes32 stateCommitHash;\n\t}\n\n\tmapping(bytes32 => AssetRecord) public assetRecords;\n\tmapping(bytes32 => bool) public UAIstatus; \n\tmapping(bytes32 => uint256) public assetStake; \n\t\n\n\t// events\n\tevent UAIRegistryInit(address indexed assertionRegistryAddress);\n\tevent UAICreated(bytes32 indexed UAI, bytes32 indexed stateCommitHash);\n\tevent UAIUpdatedState(bytes32 indexed UAI, bytes32 indexed stateCommitHash );\n\tevent TokensDepositedToAsset(bytes32 indexed UAI, uint256 indexed amount, address indexed depositor);\n\n\tconstructor(address tokenAddress, address assertionRegistryAddress) public {\n\t\trequire(tokenAddress!=address(0));\n\t\trequire(assertionRegistryAddress!=address(0));\n\n\t\ttoken = IERC20(tokenAddress);\n\t\tAssertionRegistryAddress = assertionRegistryAddress;\n\t\tAssertionRegistry = DKGcontract(assertionRegistryAddress);\n\t\temit UAIRegistryInit(assertionRegistryAddress);\n\t}\n\n\tfunction registerAsset(bytes32 UAI, uint8 _type, bytes32 alsoKnownAs, bytes32 stateCommitHash, bytes32 rootHash, uint256 tokenAmount) public returns (bytes32){\n\n\t\trequire(UAI!=0, \"UAI cannot be zero\");\n\t\trequire(_type < 3, \"_type allowed values: 0,1,2 (WIP)\");\n\t\trequire(alsoKnownAs!=0, \"alsoKnownAs cannot be zero\");\n\t\trequire(stateCommitHash!=0, \"stateCommitHash cannot be zero\");\n\t\trequire(UAIstatus[UAI] == false ); // should not be possible to register existing asset again\n\n\t\t//bytes32 UAI = createUAI(_type,alsoKnownAs);\n\n\t\t// depositTokens(tokenAmount, UAI); // todo\n\n\t\tAssertionRegistry.createAssertionRecord(stateCommitHash, rootHash, 1, 1); // todo: update when DKGcontract is updated\n\t\tassetRecords[UAI].stateCommitHash = stateCommitHash;\n\t\tassetRecords[UAI]._type = _type;\n\t\tassetRecords[UAI].alsoKnownAs = alsoKnownAs;\n\t\tassetRecords[UAI].controller = msg.sender; // should update with AssetControllerProxy contract\n\t\tassetRecords[UAI].creationTimestamp = block.timestamp;\n\t\tUAIstatus[UAI] = true;\n\n\t\temit UAICreated(UAI, stateCommitHash);\n\n\t\treturn UAI;\n\t}\t\n\n\n\tfunction updateAssetState(bytes32 UAI, bytes32 newStateCommitHash, bytes32 rootHash) public returns (bytes32) {\n\n\t\trequire(UAI!=0, \"UAI cannot be zero\");\n\t\trequire(UAIstatus[UAI] == true, \"Asset must exist\" );\n\t\trequire(newStateCommitHash!=0, \"newStateCommitHash cannot be zero\");\n\t\trequire(isOwner(UAI,msg.sender));\n\t\t\n\t\tAssertionRegistry.createAssertionRecord(newStateCommitHash, rootHash, 1, 1); // UPDATE\n\t\tassetRecords[UAI].stateCommitHash = newStateCommitHash;\n\t\t// todo: store old commits somewhere\n\n\t\temit UAIUpdatedState(UAI, newStateCommitHash);\n\n\t\treturn UAI;\n\t}\n\n\n\t// getters\n\tfunction getAssetStateCommitHash(bytes32 UAI) public view returns(bytes32 stateCommitHash){\n\t\treturn assetRecords[UAI].stateCommitHash;\n\t}\n\n\tfunction getAssetController(bytes32 UAI) public view returns(address controller){\n\t\treturn assetRecords[UAI].controller;\n\t}\n\n\tfunction getAssetAKA(bytes32 UAI) public view returns(bytes32 alsoKnownAs){\n\t\treturn assetRecords[UAI].alsoKnownAs;\n\t}\n\n\tfunction getAssetCreationTimestamp(bytes32 UAI) public view returns(uint256 creationTimestamp){\n\t\treturn assetRecords[UAI].creationTimestamp;\n\t}\n\n\tfunction getAssertionRegistry() public view returns(address assertionRegistry){\n\t\treturn AssertionRegistryAddress;\n\t}\n\n\t// internal\n\n\n\t/**\n * @dev Should determine type of ``contractAddress``, if possible, returning enum AssetType\n */\n function determineType(address contractAddress, bytes32 id) internal returns (uint8){\n\t\treturn 0; // todo: implement detection of contract type\n\t}\n\n\t/**\n * @dev Returns bool checking if ``owner`` is controller of ``UAI``\n */\n function isOwner(bytes32 UAI, address owner) internal returns (bool) {\n \treturn owner == assetRecords[UAI].controller;\n }\n\n\t/**\n * @dev Deposits tokens in ``amount`` to specific ``UAI``\n */\n function depositTokens(uint256 amount, bytes32 UAI) public {\n\n \trequire(amount>0, \"Amount cannot be zero\");\n \trequire(token.allowance(msg.sender, address(this)) >= amount, \"Sender allowance must be equal to or higher than chosen amount\");\n \trequire(token.balanceOf(msg.sender) >= amount, \"Sender balance must be equal to or higher than chosen amount!\");\n\n \tbool transaction_result = token.transferFrom(msg.sender, address(this), amount);\n \trequire(transaction_result, \"Token transaction execution failed!\");\n\n\t\t// if (stake[msg.sender] == 0){\n\t\t// \tparticipant_indexes[msg.sender] = participants.length;\n\t\t// \tparticipants.push(msg.sender);\n\t\t// }\n\n\t\tassetStake[UAI] = assetStake[UAI].add(amount);\n\t\temit TokensDepositedToAsset(UAI, amount,msg.sender);\n\n\t}\t\n\n\n}", + "sourceMap": "623:4983:8:-:0;;;1526:365;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;884:17:0;904:12;:10;;;:12;;:::i;:::-;884:32;;935:9;926:6;;:18;;;;;;;;;;;;;;;;;;992:9;959:43;;988:1;959:43;;;;;;;;;;;;850:159;1636:1:8;1614:24;;:12;:24;;;;1606:33;;;;;;1685:1;1651:36;;:24;:36;;;;1643:45;;;;;;1708:12;1693:5;;:28;;;;;;;;;;;;;;;;;;1752:24;1725;;:51;;;;;;;;;;;;;;;;;;1812:24;1780:17;;:57;;;;;;;;;;;;;;;;;;1862:24;1846:41;;;;;;;;;;;;1526:365;;623:4983;;598:104:6;651:15;685:10;678:17;;598:104;:::o;623:4983:8:-;;;;;;;", + "deployedSourceMap": "623:4983:8:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1042:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1096:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;4128:117;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;1141:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3593:138;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3860:118;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1717:145:0;;;:::i;:::-;;3734:123:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;1894:1092;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3981:144;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1085:85:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;2991:586:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4825:776;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2011:240:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1042:51:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1096:41::-;;;;;;;;;;;;;;;;;;;;;;:::o;4128:117::-;4180:25;4217:24;;;;;;;;;;;4210:31;;4128:117;:::o;1141:45::-;;;;;;;;;;;;;;;;;:::o;3593:138::-;3659:23;3694:12;:17;3707:3;3694:17;;;;;;;;;;;:33;;;3687:40;;3593:138;;;:::o;3860:118::-;3914:19;3945:12;:17;3958:3;3945:17;;;;;;;;;;;:29;;;3938:36;;3860:118;;;:::o;1717:145:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1823:1:::1;1786:40;;1807:6;::::0;::::1;;;;;;;;1786:40;;;;;;;;;;;;1853:1;1836:6:::0;::::1;:19;;;;;;;;;;;;;;;;;;1717:145::o:0;3734:123:8:-;3795:18;3825:12;:17;3838:3;3825:17;;;;;;;;;;;:28;;;;;;;;;;;;3818:35;;3734:123;;;:::o;1894:1092::-;2044:7;2070:1;2065:6;;:3;:6;;2057:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2114:1;2106:5;:9;;;2098:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2178:1;2165:14;;:11;:14;;2157:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2239:1;2222:18;;:15;:18;;2214:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2305:5;2287:23;;:9;:14;2297:3;2287:14;;;;;;;;;;;;;;;;;;;;;:23;;;2279:33;;;;;;2472:17;;;;;;;;;;;:39;;;2512:15;2529:8;2547:10;2560:1;2563;2472:93;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2649:15;2613:12;:17;2626:3;2613:17;;;;;;;;;;;:33;;:51;;;;2694:5;2668:12;:17;2681:3;2668:17;;;;;;;;;;;:23;;;:31;;;;;;;;;;;;;;;;;;2735:11;2703:12;:17;2716:3;2703:17;;;;;;;;;;;:29;;:43;;;;2781:10;2750:12;:17;2763:3;2750:17;;;;;;;;;;;:28;;;:41;;;;;;;;;;;;;;;;;;2885:15;2847:12;:17;2860:3;2847:17;;;;;;;;;;;:35;;:53;;;;2921:4;2904:9;:14;2914:3;2904:14;;;;;;;;;;;;:21;;;;;;;;;;;;;;;;;;2951:15;2946:3;2935:32;;;;;;;;;;2979:3;2972:10;;1894:1092;;;;;;;;:::o;3981:144::-;4049:25;4086:12;:17;4099:3;4086:17;;;;;;;;;;;:35;;;4079:42;;3981:144;;;:::o;1085:85:0:-;1131:7;1157:6;;;;;;;;;;;1150:13;;1085:85;:::o;2991:586:8:-;3092:7;3119:1;3114:6;;:3;:6;;3106:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3173:4;3155:22;;:9;:14;3165:3;3155:14;;;;;;;;;;;;;;;;;;;;;:22;;;3147:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3231:1;3211:21;;:18;:21;;3203:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3282:23;3290:3;3294:10;3282:7;:23::i;:::-;3274:32;;;;;;3313:17;;;;;;;;;;;:39;;;3353:18;3373:8;3383:10;3395:1;3398;3313:87;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3451:18;3414:12;:17;3427:3;3414:17;;;;;;;;;;;:33;;:55;;;;3539:18;3534:3;3518:40;;;;;;;;;;3570:3;3563:10;;2991:586;;;;;:::o;4825:776::-;4908:1;4901:6;:8;4893:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4997:6;4951:5;;;;;;;;;;;:15;;;4967:10;4987:4;4951:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:52;;4943:127;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5117:6;5086:5;;;;;;;;;;;:15;;;5102:10;5086:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:37;;5078:111;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5198:23;5224:5;;;;;;;;;;;:18;;;5243:10;5263:4;5270:6;5224:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5198:79;;5293:18;5285:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5514:27;5534:6;5514:10;:15;5525:3;5514:15;;;;;;;;;;;;:19;;:27;;;;:::i;:::-;5496:10;:15;5507:3;5496:15;;;;;;;;;;;:45;;;;5585:10;5550:46;;5578:6;5573:3;5550:46;;;;;;;;;;4825:776;;;:::o;2011:240:0:-;1308:12;:10;:12::i;:::-;1297:23;;:7;:5;:7::i;:::-;:23;;;1289:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2119:1:::1;2099:22;;:8;:22;;;;2091:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2208:8;2179:38;;2200:6;::::0;::::1;;;;;;;;2179:38;;;;;;;;;;;;2236:8;2227:6;::::0;:17:::1;;;;;;;;;;;;;;;;;;2011:240:::0;:::o;598:104:6:-;651:15;685:10;678:17;;598:104;:::o;4614:129:8:-;4677:4;4707:12;:17;4720:3;4707:17;;;;;;;;;;;:28;;;;;;;;;;;;4698:37;;:5;:37;;;4691:44;;4614:129;;;;:::o;2690:175:2:-;2748:7;2767:9;2783:1;2779;:5;2767:17;;2807:1;2802;:6;;2794:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2857:1;2850:8;;;2690:175;;;;:::o", + "source": "pragma solidity >=0.6.0 <0.8.0;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC721/IERC721.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/access/Ownable.sol\";\nimport \"./DKGcontract.sol\";\n\n/*\n\nUAI/UALs essentially are:\n\n- DID/DID URLs native to the OriginTrail DKG\n- uniquely identify physical or digital assets (DID subjects)\n- have one or more \"owners\" (DID controllers)\n\nThe specification for UAI/UALs is currently WIP.\n\n*/\n\ncontract UAIRegistry is Ownable {\n\n\tenum AssetType{\n\t\tNative,\n\t\tERC721,\n\t\tERC1155\n\t}\n\n\tusing SafeMath for uint256;\n\tIERC20 token;\n\tDKGcontract AssertionRegistry;\n\taddress AssertionRegistryAddress;\n\n\tstruct AssetRecord{\n\t\tuint256 creationTimestamp;\n\t\tbytes32 alsoKnownAs; // alternative ID, as defined in DID-core spec, PoC address + tokenURI\n\t\tuint8 _type;\n\t\taddress controller; // tbd \n\t\tbytes32 stateCommitHash;\n\t}\n\n\tmapping(bytes32 => AssetRecord) public assetRecords;\n\tmapping(bytes32 => bool) public UAIstatus; \n\tmapping(bytes32 => uint256) public assetStake; \n\t\n\n\t// events\n\tevent UAIRegistryInit(address indexed assertionRegistryAddress);\n\tevent UAICreated(bytes32 indexed UAI, bytes32 indexed stateCommitHash);\n\tevent UAIUpdatedState(bytes32 indexed UAI, bytes32 indexed stateCommitHash );\n\tevent TokensDepositedToAsset(bytes32 indexed UAI, uint256 indexed amount, address indexed depositor);\n\n\tconstructor(address tokenAddress, address assertionRegistryAddress) public {\n\t\trequire(tokenAddress!=address(0));\n\t\trequire(assertionRegistryAddress!=address(0));\n\n\t\ttoken = IERC20(tokenAddress);\n\t\tAssertionRegistryAddress = assertionRegistryAddress;\n\t\tAssertionRegistry = DKGcontract(assertionRegistryAddress);\n\t\temit UAIRegistryInit(assertionRegistryAddress);\n\t}\n\n\tfunction registerAsset(bytes32 UAI, uint8 _type, bytes32 alsoKnownAs, bytes32 stateCommitHash, bytes32 rootHash, uint256 tokenAmount) public returns (bytes32){\n\n\t\trequire(UAI!=0, \"UAI cannot be zero\");\n\t\trequire(_type < 3, \"_type allowed values: 0,1,2 (WIP)\");\n\t\trequire(alsoKnownAs!=0, \"alsoKnownAs cannot be zero\");\n\t\trequire(stateCommitHash!=0, \"stateCommitHash cannot be zero\");\n\t\trequire(UAIstatus[UAI] == false ); // should not be possible to register existing asset again\n\n\t\t//bytes32 UAI = createUAI(_type,alsoKnownAs);\n\n\t\t// depositTokens(tokenAmount, UAI); // todo\n\n\t\tAssertionRegistry.createAssertionRecord(stateCommitHash, rootHash, address(msg.sender), 1, 1); // todo: update when DKGcontract is updated\n\t\tassetRecords[UAI].stateCommitHash = stateCommitHash;\n\t\tassetRecords[UAI]._type = _type;\n\t\tassetRecords[UAI].alsoKnownAs = alsoKnownAs;\n\t\tassetRecords[UAI].controller = msg.sender; // should update with AssetControllerProxy contract\n\t\tassetRecords[UAI].creationTimestamp = block.timestamp;\n\t\tUAIstatus[UAI] = true;\n\n\t\temit UAICreated(UAI, stateCommitHash);\n\n\t\treturn UAI;\n\t}\t\n\n\n\tfunction updateAssetState(bytes32 UAI, bytes32 newStateCommitHash, bytes32 rootHash) public returns (bytes32) {\n\n\t\trequire(UAI!=0, \"UAI cannot be zero\");\n\t\trequire(UAIstatus[UAI] == true, \"Asset must exist\" );\n\t\trequire(newStateCommitHash!=0, \"newStateCommitHash cannot be zero\");\n\t\trequire(isOwner(UAI,msg.sender));\n\t\t\n\t\tAssertionRegistry.createAssertionRecord(newStateCommitHash, rootHash, msg.sender, 1, 1); // UPDATE\n\t\tassetRecords[UAI].stateCommitHash = newStateCommitHash;\n\t\t// todo: store old commits somewhere\n\n\t\temit UAIUpdatedState(UAI, newStateCommitHash);\n\n\t\treturn UAI;\n\t}\n\n\n\t// getters\n\tfunction getAssetStateCommitHash(bytes32 UAI) public view returns(bytes32 stateCommitHash){\n\t\treturn assetRecords[UAI].stateCommitHash;\n\t}\n\n\tfunction getAssetController(bytes32 UAI) public view returns(address controller){\n\t\treturn assetRecords[UAI].controller;\n\t}\n\n\tfunction getAssetAKA(bytes32 UAI) public view returns(bytes32 alsoKnownAs){\n\t\treturn assetRecords[UAI].alsoKnownAs;\n\t}\n\n\tfunction getAssetCreationTimestamp(bytes32 UAI) public view returns(uint256 creationTimestamp){\n\t\treturn assetRecords[UAI].creationTimestamp;\n\t}\n\n\tfunction getAssertionRegistry() public view returns(address assertionRegistry){\n\t\treturn AssertionRegistryAddress;\n\t}\n\n\t// internal\n\n\n\t/**\n * @dev Should determine type of ``contractAddress``, if possible, returning enum AssetType\n */\n function determineType(address contractAddress, bytes32 id) internal returns (uint8){\n\t\treturn 0; // todo: implement detection of contract type\n\t}\n\n\t/**\n * @dev Returns bool checking if ``owner`` is controller of ``UAI``\n */\n function isOwner(bytes32 UAI, address owner) internal returns (bool) {\n \treturn owner == assetRecords[UAI].controller;\n }\n\n\t/**\n * @dev Deposits tokens in ``amount`` to specific ``UAI``\n */\n function depositTokens(uint256 amount, bytes32 UAI) public {\n\n \trequire(amount>0, \"Amount cannot be zero\");\n \trequire(token.allowance(msg.sender, address(this)) >= amount, \"Sender allowance must be equal to or higher than chosen amount\");\n \trequire(token.balanceOf(msg.sender) >= amount, \"Sender balance must be equal to or higher than chosen amount!\");\n\n \tbool transaction_result = token.transferFrom(msg.sender, address(this), amount);\n \trequire(transaction_result, \"Token transaction execution failed!\");\n\n\t\t// if (stake[msg.sender] == 0){\n\t\t// \tparticipant_indexes[msg.sender] = participants.length;\n\t\t// \tparticipants.push(msg.sender);\n\t\t// }\n\n\t\tassetStake[UAI] = assetStake[UAI].add(amount);\n\t\temit TokensDepositedToAsset(UAI, amount,msg.sender);\n\n\t}\t\n\n\n}", "sourcePath": "/Users/miloskotlar/dkg-onchain-module-v6/contracts/UAIRegistry.sol", "ast": { "absolutePath": "project:/contracts/UAIRegistry.sol", @@ -429,7 +429,7 @@ 815 ], "DKGcontract": [ - 1139 + 1138 ], "IERC1155": [ 598 @@ -450,14 +450,14 @@ 476 ], "UAIRegistry": [ - 1604 + 1610 ] }, - "id": 1605, + "id": 1611, "nodeType": "SourceUnit", "nodes": [ { - "id": 1141, + "id": 1140, "literals": [ "solidity", ">=", @@ -473,9 +473,9 @@ { "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", - "id": 1142, + "id": 1141, "nodeType": "ImportDirective", - "scope": 1605, + "scope": 1611, "sourceUnit": 677, "src": "33:64:8", "symbolAliases": [], @@ -484,9 +484,9 @@ { "absolutePath": "openzeppelin-solidity/contracts/token/ERC721/IERC721.sol", "file": "openzeppelin-solidity/contracts/token/ERC721/IERC721.sol", - "id": 1143, + "id": 1142, "nodeType": "ImportDirective", - "scope": 1605, + "scope": 1611, "sourceUnit": 793, "src": "98:66:8", "symbolAliases": [], @@ -495,9 +495,9 @@ { "absolutePath": "openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol", "file": "openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol", - "id": 1144, + "id": 1143, "nodeType": "ImportDirective", - "scope": 1605, + "scope": 1611, "sourceUnit": 599, "src": "165:68:8", "symbolAliases": [], @@ -506,9 +506,9 @@ { "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "id": 1145, + "id": 1144, "nodeType": "ImportDirective", - "scope": 1605, + "scope": 1611, "sourceUnit": 477, "src": "234:59:8", "symbolAliases": [], @@ -517,9 +517,9 @@ { "absolutePath": "openzeppelin-solidity/contracts/access/Ownable.sol", "file": "openzeppelin-solidity/contracts/access/Ownable.sol", - "id": 1146, + "id": 1145, "nodeType": "ImportDirective", - "scope": 1605, + "scope": 1611, "sourceUnit": 110, "src": "294:60:8", "symbolAliases": [], @@ -528,10 +528,10 @@ { "absolutePath": "project:/contracts/DKGcontract.sol", "file": "./DKGcontract.sol", - "id": 1147, + "id": 1146, "nodeType": "ImportDirective", - "scope": 1605, - "sourceUnit": 1140, + "scope": 1611, + "sourceUnit": 1139, "src": "355:27:8", "symbolAliases": [], "unitAlias": "" @@ -541,7 +541,7 @@ "baseContracts": [ { "baseName": { - "id": 1148, + "id": 1147, "name": "Ownable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 109, @@ -551,7 +551,7 @@ "typeString": "contract Ownable" } }, - "id": 1149, + "id": 1148, "nodeType": "InheritanceSpecifier", "src": "647:7:8" } @@ -562,9 +562,9 @@ ], "contractKind": "contract", "fullyImplemented": true, - "id": 1604, + "id": 1610, "linearizedBaseContracts": [ - 1604, + 1610, 109, 815 ], @@ -573,22 +573,22 @@ "nodes": [ { "canonicalName": "UAIRegistry.AssetType", - "id": 1153, + "id": 1152, "members": [ { - "id": 1150, + "id": 1149, "name": "Native", "nodeType": "EnumValue", "src": "677:6:8" }, { - "id": 1151, + "id": 1150, "name": "ERC721", "nodeType": "EnumValue", "src": "687:6:8" }, { - "id": 1152, + "id": 1151, "name": "ERC1155", "nodeType": "EnumValue", "src": "697:7:8" @@ -599,9 +599,9 @@ "src": "659:48:8" }, { - "id": 1156, + "id": 1155, "libraryName": { - "id": 1154, + "id": 1153, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 476, @@ -614,7 +614,7 @@ "nodeType": "UsingForDirective", "src": "710:27:8", "typeName": { - "id": 1155, + "id": 1154, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "729:7:8", @@ -626,11 +626,11 @@ }, { "constant": false, - "id": 1158, + "id": 1157, "mutability": "mutable", "name": "token", "nodeType": "VariableDeclaration", - "scope": 1604, + "scope": 1610, "src": "739:12:8", "stateVariable": true, "storageLocation": "default", @@ -639,7 +639,7 @@ "typeString": "contract IERC20" }, "typeName": { - "id": 1157, + "id": 1156, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 676, @@ -653,26 +653,26 @@ }, { "constant": false, - "id": 1160, + "id": 1159, "mutability": "mutable", "name": "AssertionRegistry", "nodeType": "VariableDeclaration", - "scope": 1604, + "scope": 1610, "src": "754:29:8", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_DKGcontract_$1139", + "typeIdentifier": "t_contract$_DKGcontract_$1138", "typeString": "contract DKGcontract" }, "typeName": { - "id": 1159, + "id": 1158, "name": "DKGcontract", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1139, + "referencedDeclaration": 1138, "src": "754:11:8", "typeDescriptions": { - "typeIdentifier": "t_contract$_DKGcontract_$1139", + "typeIdentifier": "t_contract$_DKGcontract_$1138", "typeString": "contract DKGcontract" } }, @@ -680,11 +680,11 @@ }, { "constant": false, - "id": 1162, + "id": 1161, "mutability": "mutable", "name": "AssertionRegistryAddress", "nodeType": "VariableDeclaration", - "scope": 1604, + "scope": 1610, "src": "786:32:8", "stateVariable": true, "storageLocation": "default", @@ -693,7 +693,7 @@ "typeString": "address" }, "typeName": { - "id": 1161, + "id": 1160, "name": "address", "nodeType": "ElementaryTypeName", "src": "786:7:8", @@ -707,15 +707,15 @@ }, { "canonicalName": "UAIRegistry.AssetRecord", - "id": 1173, + "id": 1172, "members": [ { "constant": false, - "id": 1164, + "id": 1163, "mutability": "mutable", "name": "creationTimestamp", "nodeType": "VariableDeclaration", - "scope": 1173, + "scope": 1172, "src": "844:25:8", "stateVariable": false, "storageLocation": "default", @@ -724,7 +724,7 @@ "typeString": "uint256" }, "typeName": { - "id": 1163, + "id": 1162, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "844:7:8", @@ -737,11 +737,11 @@ }, { "constant": false, - "id": 1166, + "id": 1165, "mutability": "mutable", "name": "alsoKnownAs", "nodeType": "VariableDeclaration", - "scope": 1173, + "scope": 1172, "src": "873:19:8", "stateVariable": false, "storageLocation": "default", @@ -750,7 +750,7 @@ "typeString": "bytes32" }, "typeName": { - "id": 1165, + "id": 1164, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "873:7:8", @@ -763,11 +763,11 @@ }, { "constant": false, - "id": 1168, + "id": 1167, "mutability": "mutable", "name": "_type", "nodeType": "VariableDeclaration", - "scope": 1173, + "scope": 1172, "src": "967:11:8", "stateVariable": false, "storageLocation": "default", @@ -776,7 +776,7 @@ "typeString": "uint8" }, "typeName": { - "id": 1167, + "id": 1166, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "967:5:8", @@ -789,11 +789,11 @@ }, { "constant": false, - "id": 1170, + "id": 1169, "mutability": "mutable", "name": "controller", "nodeType": "VariableDeclaration", - "scope": 1173, + "scope": 1172, "src": "982:18:8", "stateVariable": false, "storageLocation": "default", @@ -802,7 +802,7 @@ "typeString": "address" }, "typeName": { - "id": 1169, + "id": 1168, "name": "address", "nodeType": "ElementaryTypeName", "src": "982:7:8", @@ -816,11 +816,11 @@ }, { "constant": false, - "id": 1172, + "id": 1171, "mutability": "mutable", "name": "stateCommitHash", "nodeType": "VariableDeclaration", - "scope": 1173, + "scope": 1172, "src": "1012:23:8", "stateVariable": false, "storageLocation": "default", @@ -829,7 +829,7 @@ "typeString": "bytes32" }, "typeName": { - "id": 1171, + "id": 1170, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1012:7:8", @@ -843,29 +843,29 @@ ], "name": "AssetRecord", "nodeType": "StructDefinition", - "scope": 1604, + "scope": 1610, "src": "822:217:8", "visibility": "public" }, { "constant": false, "functionSelector": "09600fa6", - "id": 1177, + "id": 1176, "mutability": "mutable", "name": "assetRecords", "nodeType": "VariableDeclaration", - "scope": 1604, + "scope": 1610, "src": "1042:51:8", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord)" }, "typeName": { - "id": 1176, + "id": 1175, "keyType": { - "id": 1174, + "id": 1173, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1050:7:8", @@ -877,17 +877,17 @@ "nodeType": "Mapping", "src": "1042:31:8", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord)" }, "valueType": { - "id": 1175, + "id": 1174, "name": "AssetRecord", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1173, + "referencedDeclaration": 1172, "src": "1061:11:8", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetRecord_$1173_storage_ptr", + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage_ptr", "typeString": "struct UAIRegistry.AssetRecord" } } @@ -897,11 +897,11 @@ { "constant": false, "functionSelector": "09added7", - "id": 1181, + "id": 1180, "mutability": "mutable", "name": "UAIstatus", "nodeType": "VariableDeclaration", - "scope": 1604, + "scope": 1610, "src": "1096:41:8", "stateVariable": true, "storageLocation": "default", @@ -910,9 +910,9 @@ "typeString": "mapping(bytes32 => bool)" }, "typeName": { - "id": 1180, + "id": 1179, "keyType": { - "id": 1178, + "id": 1177, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1104:7:8", @@ -928,7 +928,7 @@ "typeString": "mapping(bytes32 => bool)" }, "valueType": { - "id": 1179, + "id": 1178, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1115:4:8", @@ -943,11 +943,11 @@ { "constant": false, "functionSelector": "34e5197b", - "id": 1185, + "id": 1184, "mutability": "mutable", "name": "assetStake", "nodeType": "VariableDeclaration", - "scope": 1604, + "scope": 1610, "src": "1141:45:8", "stateVariable": true, "storageLocation": "default", @@ -956,9 +956,9 @@ "typeString": "mapping(bytes32 => uint256)" }, "typeName": { - "id": 1184, + "id": 1183, "keyType": { - "id": 1182, + "id": 1181, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1149:7:8", @@ -974,7 +974,7 @@ "typeString": "mapping(bytes32 => uint256)" }, "valueType": { - "id": 1183, + "id": 1182, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1160:7:8", @@ -988,21 +988,21 @@ }, { "anonymous": false, - "id": 1189, + "id": 1188, "name": "UAIRegistryInit", "nodeType": "EventDefinition", "parameters": { - "id": 1188, + "id": 1187, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1187, + "id": 1186, "indexed": true, "mutability": "mutable", "name": "assertionRegistryAddress", "nodeType": "VariableDeclaration", - "scope": 1189, + "scope": 1188, "src": "1226:40:8", "stateVariable": false, "storageLocation": "default", @@ -1011,7 +1011,7 @@ "typeString": "address" }, "typeName": { - "id": 1186, + "id": 1185, "name": "address", "nodeType": "ElementaryTypeName", "src": "1226:7:8", @@ -1030,21 +1030,21 @@ }, { "anonymous": false, - "id": 1195, + "id": 1194, "name": "UAICreated", "nodeType": "EventDefinition", "parameters": { - "id": 1194, + "id": 1193, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1191, + "id": 1190, "indexed": true, "mutability": "mutable", "name": "UAI", "nodeType": "VariableDeclaration", - "scope": 1195, + "scope": 1194, "src": "1287:19:8", "stateVariable": false, "storageLocation": "default", @@ -1053,7 +1053,7 @@ "typeString": "bytes32" }, "typeName": { - "id": 1190, + "id": 1189, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1287:7:8", @@ -1066,12 +1066,12 @@ }, { "constant": false, - "id": 1193, + "id": 1192, "indexed": true, "mutability": "mutable", "name": "stateCommitHash", "nodeType": "VariableDeclaration", - "scope": 1195, + "scope": 1194, "src": "1308:31:8", "stateVariable": false, "storageLocation": "default", @@ -1080,7 +1080,7 @@ "typeString": "bytes32" }, "typeName": { - "id": 1192, + "id": 1191, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1308:7:8", @@ -1098,21 +1098,21 @@ }, { "anonymous": false, - "id": 1201, + "id": 1200, "name": "UAIUpdatedState", "nodeType": "EventDefinition", "parameters": { - "id": 1200, + "id": 1199, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1197, + "id": 1196, "indexed": true, "mutability": "mutable", "name": "UAI", "nodeType": "VariableDeclaration", - "scope": 1201, + "scope": 1200, "src": "1365:19:8", "stateVariable": false, "storageLocation": "default", @@ -1121,7 +1121,7 @@ "typeString": "bytes32" }, "typeName": { - "id": 1196, + "id": 1195, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1365:7:8", @@ -1134,12 +1134,12 @@ }, { "constant": false, - "id": 1199, + "id": 1198, "indexed": true, "mutability": "mutable", "name": "stateCommitHash", "nodeType": "VariableDeclaration", - "scope": 1201, + "scope": 1200, "src": "1386:31:8", "stateVariable": false, "storageLocation": "default", @@ -1148,7 +1148,7 @@ "typeString": "bytes32" }, "typeName": { - "id": 1198, + "id": 1197, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1386:7:8", @@ -1166,21 +1166,21 @@ }, { "anonymous": false, - "id": 1209, + "id": 1208, "name": "TokensDepositedToAsset", "nodeType": "EventDefinition", "parameters": { - "id": 1208, + "id": 1207, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1203, + "id": 1202, "indexed": true, "mutability": "mutable", "name": "UAI", "nodeType": "VariableDeclaration", - "scope": 1209, + "scope": 1208, "src": "1451:19:8", "stateVariable": false, "storageLocation": "default", @@ -1189,7 +1189,7 @@ "typeString": "bytes32" }, "typeName": { - "id": 1202, + "id": 1201, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1451:7:8", @@ -1202,12 +1202,12 @@ }, { "constant": false, - "id": 1205, + "id": 1204, "indexed": true, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", - "scope": 1209, + "scope": 1208, "src": "1472:22:8", "stateVariable": false, "storageLocation": "default", @@ -1216,7 +1216,7 @@ "typeString": "uint256" }, "typeName": { - "id": 1204, + "id": 1203, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1472:7:8", @@ -1229,12 +1229,12 @@ }, { "constant": false, - "id": 1207, + "id": 1206, "indexed": true, "mutability": "mutable", "name": "depositor", "nodeType": "VariableDeclaration", - "scope": 1209, + "scope": 1208, "src": "1496:25:8", "stateVariable": false, "storageLocation": "default", @@ -1243,7 +1243,7 @@ "typeString": "address" }, "typeName": { - "id": 1206, + "id": 1205, "name": "address", "nodeType": "ElementaryTypeName", "src": "1496:7:8", @@ -1262,7 +1262,7 @@ }, { "body": { - "id": 1254, + "id": 1253, "nodeType": "Block", "src": "1602:289:8", "statements": [ @@ -1274,17 +1274,17 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 1222, + "id": 1221, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 1217, + "id": 1216, "name": "tokenAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1211, + "referencedDeclaration": 1210, "src": "1614:12:8", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1297,7 +1297,7 @@ "arguments": [ { "hexValue": "30", - "id": 1220, + "id": 1219, "isConstant": false, "isLValue": false, "isPure": true, @@ -1319,7 +1319,7 @@ "typeString": "int_const 0" } ], - "id": 1219, + "id": 1218, "isConstant": false, "isLValue": false, "isPure": true, @@ -1331,14 +1331,14 @@ "typeString": "type(address)" }, "typeName": { - "id": 1218, + "id": 1217, "name": "address", "nodeType": "ElementaryTypeName", "src": "1628:7:8", "typeDescriptions": {} } }, - "id": 1221, + "id": 1220, "isConstant": false, "isLValue": false, "isPure": true, @@ -1367,7 +1367,7 @@ "typeString": "bool" } ], - "id": 1216, + "id": 1215, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -1381,7 +1381,7 @@ "typeString": "function (bool) pure" } }, - "id": 1223, + "id": 1222, "isConstant": false, "isLValue": false, "isPure": false, @@ -1396,7 +1396,7 @@ "typeString": "tuple()" } }, - "id": 1224, + "id": 1223, "nodeType": "ExpressionStatement", "src": "1606:33:8" }, @@ -1408,17 +1408,17 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 1231, + "id": 1230, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 1226, + "id": 1225, "name": "assertionRegistryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1213, + "referencedDeclaration": 1212, "src": "1651:24:8", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1431,7 +1431,7 @@ "arguments": [ { "hexValue": "30", - "id": 1229, + "id": 1228, "isConstant": false, "isLValue": false, "isPure": true, @@ -1453,7 +1453,7 @@ "typeString": "int_const 0" } ], - "id": 1228, + "id": 1227, "isConstant": false, "isLValue": false, "isPure": true, @@ -1465,14 +1465,14 @@ "typeString": "type(address)" }, "typeName": { - "id": 1227, + "id": 1226, "name": "address", "nodeType": "ElementaryTypeName", "src": "1677:7:8", "typeDescriptions": {} } }, - "id": 1230, + "id": 1229, "isConstant": false, "isLValue": false, "isPure": true, @@ -1501,7 +1501,7 @@ "typeString": "bool" } ], - "id": 1225, + "id": 1224, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -1515,7 +1515,7 @@ "typeString": "function (bool) pure" } }, - "id": 1232, + "id": 1231, "isConstant": false, "isLValue": false, "isPure": false, @@ -1530,23 +1530,23 @@ "typeString": "tuple()" } }, - "id": 1233, + "id": 1232, "nodeType": "ExpressionStatement", "src": "1643:45:8" }, { "expression": { - "id": 1238, + "id": 1237, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 1234, + "id": 1233, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1158, + "referencedDeclaration": 1157, "src": "1693:5:8", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$676", @@ -1558,11 +1558,11 @@ "rightHandSide": { "arguments": [ { - "id": 1236, + "id": 1235, "name": "tokenAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1211, + "referencedDeclaration": 1210, "src": "1708:12:8", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1577,7 +1577,7 @@ "typeString": "address" } ], - "id": 1235, + "id": 1234, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], @@ -1588,7 +1588,7 @@ "typeString": "type(contract IERC20)" } }, - "id": 1237, + "id": 1236, "isConstant": false, "isLValue": false, "isPure": false, @@ -1609,23 +1609,23 @@ "typeString": "contract IERC20" } }, - "id": 1239, + "id": 1238, "nodeType": "ExpressionStatement", "src": "1693:28:8" }, { "expression": { - "id": 1242, + "id": 1241, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 1240, + "id": 1239, "name": "AssertionRegistryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1162, + "referencedDeclaration": 1161, "src": "1725:24:8", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1635,11 +1635,11 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 1241, + "id": 1240, "name": "assertionRegistryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1213, + "referencedDeclaration": 1212, "src": "1752:24:8", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1652,26 +1652,26 @@ "typeString": "address" } }, - "id": 1243, + "id": 1242, "nodeType": "ExpressionStatement", "src": "1725:51:8" }, { "expression": { - "id": 1248, + "id": 1247, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "id": 1244, + "id": 1243, "name": "AssertionRegistry", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1160, + "referencedDeclaration": 1159, "src": "1780:17:8", "typeDescriptions": { - "typeIdentifier": "t_contract$_DKGcontract_$1139", + "typeIdentifier": "t_contract$_DKGcontract_$1138", "typeString": "contract DKGcontract" } }, @@ -1680,11 +1680,11 @@ "rightHandSide": { "arguments": [ { - "id": 1246, + "id": 1245, "name": "assertionRegistryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1213, + "referencedDeclaration": 1212, "src": "1812:24:8", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1699,18 +1699,18 @@ "typeString": "address" } ], - "id": 1245, + "id": 1244, "name": "DKGcontract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1139, + "referencedDeclaration": 1138, "src": "1800:11:8", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_DKGcontract_$1139_$", + "typeIdentifier": "t_type$_t_contract$_DKGcontract_$1138_$", "typeString": "type(contract DKGcontract)" } }, - "id": 1247, + "id": 1246, "isConstant": false, "isLValue": false, "isPure": false, @@ -1721,17 +1721,17 @@ "src": "1800:37:8", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_DKGcontract_$1139", + "typeIdentifier": "t_contract$_DKGcontract_$1138", "typeString": "contract DKGcontract" } }, "src": "1780:57:8", "typeDescriptions": { - "typeIdentifier": "t_contract$_DKGcontract_$1139", + "typeIdentifier": "t_contract$_DKGcontract_$1138", "typeString": "contract DKGcontract" } }, - "id": 1249, + "id": 1248, "nodeType": "ExpressionStatement", "src": "1780:57:8" }, @@ -1739,11 +1739,11 @@ "eventCall": { "arguments": [ { - "id": 1251, + "id": 1250, "name": "assertionRegistryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1213, + "referencedDeclaration": 1212, "src": "1862:24:8", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1758,18 +1758,18 @@ "typeString": "address" } ], - "id": 1250, + "id": 1249, "name": "UAIRegistryInit", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1189, + "referencedDeclaration": 1188, "src": "1846:15:8", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", "typeString": "function (address)" } }, - "id": 1252, + "id": 1251, "isConstant": false, "isLValue": false, "isPure": false, @@ -1784,29 +1784,29 @@ "typeString": "tuple()" } }, - "id": 1253, + "id": 1252, "nodeType": "EmitStatement", "src": "1841:46:8" } ] }, - "id": 1255, + "id": 1254, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 1214, + "id": 1213, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1211, + "id": 1210, "mutability": "mutable", "name": "tokenAddress", "nodeType": "VariableDeclaration", - "scope": 1255, + "scope": 1254, "src": "1538:20:8", "stateVariable": false, "storageLocation": "default", @@ -1815,7 +1815,7 @@ "typeString": "address" }, "typeName": { - "id": 1210, + "id": 1209, "name": "address", "nodeType": "ElementaryTypeName", "src": "1538:7:8", @@ -1829,11 +1829,11 @@ }, { "constant": false, - "id": 1213, + "id": 1212, "mutability": "mutable", "name": "assertionRegistryAddress", "nodeType": "VariableDeclaration", - "scope": 1255, + "scope": 1254, "src": "1560:32:8", "stateVariable": false, "storageLocation": "default", @@ -1842,7 +1842,7 @@ "typeString": "address" }, "typeName": { - "id": 1212, + "id": 1211, "name": "address", "nodeType": "ElementaryTypeName", "src": "1560:7:8", @@ -1858,12 +1858,12 @@ "src": "1537:56:8" }, "returnParameters": { - "id": 1215, + "id": 1214, "nodeType": "ParameterList", "parameters": [], "src": "1602:0:8" }, - "scope": 1604, + "scope": 1610, "src": "1526:365:8", "stateMutability": "nonpayable", "virtual": false, @@ -1871,9 +1871,9 @@ }, { "body": { - "id": 1367, + "id": 1371, "nodeType": "Block", - "src": "2052:913:8", + "src": "2052:934:8", "statements": [ { "expression": { @@ -1883,17 +1883,17 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 1275, + "id": 1274, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 1273, + "id": 1272, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1257, + "referencedDeclaration": 1256, "src": "2065:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", @@ -1904,7 +1904,7 @@ "operator": "!=", "rightExpression": { "hexValue": "30", - "id": 1274, + "id": 1273, "isConstant": false, "isLValue": false, "isPure": true, @@ -1926,7 +1926,7 @@ }, { "hexValue": "5541492063616e6e6f74206265207a65726f", - "id": 1276, + "id": 1275, "isConstant": false, "isLValue": false, "isPure": true, @@ -1952,7 +1952,7 @@ "typeString": "literal_string \"UAI cannot be zero\"" } ], - "id": 1272, + "id": 1271, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -1966,7 +1966,7 @@ "typeString": "function (bool,string memory) pure" } }, - "id": 1277, + "id": 1276, "isConstant": false, "isLValue": false, "isPure": false, @@ -1981,7 +1981,7 @@ "typeString": "tuple()" } }, - "id": 1278, + "id": 1277, "nodeType": "ExpressionStatement", "src": "2057:37:8" }, @@ -1993,17 +1993,17 @@ "typeIdentifier": "t_uint8", "typeString": "uint8" }, - "id": 1282, + "id": 1281, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 1280, + "id": 1279, "name": "_type", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1259, + "referencedDeclaration": 1258, "src": "2106:5:8", "typeDescriptions": { "typeIdentifier": "t_uint8", @@ -2014,7 +2014,7 @@ "operator": "<", "rightExpression": { "hexValue": "33", - "id": 1281, + "id": 1280, "isConstant": false, "isLValue": false, "isPure": true, @@ -2036,7 +2036,7 @@ }, { "hexValue": "5f7479706520616c6c6f7765642076616c7565733a20302c312c32202857495029", - "id": 1283, + "id": 1282, "isConstant": false, "isLValue": false, "isPure": true, @@ -2062,7 +2062,7 @@ "typeString": "literal_string \"_type allowed values: 0,1,2 (WIP)\"" } ], - "id": 1279, + "id": 1278, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -2076,7 +2076,7 @@ "typeString": "function (bool,string memory) pure" } }, - "id": 1284, + "id": 1283, "isConstant": false, "isLValue": false, "isPure": false, @@ -2091,7 +2091,7 @@ "typeString": "tuple()" } }, - "id": 1285, + "id": 1284, "nodeType": "ExpressionStatement", "src": "2098:55:8" }, @@ -2103,17 +2103,17 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 1289, + "id": 1288, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 1287, + "id": 1286, "name": "alsoKnownAs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1261, + "referencedDeclaration": 1260, "src": "2165:11:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", @@ -2124,7 +2124,7 @@ "operator": "!=", "rightExpression": { "hexValue": "30", - "id": 1288, + "id": 1287, "isConstant": false, "isLValue": false, "isPure": true, @@ -2146,7 +2146,7 @@ }, { "hexValue": "616c736f4b6e6f776e41732063616e6e6f74206265207a65726f", - "id": 1290, + "id": 1289, "isConstant": false, "isLValue": false, "isPure": true, @@ -2172,7 +2172,7 @@ "typeString": "literal_string \"alsoKnownAs cannot be zero\"" } ], - "id": 1286, + "id": 1285, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -2186,7 +2186,7 @@ "typeString": "function (bool,string memory) pure" } }, - "id": 1291, + "id": 1290, "isConstant": false, "isLValue": false, "isPure": false, @@ -2201,7 +2201,7 @@ "typeString": "tuple()" } }, - "id": 1292, + "id": 1291, "nodeType": "ExpressionStatement", "src": "2157:53:8" }, @@ -2213,17 +2213,17 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 1296, + "id": 1295, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 1294, + "id": 1293, "name": "stateCommitHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1263, + "referencedDeclaration": 1262, "src": "2222:15:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", @@ -2234,7 +2234,7 @@ "operator": "!=", "rightExpression": { "hexValue": "30", - "id": 1295, + "id": 1294, "isConstant": false, "isLValue": false, "isPure": true, @@ -2256,7 +2256,7 @@ }, { "hexValue": "7374617465436f6d6d6974486173682063616e6e6f74206265207a65726f", - "id": 1297, + "id": 1296, "isConstant": false, "isLValue": false, "isPure": true, @@ -2282,7 +2282,7 @@ "typeString": "literal_string \"stateCommitHash cannot be zero\"" } ], - "id": 1293, + "id": 1292, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -2296,7 +2296,7 @@ "typeString": "function (bool,string memory) pure" } }, - "id": 1298, + "id": 1297, "isConstant": false, "isLValue": false, "isPure": false, @@ -2311,7 +2311,7 @@ "typeString": "tuple()" } }, - "id": 1299, + "id": 1298, "nodeType": "ExpressionStatement", "src": "2214:61:8" }, @@ -2323,31 +2323,31 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 1305, + "id": 1304, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "baseExpression": { - "id": 1301, + "id": 1300, "name": "UAIstatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1181, + "referencedDeclaration": 1180, "src": "2287:9:8", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1303, + "id": 1302, "indexExpression": { - "id": 1302, + "id": 1301, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1257, + "referencedDeclaration": 1256, "src": "2297:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", @@ -2369,7 +2369,7 @@ "operator": "==", "rightExpression": { "hexValue": "66616c7365", - "id": 1304, + "id": 1303, "isConstant": false, "isLValue": false, "isPure": true, @@ -2397,7 +2397,7 @@ "typeString": "bool" } ], - "id": 1300, + "id": 1299, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -2411,7 +2411,7 @@ "typeString": "function (bool) pure" } }, - "id": 1306, + "id": 1305, "isConstant": false, "isLValue": false, "isPure": false, @@ -2426,7 +2426,7 @@ "typeString": "tuple()" } }, - "id": 1307, + "id": 1306, "nodeType": "ExpressionStatement", "src": "2279:33:8" }, @@ -2434,11 +2434,11 @@ "expression": { "arguments": [ { - "id": 1311, + "id": 1310, "name": "stateCommitHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1263, + "referencedDeclaration": 1262, "src": "2512:15:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", @@ -2446,27 +2446,97 @@ } }, { - "id": 1312, + "id": 1311, "name": "rootHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1265, + "referencedDeclaration": 1264, "src": "2529:8:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, + { + "arguments": [ + { + "expression": { + "id": 1314, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "2547:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2547:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2539:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1312, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2539:7:8", + "typeDescriptions": {} + } + }, + "id": 1316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2539:19:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, { "hexValue": "31", - "id": 1313, + "id": 1317, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2539:1:8", + "src": "2560:1:8", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" @@ -2475,14 +2545,14 @@ }, { "hexValue": "31", - "id": 1314, + "id": 1318, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2542:1:8", + "src": "2563:1:8", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" @@ -2500,6 +2570,10 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" @@ -2510,32 +2584,32 @@ } ], "expression": { - "id": 1308, + "id": 1307, "name": "AssertionRegistry", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1160, + "referencedDeclaration": 1159, "src": "2472:17:8", "typeDescriptions": { - "typeIdentifier": "t_contract$_DKGcontract_$1139", + "typeIdentifier": "t_contract$_DKGcontract_$1138", "typeString": "contract DKGcontract" } }, - "id": 1310, + "id": 1309, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "createAssertionRecord", "nodeType": "MemberAccess", - "referencedDeclaration": 1016, + "referencedDeclaration": 1015, "src": "2472:39:8", "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (bytes32,bytes32,uint256,uint256) external" + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes32_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,bytes32,address,uint256,uint256) external" } }, - "id": 1315, + "id": 1319, "isConstant": false, "isLValue": false, "isPure": false, @@ -2543,20 +2617,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2472:72:8", + "src": "2472:93:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1316, + "id": 1320, "nodeType": "ExpressionStatement", - "src": "2472:72:8" + "src": "2472:93:8" }, { "expression": { - "id": 1322, + "id": 1326, "isConstant": false, "isLValue": false, "isPure": false, @@ -2564,25 +2638,25 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 1317, + "id": 1321, "name": "assetRecords", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1177, - "src": "2592:12:8", + "referencedDeclaration": 1176, + "src": "2613:12:8", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" } }, - "id": 1319, + "id": 1323, "indexExpression": { - "id": 1318, + "id": 1322, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1257, - "src": "2605:3:8", + "referencedDeclaration": 1256, + "src": "2626:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2593,21 +2667,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2592:17:8", + "src": "2613:17:8", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", "typeString": "struct UAIRegistry.AssetRecord storage ref" } }, - "id": 1320, + "id": 1324, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "stateCommitHash", "nodeType": "MemberAccess", - "referencedDeclaration": 1172, - "src": "2592:33:8", + "referencedDeclaration": 1171, + "src": "2613:33:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2616,30 +2690,30 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 1321, + "id": 1325, "name": "stateCommitHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1263, - "src": "2628:15:8", + "referencedDeclaration": 1262, + "src": "2649:15:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "src": "2592:51:8", + "src": "2613:51:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "id": 1323, + "id": 1327, "nodeType": "ExpressionStatement", - "src": "2592:51:8" + "src": "2613:51:8" }, { "expression": { - "id": 1329, + "id": 1333, "isConstant": false, "isLValue": false, "isPure": false, @@ -2647,25 +2721,25 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 1324, + "id": 1328, "name": "assetRecords", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1177, - "src": "2647:12:8", + "referencedDeclaration": 1176, + "src": "2668:12:8", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" } }, - "id": 1326, + "id": 1330, "indexExpression": { - "id": 1325, + "id": 1329, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1257, - "src": "2660:3:8", + "referencedDeclaration": 1256, + "src": "2681:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2676,21 +2750,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2647:17:8", + "src": "2668:17:8", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", "typeString": "struct UAIRegistry.AssetRecord storage ref" } }, - "id": 1327, + "id": 1331, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "_type", "nodeType": "MemberAccess", - "referencedDeclaration": 1168, - "src": "2647:23:8", + "referencedDeclaration": 1167, + "src": "2668:23:8", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -2699,30 +2773,30 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 1328, + "id": 1332, "name": "_type", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1259, - "src": "2673:5:8", + "referencedDeclaration": 1258, + "src": "2694:5:8", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "src": "2647:31:8", + "src": "2668:31:8", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "id": 1330, + "id": 1334, "nodeType": "ExpressionStatement", - "src": "2647:31:8" + "src": "2668:31:8" }, { "expression": { - "id": 1336, + "id": 1340, "isConstant": false, "isLValue": false, "isPure": false, @@ -2730,25 +2804,25 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 1331, + "id": 1335, "name": "assetRecords", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1177, - "src": "2682:12:8", + "referencedDeclaration": 1176, + "src": "2703:12:8", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" } }, - "id": 1333, + "id": 1337, "indexExpression": { - "id": 1332, + "id": 1336, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1257, - "src": "2695:3:8", + "referencedDeclaration": 1256, + "src": "2716:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2759,21 +2833,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2682:17:8", + "src": "2703:17:8", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", "typeString": "struct UAIRegistry.AssetRecord storage ref" } }, - "id": 1334, + "id": 1338, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "alsoKnownAs", "nodeType": "MemberAccess", - "referencedDeclaration": 1166, - "src": "2682:29:8", + "referencedDeclaration": 1165, + "src": "2703:29:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2782,30 +2856,30 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 1335, + "id": 1339, "name": "alsoKnownAs", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1261, - "src": "2714:11:8", + "referencedDeclaration": 1260, + "src": "2735:11:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "src": "2682:43:8", + "src": "2703:43:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "id": 1337, + "id": 1341, "nodeType": "ExpressionStatement", - "src": "2682:43:8" + "src": "2703:43:8" }, { "expression": { - "id": 1344, + "id": 1348, "isConstant": false, "isLValue": false, "isPure": false, @@ -2813,25 +2887,25 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 1338, + "id": 1342, "name": "assetRecords", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1177, - "src": "2729:12:8", + "referencedDeclaration": 1176, + "src": "2750:12:8", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" } }, - "id": 1340, + "id": 1344, "indexExpression": { - "id": 1339, + "id": 1343, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1257, - "src": "2742:3:8", + "referencedDeclaration": 1256, + "src": "2763:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2842,21 +2916,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2729:17:8", + "src": "2750:17:8", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", "typeString": "struct UAIRegistry.AssetRecord storage ref" } }, - "id": 1341, + "id": 1345, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "controller", "nodeType": "MemberAccess", - "referencedDeclaration": 1170, - "src": "2729:28:8", + "referencedDeclaration": 1169, + "src": "2750:28:8", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2866,43 +2940,43 @@ "operator": "=", "rightHandSide": { "expression": { - "id": 1342, + "id": 1346, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967281, - "src": "2760:3:8", + "src": "2781:3:8", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 1343, + "id": 1347, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "src": "2760:10:8", + "src": "2781:10:8", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "src": "2729:41:8", + "src": "2750:41:8", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 1345, + "id": 1349, "nodeType": "ExpressionStatement", - "src": "2729:41:8" + "src": "2750:41:8" }, { "expression": { - "id": 1352, + "id": 1356, "isConstant": false, "isLValue": false, "isPure": false, @@ -2910,25 +2984,25 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 1346, + "id": 1350, "name": "assetRecords", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1177, - "src": "2826:12:8", + "referencedDeclaration": 1176, + "src": "2847:12:8", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" } }, - "id": 1348, + "id": 1352, "indexExpression": { - "id": 1347, + "id": 1351, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1257, - "src": "2839:3:8", + "referencedDeclaration": 1256, + "src": "2860:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -2939,21 +3013,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2826:17:8", + "src": "2847:17:8", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", "typeString": "struct UAIRegistry.AssetRecord storage ref" } }, - "id": 1349, + "id": 1353, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "creationTimestamp", "nodeType": "MemberAccess", - "referencedDeclaration": 1164, - "src": "2826:35:8", + "referencedDeclaration": 1163, + "src": "2847:35:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2963,68 +3037,68 @@ "operator": "=", "rightHandSide": { "expression": { - "id": 1350, + "id": 1354, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967292, - "src": "2864:5:8", + "src": "2885:5:8", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 1351, + "id": 1355, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "src": "2864:15:8", + "src": "2885:15:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "2826:53:8", + "src": "2847:53:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 1353, + "id": 1357, "nodeType": "ExpressionStatement", - "src": "2826:53:8" + "src": "2847:53:8" }, { "expression": { - "id": 1358, + "id": 1362, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "baseExpression": { - "id": 1354, + "id": 1358, "name": "UAIstatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1181, - "src": "2883:9:8", + "referencedDeclaration": 1180, + "src": "2904:9:8", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1356, + "id": 1360, "indexExpression": { - "id": 1355, + "id": 1359, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1257, - "src": "2893:3:8", + "referencedDeclaration": 1256, + "src": "2914:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3035,7 +3109,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "2883:14:8", + "src": "2904:14:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3045,52 +3119,52 @@ "operator": "=", "rightHandSide": { "hexValue": "74727565", - "id": 1357, + "id": 1361, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "2900:4:8", + "src": "2921:4:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, - "src": "2883:21:8", + "src": "2904:21:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1359, + "id": 1363, "nodeType": "ExpressionStatement", - "src": "2883:21:8" + "src": "2904:21:8" }, { "eventCall": { "arguments": [ { - "id": 1361, + "id": 1365, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1257, - "src": "2925:3:8", + "referencedDeclaration": 1256, + "src": "2946:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "id": 1362, + "id": 1366, "name": "stateCommitHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1263, - "src": "2930:15:8", + "referencedDeclaration": 1262, + "src": "2951:15:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3108,18 +3182,18 @@ "typeString": "bytes32" } ], - "id": 1360, + "id": 1364, "name": "UAICreated", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1195, - "src": "2914:10:8", + "referencedDeclaration": 1194, + "src": "2935:10:8", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", "typeString": "function (bytes32,bytes32)" } }, - "id": 1363, + "id": 1367, "isConstant": false, "isLValue": false, "isPure": false, @@ -3127,55 +3201,55 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2914:32:8", + "src": "2935:32:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1364, + "id": 1368, "nodeType": "EmitStatement", - "src": "2909:37:8" + "src": "2930:37:8" }, { "expression": { - "id": 1365, + "id": 1369, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1257, - "src": "2958:3:8", + "referencedDeclaration": 1256, + "src": "2979:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "functionReturnParameters": 1271, - "id": 1366, + "functionReturnParameters": 1270, + "id": 1370, "nodeType": "Return", - "src": "2951:10:8" + "src": "2972:10:8" } ] }, "functionSelector": "78e98392", - "id": 1368, + "id": 1372, "implemented": true, "kind": "function", "modifiers": [], "name": "registerAsset", "nodeType": "FunctionDefinition", "parameters": { - "id": 1268, + "id": 1267, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1257, + "id": 1256, "mutability": "mutable", "name": "UAI", "nodeType": "VariableDeclaration", - "scope": 1368, + "scope": 1372, "src": "1917:11:8", "stateVariable": false, "storageLocation": "default", @@ -3184,7 +3258,7 @@ "typeString": "bytes32" }, "typeName": { - "id": 1256, + "id": 1255, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1917:7:8", @@ -3197,11 +3271,11 @@ }, { "constant": false, - "id": 1259, + "id": 1258, "mutability": "mutable", "name": "_type", "nodeType": "VariableDeclaration", - "scope": 1368, + "scope": 1372, "src": "1930:11:8", "stateVariable": false, "storageLocation": "default", @@ -3210,7 +3284,7 @@ "typeString": "uint8" }, "typeName": { - "id": 1258, + "id": 1257, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "1930:5:8", @@ -3223,11 +3297,11 @@ }, { "constant": false, - "id": 1261, + "id": 1260, "mutability": "mutable", "name": "alsoKnownAs", "nodeType": "VariableDeclaration", - "scope": 1368, + "scope": 1372, "src": "1943:19:8", "stateVariable": false, "storageLocation": "default", @@ -3236,7 +3310,7 @@ "typeString": "bytes32" }, "typeName": { - "id": 1260, + "id": 1259, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1943:7:8", @@ -3249,11 +3323,11 @@ }, { "constant": false, - "id": 1263, + "id": 1262, "mutability": "mutable", "name": "stateCommitHash", "nodeType": "VariableDeclaration", - "scope": 1368, + "scope": 1372, "src": "1964:23:8", "stateVariable": false, "storageLocation": "default", @@ -3262,7 +3336,7 @@ "typeString": "bytes32" }, "typeName": { - "id": 1262, + "id": 1261, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1964:7:8", @@ -3275,11 +3349,11 @@ }, { "constant": false, - "id": 1265, + "id": 1264, "mutability": "mutable", "name": "rootHash", "nodeType": "VariableDeclaration", - "scope": 1368, + "scope": 1372, "src": "1989:16:8", "stateVariable": false, "storageLocation": "default", @@ -3288,7 +3362,7 @@ "typeString": "bytes32" }, "typeName": { - "id": 1264, + "id": 1263, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1989:7:8", @@ -3301,11 +3375,11 @@ }, { "constant": false, - "id": 1267, + "id": 1266, "mutability": "mutable", "name": "tokenAmount", "nodeType": "VariableDeclaration", - "scope": 1368, + "scope": 1372, "src": "2007:19:8", "stateVariable": false, "storageLocation": "default", @@ -3314,7 +3388,7 @@ "typeString": "uint256" }, "typeName": { - "id": 1266, + "id": 1265, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2007:7:8", @@ -3329,16 +3403,16 @@ "src": "1916:111:8" }, "returnParameters": { - "id": 1271, + "id": 1270, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1270, + "id": 1269, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "scope": 1368, + "scope": 1372, "src": "2044:7:8", "stateVariable": false, "storageLocation": "default", @@ -3347,7 +3421,7 @@ "typeString": "bytes32" }, "typeName": { - "id": 1269, + "id": 1268, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "2044:7:8", @@ -3361,17 +3435,17 @@ ], "src": "2043:9:8" }, - "scope": 1604, - "src": "1894:1071:8", + "scope": 1610, + "src": "1894:1092:8", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { - "id": 1433, + "id": 1439, "nodeType": "Block", - "src": "3080:464:8", + "src": "3101:476:8", "statements": [ { "expression": { @@ -3381,18 +3455,18 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 1382, + "id": 1386, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 1380, + "id": 1384, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1370, - "src": "3093:3:8", + "referencedDeclaration": 1374, + "src": "3114:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3402,21 +3476,21 @@ "operator": "!=", "rightExpression": { "hexValue": "30", - "id": 1381, + "id": 1385, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3098:1:8", + "src": "3119:1:8", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "3093:6:8", + "src": "3114:6:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3424,14 +3498,14 @@ }, { "hexValue": "5541492063616e6e6f74206265207a65726f", - "id": 1383, + "id": 1387, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3101:20:8", + "src": "3122:20:8", "typeDescriptions": { "typeIdentifier": "t_stringliteral_8113bcaef69ad64d629f9f9842e44c0195bbec12498295833c352197bdf09d1b", "typeString": "literal_string \"UAI cannot be zero\"" @@ -3450,7 +3524,7 @@ "typeString": "literal_string \"UAI cannot be zero\"" } ], - "id": 1379, + "id": 1383, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -3458,13 +3532,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "3085:7:8", + "src": "3106:7:8", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1384, + "id": 1388, "isConstant": false, "isLValue": false, "isPure": false, @@ -3472,16 +3546,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3085:37:8", + "src": "3106:37:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1385, + "id": 1389, "nodeType": "ExpressionStatement", - "src": "3085:37:8" + "src": "3106:37:8" }, { "expression": { @@ -3491,32 +3565,32 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 1391, + "id": 1395, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "baseExpression": { - "id": 1387, + "id": 1391, "name": "UAIstatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1181, - "src": "3134:9:8", + "referencedDeclaration": 1180, + "src": "3155:9:8", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1389, + "id": 1393, "indexExpression": { - "id": 1388, + "id": 1392, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1370, - "src": "3144:3:8", + "referencedDeclaration": 1374, + "src": "3165:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3527,7 +3601,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3134:14:8", + "src": "3155:14:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3537,21 +3611,21 @@ "operator": "==", "rightExpression": { "hexValue": "74727565", - "id": 1390, + "id": 1394, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "3152:4:8", + "src": "3173:4:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, - "src": "3134:22:8", + "src": "3155:22:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3559,14 +3633,14 @@ }, { "hexValue": "4173736574206d757374206578697374", - "id": 1392, + "id": 1396, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3158:18:8", + "src": "3179:18:8", "typeDescriptions": { "typeIdentifier": "t_stringliteral_1288ba10f0c0a9fa84e2f581ad61c72d898b048e206b52821e5663686f23ff37", "typeString": "literal_string \"Asset must exist\"" @@ -3585,7 +3659,7 @@ "typeString": "literal_string \"Asset must exist\"" } ], - "id": 1386, + "id": 1390, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -3593,13 +3667,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "3126:7:8", + "src": "3147:7:8", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1393, + "id": 1397, "isConstant": false, "isLValue": false, "isPure": false, @@ -3607,16 +3681,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3126:52:8", + "src": "3147:52:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1394, + "id": 1398, "nodeType": "ExpressionStatement", - "src": "3126:52:8" + "src": "3147:52:8" }, { "expression": { @@ -3626,18 +3700,18 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 1398, + "id": 1402, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 1396, + "id": 1400, "name": "newStateCommitHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1372, - "src": "3190:18:8", + "referencedDeclaration": 1376, + "src": "3211:18:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3647,21 +3721,21 @@ "operator": "!=", "rightExpression": { "hexValue": "30", - "id": 1397, + "id": 1401, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3210:1:8", + "src": "3231:1:8", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "3190:21:8", + "src": "3211:21:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3669,14 +3743,14 @@ }, { "hexValue": "6e65775374617465436f6d6d6974486173682063616e6e6f74206265207a65726f", - "id": 1399, + "id": 1403, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3213:35:8", + "src": "3234:35:8", "typeDescriptions": { "typeIdentifier": "t_stringliteral_fa287c795401a9447e9af39b3f60c2649bae99888868237daa5c7cc28744941b", "typeString": "literal_string \"newStateCommitHash cannot be zero\"" @@ -3695,7 +3769,7 @@ "typeString": "literal_string \"newStateCommitHash cannot be zero\"" } ], - "id": 1395, + "id": 1399, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -3703,13 +3777,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "3182:7:8", + "src": "3203:7:8", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1400, + "id": 1404, "isConstant": false, "isLValue": false, "isPure": false, @@ -3717,16 +3791,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3182:67:8", + "src": "3203:67:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1401, + "id": 1405, "nodeType": "ExpressionStatement", - "src": "3182:67:8" + "src": "3203:67:8" }, { "expression": { @@ -3734,12 +3808,12 @@ { "arguments": [ { - "id": 1404, + "id": 1408, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1370, - "src": "3269:3:8", + "referencedDeclaration": 1374, + "src": "3290:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -3747,25 +3821,25 @@ }, { "expression": { - "id": 1405, + "id": 1409, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967281, - "src": "3273:3:8", + "src": "3294:3:8", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 1406, + "id": 1410, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "src": "3273:10:8", + "src": "3294:10:8", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -3783,18 +3857,18 @@ "typeString": "address payable" } ], - "id": 1403, + "id": 1407, "name": "isOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1525, - "src": "3261:7:8", + "referencedDeclaration": 1531, + "src": "3282:7:8", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$_t_bool_$", "typeString": "function (bytes32,address) returns (bool)" } }, - "id": 1407, + "id": 1411, "isConstant": false, "isLValue": false, "isPure": false, @@ -3802,7 +3876,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3261:23:8", + "src": "3282:23:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -3817,7 +3891,7 @@ "typeString": "bool" } ], - "id": 1402, + "id": 1406, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -3825,13 +3899,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "3253:7:8", + "src": "3274:7:8", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 1408, + "id": 1412, "isConstant": false, "isLValue": false, "isPure": false, @@ -3839,54 +3913,80 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3253:32:8", + "src": "3274:32:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1409, + "id": 1413, "nodeType": "ExpressionStatement", - "src": "3253:32:8" + "src": "3274:32:8" }, { "expression": { "arguments": [ { - "id": 1413, + "id": 1417, "name": "newStateCommitHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1372, - "src": "3332:18:8", + "referencedDeclaration": 1376, + "src": "3353:18:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "id": 1414, + "id": 1418, "name": "rootHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1374, - "src": "3352:8:8", + "referencedDeclaration": 1378, + "src": "3373:8:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, + { + "expression": { + "id": 1419, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "3383:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3383:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, { "hexValue": "31", - "id": 1415, + "id": 1421, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3362:1:8", + "src": "3395:1:8", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" @@ -3895,14 +3995,14 @@ }, { "hexValue": "31", - "id": 1416, + "id": 1422, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3365:1:8", + "src": "3398:1:8", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" @@ -3920,6 +4020,10 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" @@ -3930,32 +4034,32 @@ } ], "expression": { - "id": 1410, + "id": 1414, "name": "AssertionRegistry", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1160, - "src": "3292:17:8", + "referencedDeclaration": 1159, + "src": "3313:17:8", "typeDescriptions": { - "typeIdentifier": "t_contract$_DKGcontract_$1139", + "typeIdentifier": "t_contract$_DKGcontract_$1138", "typeString": "contract DKGcontract" } }, - "id": 1412, + "id": 1416, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "createAssertionRecord", "nodeType": "MemberAccess", - "referencedDeclaration": 1016, - "src": "3292:39:8", + "referencedDeclaration": 1015, + "src": "3313:39:8", "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (bytes32,bytes32,uint256,uint256) external" + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes32_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,bytes32,address,uint256,uint256) external" } }, - "id": 1417, + "id": 1423, "isConstant": false, "isLValue": false, "isPure": false, @@ -3963,20 +4067,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3292:75:8", + "src": "3313:87:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1418, + "id": 1424, "nodeType": "ExpressionStatement", - "src": "3292:75:8" + "src": "3313:87:8" }, { "expression": { - "id": 1424, + "id": 1430, "isConstant": false, "isLValue": false, "isPure": false, @@ -3984,25 +4088,25 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 1419, + "id": 1425, "name": "assetRecords", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1177, - "src": "3381:12:8", + "referencedDeclaration": 1176, + "src": "3414:12:8", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" } }, - "id": 1421, + "id": 1427, "indexExpression": { - "id": 1420, + "id": 1426, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1370, - "src": "3394:3:8", + "referencedDeclaration": 1374, + "src": "3427:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4013,21 +4117,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3381:17:8", + "src": "3414:17:8", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", "typeString": "struct UAIRegistry.AssetRecord storage ref" } }, - "id": 1422, + "id": 1428, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "stateCommitHash", "nodeType": "MemberAccess", - "referencedDeclaration": 1172, - "src": "3381:33:8", + "referencedDeclaration": 1171, + "src": "3414:33:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4036,49 +4140,49 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 1423, + "id": 1429, "name": "newStateCommitHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1372, - "src": "3418:18:8", + "referencedDeclaration": 1376, + "src": "3451:18:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "src": "3381:55:8", + "src": "3414:55:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "id": 1425, + "id": 1431, "nodeType": "ExpressionStatement", - "src": "3381:55:8" + "src": "3414:55:8" }, { "eventCall": { "arguments": [ { - "id": 1427, + "id": 1433, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1370, - "src": "3501:3:8", + "referencedDeclaration": 1374, + "src": "3534:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "id": 1428, + "id": 1434, "name": "newStateCommitHash", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1372, - "src": "3506:18:8", + "referencedDeclaration": 1376, + "src": "3539:18:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4096,18 +4200,18 @@ "typeString": "bytes32" } ], - "id": 1426, + "id": 1432, "name": "UAIUpdatedState", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1201, - "src": "3485:15:8", + "referencedDeclaration": 1200, + "src": "3518:15:8", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", "typeString": "function (bytes32,bytes32)" } }, - "id": 1429, + "id": 1435, "isConstant": false, "isLValue": false, "isPure": false, @@ -4115,56 +4219,56 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3485:40:8", + "src": "3518:40:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1430, + "id": 1436, "nodeType": "EmitStatement", - "src": "3480:45:8" + "src": "3513:45:8" }, { "expression": { - "id": 1431, + "id": 1437, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1370, - "src": "3537:3:8", + "referencedDeclaration": 1374, + "src": "3570:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "functionReturnParameters": 1378, - "id": 1432, + "functionReturnParameters": 1382, + "id": 1438, "nodeType": "Return", - "src": "3530:10:8" + "src": "3563:10:8" } ] }, "functionSelector": "a9cd6a2d", - "id": 1434, + "id": 1440, "implemented": true, "kind": "function", "modifiers": [], "name": "updateAssetState", "nodeType": "FunctionDefinition", "parameters": { - "id": 1375, + "id": 1379, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1370, + "id": 1374, "mutability": "mutable", "name": "UAI", "nodeType": "VariableDeclaration", - "scope": 1434, - "src": "2996:11:8", + "scope": 1440, + "src": "3017:11:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4172,10 +4276,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1369, + "id": 1373, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2996:7:8", + "src": "3017:7:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4185,12 +4289,12 @@ }, { "constant": false, - "id": 1372, + "id": 1376, "mutability": "mutable", "name": "newStateCommitHash", "nodeType": "VariableDeclaration", - "scope": 1434, - "src": "3009:26:8", + "scope": 1440, + "src": "3030:26:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4198,10 +4302,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1371, + "id": 1375, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3009:7:8", + "src": "3030:7:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4211,12 +4315,12 @@ }, { "constant": false, - "id": 1374, + "id": 1378, "mutability": "mutable", "name": "rootHash", "nodeType": "VariableDeclaration", - "scope": 1434, - "src": "3037:16:8", + "scope": 1440, + "src": "3058:16:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4224,10 +4328,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1373, + "id": 1377, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3037:7:8", + "src": "3058:7:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4236,20 +4340,20 @@ "visibility": "internal" } ], - "src": "2995:59:8" + "src": "3016:59:8" }, "returnParameters": { - "id": 1378, + "id": 1382, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1377, + "id": 1381, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "scope": 1434, - "src": "3071:7:8", + "scope": 1440, + "src": "3092:7:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4257,10 +4361,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1376, + "id": 1380, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3071:7:8", + "src": "3092:7:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4269,43 +4373,43 @@ "visibility": "internal" } ], - "src": "3070:9:8" + "src": "3091:9:8" }, - "scope": 1604, - "src": "2970:574:8", + "scope": 1610, + "src": "2991:586:8", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { - "id": 1446, + "id": 1452, "nodeType": "Block", - "src": "3650:48:8", + "src": "3683:48:8", "statements": [ { "expression": { "expression": { "baseExpression": { - "id": 1441, + "id": 1447, "name": "assetRecords", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1177, - "src": "3661:12:8", + "referencedDeclaration": 1176, + "src": "3694:12:8", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" } }, - "id": 1443, + "id": 1449, "indexExpression": { - "id": 1442, + "id": 1448, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1436, - "src": "3674:3:8", + "referencedDeclaration": 1442, + "src": "3707:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4316,52 +4420,52 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3661:17:8", + "src": "3694:17:8", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", "typeString": "struct UAIRegistry.AssetRecord storage ref" } }, - "id": 1444, + "id": 1450, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "stateCommitHash", "nodeType": "MemberAccess", - "referencedDeclaration": 1172, - "src": "3661:33:8", + "referencedDeclaration": 1171, + "src": "3694:33:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "functionReturnParameters": 1440, - "id": 1445, + "functionReturnParameters": 1446, + "id": 1451, "nodeType": "Return", - "src": "3654:40:8" + "src": "3687:40:8" } ] }, "functionSelector": "52569b9d", - "id": 1447, + "id": 1453, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssetStateCommitHash", "nodeType": "FunctionDefinition", "parameters": { - "id": 1437, + "id": 1443, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1436, + "id": 1442, "mutability": "mutable", "name": "UAI", "nodeType": "VariableDeclaration", - "scope": 1447, - "src": "3593:11:8", + "scope": 1453, + "src": "3626:11:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4369,10 +4473,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1435, + "id": 1441, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3593:7:8", + "src": "3626:7:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4381,20 +4485,20 @@ "visibility": "internal" } ], - "src": "3592:13:8" + "src": "3625:13:8" }, "returnParameters": { - "id": 1440, + "id": 1446, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1439, + "id": 1445, "mutability": "mutable", "name": "stateCommitHash", "nodeType": "VariableDeclaration", - "scope": 1447, - "src": "3626:23:8", + "scope": 1453, + "src": "3659:23:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4402,10 +4506,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1438, + "id": 1444, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3626:7:8", + "src": "3659:7:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4414,43 +4518,43 @@ "visibility": "internal" } ], - "src": "3625:25:8" + "src": "3658:25:8" }, - "scope": 1604, - "src": "3560:138:8", + "scope": 1610, + "src": "3593:138:8", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 1459, + "id": 1465, "nodeType": "Block", - "src": "3781:43:8", + "src": "3814:43:8", "statements": [ { "expression": { "expression": { "baseExpression": { - "id": 1454, + "id": 1460, "name": "assetRecords", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1177, - "src": "3792:12:8", + "referencedDeclaration": 1176, + "src": "3825:12:8", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" } }, - "id": 1456, + "id": 1462, "indexExpression": { - "id": 1455, + "id": 1461, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1449, - "src": "3805:3:8", + "referencedDeclaration": 1455, + "src": "3838:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4461,52 +4565,52 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3792:17:8", + "src": "3825:17:8", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", "typeString": "struct UAIRegistry.AssetRecord storage ref" } }, - "id": 1457, + "id": 1463, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "controller", "nodeType": "MemberAccess", - "referencedDeclaration": 1170, - "src": "3792:28:8", + "referencedDeclaration": 1169, + "src": "3825:28:8", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "functionReturnParameters": 1453, - "id": 1458, + "functionReturnParameters": 1459, + "id": 1464, "nodeType": "Return", - "src": "3785:35:8" + "src": "3818:35:8" } ] }, "functionSelector": "77636d1d", - "id": 1460, + "id": 1466, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssetController", "nodeType": "FunctionDefinition", "parameters": { - "id": 1450, + "id": 1456, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1449, + "id": 1455, "mutability": "mutable", "name": "UAI", "nodeType": "VariableDeclaration", - "scope": 1460, - "src": "3729:11:8", + "scope": 1466, + "src": "3762:11:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4514,10 +4618,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1448, + "id": 1454, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3729:7:8", + "src": "3762:7:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4526,20 +4630,20 @@ "visibility": "internal" } ], - "src": "3728:13:8" + "src": "3761:13:8" }, "returnParameters": { - "id": 1453, + "id": 1459, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1452, + "id": 1458, "mutability": "mutable", "name": "controller", "nodeType": "VariableDeclaration", - "scope": 1460, - "src": "3762:18:8", + "scope": 1466, + "src": "3795:18:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4547,10 +4651,10 @@ "typeString": "address" }, "typeName": { - "id": 1451, + "id": 1457, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3762:7:8", + "src": "3795:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4560,43 +4664,43 @@ "visibility": "internal" } ], - "src": "3761:20:8" + "src": "3794:20:8" }, - "scope": 1604, - "src": "3701:123:8", + "scope": 1610, + "src": "3734:123:8", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 1472, + "id": 1478, "nodeType": "Block", - "src": "3901:44:8", + "src": "3934:44:8", "statements": [ { "expression": { "expression": { "baseExpression": { - "id": 1467, + "id": 1473, "name": "assetRecords", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1177, - "src": "3912:12:8", + "referencedDeclaration": 1176, + "src": "3945:12:8", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" } }, - "id": 1469, + "id": 1475, "indexExpression": { - "id": 1468, + "id": 1474, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1462, - "src": "3925:3:8", + "referencedDeclaration": 1468, + "src": "3958:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4607,52 +4711,52 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3912:17:8", + "src": "3945:17:8", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", "typeString": "struct UAIRegistry.AssetRecord storage ref" } }, - "id": 1470, + "id": 1476, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "alsoKnownAs", "nodeType": "MemberAccess", - "referencedDeclaration": 1166, - "src": "3912:29:8", + "referencedDeclaration": 1165, + "src": "3945:29:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "functionReturnParameters": 1466, - "id": 1471, + "functionReturnParameters": 1472, + "id": 1477, "nodeType": "Return", - "src": "3905:36:8" + "src": "3938:36:8" } ] }, "functionSelector": "6f3a9229", - "id": 1473, + "id": 1479, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssetAKA", "nodeType": "FunctionDefinition", "parameters": { - "id": 1463, + "id": 1469, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1462, + "id": 1468, "mutability": "mutable", "name": "UAI", "nodeType": "VariableDeclaration", - "scope": 1473, - "src": "3848:11:8", + "scope": 1479, + "src": "3881:11:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4660,10 +4764,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1461, + "id": 1467, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3848:7:8", + "src": "3881:7:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4672,20 +4776,20 @@ "visibility": "internal" } ], - "src": "3847:13:8" + "src": "3880:13:8" }, "returnParameters": { - "id": 1466, + "id": 1472, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1465, + "id": 1471, "mutability": "mutable", "name": "alsoKnownAs", "nodeType": "VariableDeclaration", - "scope": 1473, - "src": "3881:19:8", + "scope": 1479, + "src": "3914:19:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4693,10 +4797,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1464, + "id": 1470, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3881:7:8", + "src": "3914:7:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4705,43 +4809,43 @@ "visibility": "internal" } ], - "src": "3880:21:8" + "src": "3913:21:8" }, - "scope": 1604, - "src": "3827:118:8", + "scope": 1610, + "src": "3860:118:8", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 1485, + "id": 1491, "nodeType": "Block", - "src": "4042:50:8", + "src": "4075:50:8", "statements": [ { "expression": { "expression": { "baseExpression": { - "id": 1480, + "id": 1486, "name": "assetRecords", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1177, - "src": "4053:12:8", + "referencedDeclaration": 1176, + "src": "4086:12:8", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" } }, - "id": 1482, + "id": 1488, "indexExpression": { - "id": 1481, + "id": 1487, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1475, - "src": "4066:3:8", + "referencedDeclaration": 1481, + "src": "4099:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4752,52 +4856,52 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4053:17:8", + "src": "4086:17:8", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", "typeString": "struct UAIRegistry.AssetRecord storage ref" } }, - "id": 1483, + "id": 1489, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "creationTimestamp", "nodeType": "MemberAccess", - "referencedDeclaration": 1164, - "src": "4053:35:8", + "referencedDeclaration": 1163, + "src": "4086:35:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 1479, - "id": 1484, + "functionReturnParameters": 1485, + "id": 1490, "nodeType": "Return", - "src": "4046:42:8" + "src": "4079:42:8" } ] }, "functionSelector": "7f58afc8", - "id": 1486, + "id": 1492, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssetCreationTimestamp", "nodeType": "FunctionDefinition", "parameters": { - "id": 1476, + "id": 1482, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1475, + "id": 1481, "mutability": "mutable", "name": "UAI", "nodeType": "VariableDeclaration", - "scope": 1486, - "src": "3983:11:8", + "scope": 1492, + "src": "4016:11:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4805,10 +4909,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1474, + "id": 1480, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "3983:7:8", + "src": "4016:7:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4817,20 +4921,20 @@ "visibility": "internal" } ], - "src": "3982:13:8" + "src": "4015:13:8" }, "returnParameters": { - "id": 1479, + "id": 1485, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1478, + "id": 1484, "mutability": "mutable", "name": "creationTimestamp", "nodeType": "VariableDeclaration", - "scope": 1486, - "src": "4016:25:8", + "scope": 1492, + "src": "4049:25:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4838,10 +4942,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1477, + "id": 1483, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4016:7:8", + "src": "4049:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4850,65 +4954,65 @@ "visibility": "internal" } ], - "src": "4015:27:8" + "src": "4048:27:8" }, - "scope": 1604, - "src": "3948:144:8", + "scope": 1610, + "src": "3981:144:8", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 1493, + "id": 1499, "nodeType": "Block", - "src": "4173:39:8", + "src": "4206:39:8", "statements": [ { "expression": { - "id": 1491, + "id": 1497, "name": "AssertionRegistryAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1162, - "src": "4184:24:8", + "referencedDeclaration": 1161, + "src": "4217:24:8", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "functionReturnParameters": 1490, - "id": 1492, + "functionReturnParameters": 1496, + "id": 1498, "nodeType": "Return", - "src": "4177:31:8" + "src": "4210:31:8" } ] }, "functionSelector": "2f1704bc", - "id": 1494, + "id": 1500, "implemented": true, "kind": "function", "modifiers": [], "name": "getAssertionRegistry", "nodeType": "FunctionDefinition", "parameters": { - "id": 1487, + "id": 1493, "nodeType": "ParameterList", "parameters": [], - "src": "4124:2:8" + "src": "4157:2:8" }, "returnParameters": { - "id": 1490, + "id": 1496, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1489, + "id": 1495, "mutability": "mutable", "name": "assertionRegistry", "nodeType": "VariableDeclaration", - "scope": 1494, - "src": "4147:25:8", + "scope": 1500, + "src": "4180:25:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4916,10 +5020,10 @@ "typeString": "address" }, "typeName": { - "id": 1488, + "id": 1494, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4147:7:8", + "src": "4180:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4929,68 +5033,68 @@ "visibility": "internal" } ], - "src": "4146:27:8" + "src": "4179:27:8" }, - "scope": 1604, - "src": "4095:117:8", + "scope": 1610, + "src": "4128:117:8", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 1506, + "id": 1512, "nodeType": "Block", - "src": "4427:62:8", + "src": "4460:62:8", "statements": [ { "expression": { "hexValue": "30", - "id": 1504, + "id": 1510, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4438:1:8", + "src": "4471:1:8", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "functionReturnParameters": 1503, - "id": 1505, + "functionReturnParameters": 1509, + "id": 1511, "nodeType": "Return", - "src": "4431:8:8" + "src": "4464:8:8" } ] }, "documentation": { - "id": 1495, + "id": 1501, "nodeType": "StructuredDocumentation", - "src": "4230:107:8", + "src": "4263:107:8", "text": " @dev Should determine type of ``contractAddress``, if possible, returning enum AssetType" }, - "id": 1507, + "id": 1513, "implemented": true, "kind": "function", "modifiers": [], "name": "determineType", "nodeType": "FunctionDefinition", "parameters": { - "id": 1500, + "id": 1506, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1497, + "id": 1503, "mutability": "mutable", "name": "contractAddress", "nodeType": "VariableDeclaration", - "scope": 1507, - "src": "4366:23:8", + "scope": 1513, + "src": "4399:23:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4998,10 +5102,10 @@ "typeString": "address" }, "typeName": { - "id": 1496, + "id": 1502, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4366:7:8", + "src": "4399:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -5012,12 +5116,12 @@ }, { "constant": false, - "id": 1499, + "id": 1505, "mutability": "mutable", "name": "id", "nodeType": "VariableDeclaration", - "scope": 1507, - "src": "4391:10:8", + "scope": 1513, + "src": "4424:10:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5025,10 +5129,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1498, + "id": 1504, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "4391:7:8", + "src": "4424:7:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5037,20 +5141,20 @@ "visibility": "internal" } ], - "src": "4365:37:8" + "src": "4398:37:8" }, "returnParameters": { - "id": 1503, + "id": 1509, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1502, + "id": 1508, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "scope": 1507, - "src": "4421:5:8", + "scope": 1513, + "src": "4454:5:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5058,10 +5162,10 @@ "typeString": "uint8" }, "typeName": { - "id": 1501, + "id": 1507, "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "4421:5:8", + "src": "4454:5:8", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -5070,19 +5174,19 @@ "visibility": "internal" } ], - "src": "4420:7:8" + "src": "4453:7:8" }, - "scope": 1604, - "src": "4343:146:8", + "scope": 1610, + "src": "4376:146:8", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { - "id": 1524, + "id": 1530, "nodeType": "Block", - "src": "4650:60:8", + "src": "4683:60:8", "statements": [ { "expression": { @@ -5090,18 +5194,18 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 1522, + "id": 1528, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 1517, + "id": 1523, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1512, - "src": "4665:5:8", + "referencedDeclaration": 1518, + "src": "4698:5:8", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5112,25 +5216,25 @@ "rightExpression": { "expression": { "baseExpression": { - "id": 1518, + "id": 1524, "name": "assetRecords", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1177, - "src": "4674:12:8", + "referencedDeclaration": 1176, + "src": "4707:12:8", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1173_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AssetRecord_$1172_storage_$", "typeString": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)" } }, - "id": 1520, + "id": 1526, "indexExpression": { - "id": 1519, + "id": 1525, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1510, - "src": "4687:3:8", + "referencedDeclaration": 1516, + "src": "4720:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5141,63 +5245,63 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4674:17:8", + "src": "4707:17:8", "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetRecord_$1173_storage", + "typeIdentifier": "t_struct$_AssetRecord_$1172_storage", "typeString": "struct UAIRegistry.AssetRecord storage ref" } }, - "id": 1521, + "id": 1527, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "controller", "nodeType": "MemberAccess", - "referencedDeclaration": 1170, - "src": "4674:28:8", + "referencedDeclaration": 1169, + "src": "4707:28:8", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "4665:37:8", + "src": "4698:37:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "functionReturnParameters": 1516, - "id": 1523, + "functionReturnParameters": 1522, + "id": 1529, "nodeType": "Return", - "src": "4658:44:8" + "src": "4691:44:8" } ] }, "documentation": { - "id": 1508, + "id": 1514, "nodeType": "StructuredDocumentation", - "src": "4492:83:8", + "src": "4525:83:8", "text": " @dev Returns bool checking if ``owner`` is controller of ``UAI``" }, - "id": 1525, + "id": 1531, "implemented": true, "kind": "function", "modifiers": [], "name": "isOwner", "nodeType": "FunctionDefinition", "parameters": { - "id": 1513, + "id": 1519, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1510, + "id": 1516, "mutability": "mutable", "name": "UAI", "nodeType": "VariableDeclaration", - "scope": 1525, - "src": "4598:11:8", + "scope": 1531, + "src": "4631:11:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5205,10 +5309,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1509, + "id": 1515, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "4598:7:8", + "src": "4631:7:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5218,12 +5322,12 @@ }, { "constant": false, - "id": 1512, + "id": 1518, "mutability": "mutable", "name": "owner", "nodeType": "VariableDeclaration", - "scope": 1525, - "src": "4611:13:8", + "scope": 1531, + "src": "4644:13:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5231,10 +5335,10 @@ "typeString": "address" }, "typeName": { - "id": 1511, + "id": 1517, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4611:7:8", + "src": "4644:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -5244,20 +5348,20 @@ "visibility": "internal" } ], - "src": "4597:28:8" + "src": "4630:28:8" }, "returnParameters": { - "id": 1516, + "id": 1522, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1515, + "id": 1521, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "scope": 1525, - "src": "4644:4:8", + "scope": 1531, + "src": "4677:4:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5265,10 +5369,10 @@ "typeString": "bool" }, "typeName": { - "id": 1514, + "id": 1520, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "4644:4:8", + "src": "4677:4:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5277,19 +5381,19 @@ "visibility": "internal" } ], - "src": "4643:6:8" + "src": "4676:6:8" }, - "scope": 1604, - "src": "4581:129:8", + "scope": 1610, + "src": "4614:129:8", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { - "id": 1602, + "id": 1608, "nodeType": "Block", - "src": "4851:717:8", + "src": "4884:717:8", "statements": [ { "expression": { @@ -5299,18 +5403,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1536, + "id": 1542, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 1534, + "id": 1540, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1528, - "src": "4868:6:8", + "referencedDeclaration": 1534, + "src": "4901:6:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5320,21 +5424,21 @@ "operator": ">", "rightExpression": { "hexValue": "30", - "id": 1535, + "id": 1541, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4875:1:8", + "src": "4908:1:8", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "4868:8:8", + "src": "4901:8:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5342,14 +5446,14 @@ }, { "hexValue": "416d6f756e742063616e6e6f74206265207a65726f", - "id": 1537, + "id": 1543, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "4878:23:8", + "src": "4911:23:8", "typeDescriptions": { "typeIdentifier": "t_stringliteral_8beea76deddeff1012d90e1e8da369393f885b0575eb094a33da9912cc4bbb8b", "typeString": "literal_string \"Amount cannot be zero\"" @@ -5368,7 +5472,7 @@ "typeString": "literal_string \"Amount cannot be zero\"" } ], - "id": 1533, + "id": 1539, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -5376,13 +5480,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "4860:7:8", + "src": "4893:7:8", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1538, + "id": 1544, "isConstant": false, "isLValue": false, "isPure": false, @@ -5390,16 +5494,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4860:42:8", + "src": "4893:42:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1539, + "id": 1545, "nodeType": "ExpressionStatement", - "src": "4860:42:8" + "src": "4893:42:8" }, { "expression": { @@ -5409,7 +5513,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1551, + "id": 1557, "isConstant": false, "isLValue": false, "isPure": false, @@ -5418,25 +5522,25 @@ "arguments": [ { "expression": { - "id": 1543, + "id": 1549, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967281, - "src": "4934:3:8", + "src": "4967:3:8", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 1544, + "id": 1550, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "src": "4934:10:8", + "src": "4967:10:8", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -5445,14 +5549,14 @@ { "arguments": [ { - "id": 1547, + "id": 1553, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967268, - "src": "4954:4:8", + "src": "4987:4:8", "typeDescriptions": { - "typeIdentifier": "t_contract$_UAIRegistry_$1604", + "typeIdentifier": "t_contract$_UAIRegistry_$1610", "typeString": "contract UAIRegistry" } } @@ -5460,30 +5564,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_UAIRegistry_$1604", + "typeIdentifier": "t_contract$_UAIRegistry_$1610", "typeString": "contract UAIRegistry" } ], - "id": 1546, + "id": 1552, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "4946:7:8", + "src": "4979:7:8", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 1545, + "id": 1551, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4946:7:8", + "src": "4979:7:8", "typeDescriptions": {} } }, - "id": 1548, + "id": 1554, "isConstant": false, "isLValue": false, "isPure": false, @@ -5491,7 +5595,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4946:13:8", + "src": "4979:13:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", @@ -5511,18 +5615,18 @@ } ], "expression": { - "id": 1541, + "id": 1547, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1158, - "src": "4918:5:8", + "referencedDeclaration": 1157, + "src": "4951:5:8", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$676", "typeString": "contract IERC20" } }, - "id": 1542, + "id": 1548, "isConstant": false, "isLValue": false, "isPure": false, @@ -5530,13 +5634,13 @@ "memberName": "allowance", "nodeType": "MemberAccess", "referencedDeclaration": 635, - "src": "4918:15:8", + "src": "4951:15:8", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", "typeString": "function (address,address) view external returns (uint256)" } }, - "id": 1549, + "id": 1555, "isConstant": false, "isLValue": false, "isPure": false, @@ -5544,7 +5648,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4918:42:8", + "src": "4951:42:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -5554,18 +5658,18 @@ "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { - "id": 1550, + "id": 1556, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1528, - "src": "4964:6:8", + "referencedDeclaration": 1534, + "src": "4997:6:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4918:52:8", + "src": "4951:52:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5573,14 +5677,14 @@ }, { "hexValue": "53656e64657220616c6c6f77616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e74", - "id": 1552, + "id": 1558, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "4972:64:8", + "src": "5005:64:8", "typeDescriptions": { "typeIdentifier": "t_stringliteral_3bc5ac98536c45d410bf37692b674d7f6ad3249fabf29eadc142b2e562988389", "typeString": "literal_string \"Sender allowance must be equal to or higher than chosen amount\"" @@ -5599,7 +5703,7 @@ "typeString": "literal_string \"Sender allowance must be equal to or higher than chosen amount\"" } ], - "id": 1540, + "id": 1546, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -5607,13 +5711,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "4910:7:8", + "src": "4943:7:8", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1553, + "id": 1559, "isConstant": false, "isLValue": false, "isPure": false, @@ -5621,16 +5725,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4910:127:8", + "src": "4943:127:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1554, + "id": 1560, "nodeType": "ExpressionStatement", - "src": "4910:127:8" + "src": "4943:127:8" }, { "expression": { @@ -5640,7 +5744,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 1562, + "id": 1568, "isConstant": false, "isLValue": false, "isPure": false, @@ -5649,25 +5753,25 @@ "arguments": [ { "expression": { - "id": 1558, + "id": 1564, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967281, - "src": "5069:3:8", + "src": "5102:3:8", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 1559, + "id": 1565, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "src": "5069:10:8", + "src": "5102:10:8", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -5682,18 +5786,18 @@ } ], "expression": { - "id": 1556, + "id": 1562, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1158, - "src": "5053:5:8", + "referencedDeclaration": 1157, + "src": "5086:5:8", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$676", "typeString": "contract IERC20" } }, - "id": 1557, + "id": 1563, "isConstant": false, "isLValue": false, "isPure": false, @@ -5701,13 +5805,13 @@ "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 615, - "src": "5053:15:8", + "src": "5086:15:8", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, - "id": 1560, + "id": 1566, "isConstant": false, "isLValue": false, "isPure": false, @@ -5715,7 +5819,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5053:27:8", + "src": "5086:27:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -5725,18 +5829,18 @@ "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { - "id": 1561, + "id": 1567, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1528, - "src": "5084:6:8", + "referencedDeclaration": 1534, + "src": "5117:6:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5053:37:8", + "src": "5086:37:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5744,14 +5848,14 @@ }, { "hexValue": "53656e6465722062616c616e6365206d75737420626520657175616c20746f206f7220686967686572207468616e2063686f73656e20616d6f756e7421", - "id": 1563, + "id": 1569, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "5092:63:8", + "src": "5125:63:8", "typeDescriptions": { "typeIdentifier": "t_stringliteral_262e509abce0ea4c77b39344642b82be870ee6d03e35d57d1dee69295a1e383b", "typeString": "literal_string \"Sender balance must be equal to or higher than chosen amount!\"" @@ -5770,7 +5874,7 @@ "typeString": "literal_string \"Sender balance must be equal to or higher than chosen amount!\"" } ], - "id": 1555, + "id": 1561, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -5778,13 +5882,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "5045:7:8", + "src": "5078:7:8", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1564, + "id": 1570, "isConstant": false, "isLValue": false, "isPure": false, @@ -5792,30 +5896,30 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5045:111:8", + "src": "5078:111:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1565, + "id": 1571, "nodeType": "ExpressionStatement", - "src": "5045:111:8" + "src": "5078:111:8" }, { "assignments": [ - 1567 + 1573 ], "declarations": [ { "constant": false, - "id": 1567, + "id": 1573, "mutability": "mutable", "name": "transaction_result", "nodeType": "VariableDeclaration", - "scope": 1602, - "src": "5165:23:8", + "scope": 1608, + "src": "5198:23:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5823,10 +5927,10 @@ "typeString": "bool" }, "typeName": { - "id": 1566, + "id": 1572, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "5165:4:8", + "src": "5198:4:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5835,30 +5939,30 @@ "visibility": "internal" } ], - "id": 1578, + "id": 1584, "initialValue": { "arguments": [ { "expression": { - "id": 1570, + "id": 1576, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967281, - "src": "5210:3:8", + "src": "5243:3:8", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 1571, + "id": 1577, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "src": "5210:10:8", + "src": "5243:10:8", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -5867,14 +5971,14 @@ { "arguments": [ { - "id": 1574, + "id": 1580, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967268, - "src": "5230:4:8", + "src": "5263:4:8", "typeDescriptions": { - "typeIdentifier": "t_contract$_UAIRegistry_$1604", + "typeIdentifier": "t_contract$_UAIRegistry_$1610", "typeString": "contract UAIRegistry" } } @@ -5882,30 +5986,30 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_UAIRegistry_$1604", + "typeIdentifier": "t_contract$_UAIRegistry_$1610", "typeString": "contract UAIRegistry" } ], - "id": 1573, + "id": 1579, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5222:7:8", + "src": "5255:7:8", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 1572, + "id": 1578, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5222:7:8", + "src": "5255:7:8", "typeDescriptions": {} } }, - "id": 1575, + "id": 1581, "isConstant": false, "isLValue": false, "isPure": false, @@ -5913,7 +6017,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5222:13:8", + "src": "5255:13:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", @@ -5921,12 +6025,12 @@ } }, { - "id": 1576, + "id": 1582, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1528, - "src": "5237:6:8", + "referencedDeclaration": 1534, + "src": "5270:6:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5949,18 +6053,18 @@ } ], "expression": { - "id": 1568, + "id": 1574, "name": "token", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1158, - "src": "5191:5:8", + "referencedDeclaration": 1157, + "src": "5224:5:8", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$676", "typeString": "contract IERC20" } }, - "id": 1569, + "id": 1575, "isConstant": false, "isLValue": false, "isPure": false, @@ -5968,13 +6072,13 @@ "memberName": "transferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 657, - "src": "5191:18:8", + "src": "5224:18:8", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,address,uint256) external returns (bool)" } }, - "id": 1577, + "id": 1583, "isConstant": false, "isLValue": false, "isPure": false, @@ -5982,7 +6086,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5191:53:8", + "src": "5224:53:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -5990,18 +6094,18 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "5165:79:8" + "src": "5198:79:8" }, { "expression": { "arguments": [ { - "id": 1580, + "id": 1586, "name": "transaction_result", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1567, - "src": "5260:18:8", + "referencedDeclaration": 1573, + "src": "5293:18:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -6009,14 +6113,14 @@ }, { "hexValue": "546f6b656e207472616e73616374696f6e20657865637574696f6e206661696c656421", - "id": 1581, + "id": 1587, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "5280:37:8", + "src": "5313:37:8", "typeDescriptions": { "typeIdentifier": "t_stringliteral_c60aa67373380e582a977ce48d7156e19a6358c471790919f2371ebd75aaf7c7", "typeString": "literal_string \"Token transaction execution failed!\"" @@ -6035,7 +6139,7 @@ "typeString": "literal_string \"Token transaction execution failed!\"" } ], - "id": 1579, + "id": 1585, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -6043,13 +6147,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "5252:7:8", + "src": "5285:7:8", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1582, + "id": 1588, "isConstant": false, "isLValue": false, "isPure": false, @@ -6057,45 +6161,45 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5252:66:8", + "src": "5285:66:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1583, + "id": 1589, "nodeType": "ExpressionStatement", - "src": "5252:66:8" + "src": "5285:66:8" }, { "expression": { - "id": 1593, + "id": 1599, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "baseExpression": { - "id": 1584, + "id": 1590, "name": "assetStake", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1185, - "src": "5463:10:8", + "referencedDeclaration": 1184, + "src": "5496:10:8", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", "typeString": "mapping(bytes32 => uint256)" } }, - "id": 1586, + "id": 1592, "indexExpression": { - "id": 1585, + "id": 1591, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1530, - "src": "5474:3:8", + "referencedDeclaration": 1536, + "src": "5507:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -6106,7 +6210,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "5463:15:8", + "src": "5496:15:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6117,12 +6221,12 @@ "rightHandSide": { "arguments": [ { - "id": 1591, + "id": 1597, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1528, - "src": "5501:6:8", + "referencedDeclaration": 1534, + "src": "5534:6:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6138,25 +6242,25 @@ ], "expression": { "baseExpression": { - "id": 1587, + "id": 1593, "name": "assetStake", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1185, - "src": "5481:10:8", + "referencedDeclaration": 1184, + "src": "5514:10:8", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", "typeString": "mapping(bytes32 => uint256)" } }, - "id": 1589, + "id": 1595, "indexExpression": { - "id": 1588, + "id": 1594, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1530, - "src": "5492:3:8", + "referencedDeclaration": 1536, + "src": "5525:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -6167,13 +6271,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5481:15:8", + "src": "5514:15:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 1590, + "id": 1596, "isConstant": false, "isLValue": false, "isPure": false, @@ -6181,13 +6285,13 @@ "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 303, - "src": "5481:19:8", + "src": "5514:19: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": 1592, + "id": 1598, "isConstant": false, "isLValue": false, "isPure": false, @@ -6195,45 +6299,45 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5481:27:8", + "src": "5514:27:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5463:45:8", + "src": "5496:45:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 1594, + "id": 1600, "nodeType": "ExpressionStatement", - "src": "5463:45:8" + "src": "5496:45:8" }, { "eventCall": { "arguments": [ { - "id": 1596, + "id": 1602, "name": "UAI", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1530, - "src": "5540:3:8", + "referencedDeclaration": 1536, + "src": "5573:3:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "id": 1597, + "id": 1603, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1528, - "src": "5545:6:8", + "referencedDeclaration": 1534, + "src": "5578:6:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6241,25 +6345,25 @@ }, { "expression": { - "id": 1598, + "id": 1604, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967281, - "src": "5552:3:8", + "src": "5585:3:8", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 1599, + "id": 1605, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "src": "5552:10:8", + "src": "5585:10:8", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -6281,18 +6385,18 @@ "typeString": "address payable" } ], - "id": 1595, + "id": 1601, "name": "TokensDepositedToAsset", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1209, - "src": "5517:22:8", + "referencedDeclaration": 1208, + "src": "5550:22:8", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_address_$returns$__$", "typeString": "function (bytes32,uint256,address)" } }, - "id": 1600, + "id": 1606, "isConstant": false, "isLValue": false, "isPure": false, @@ -6300,44 +6404,44 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5517:46:8", + "src": "5550:46:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1601, + "id": 1607, "nodeType": "EmitStatement", - "src": "5512:51:8" + "src": "5545:51:8" } ] }, "documentation": { - "id": 1526, + "id": 1532, "nodeType": "StructuredDocumentation", - "src": "4713:73:8", + "src": "4746:73:8", "text": " @dev Deposits tokens in ``amount`` to specific ``UAI``" }, "functionSelector": "d15b223e", - "id": 1603, + "id": 1609, "implemented": true, "kind": "function", "modifiers": [], "name": "depositTokens", "nodeType": "FunctionDefinition", "parameters": { - "id": 1531, + "id": 1537, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1528, + "id": 1534, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", - "scope": 1603, - "src": "4815:14:8", + "scope": 1609, + "src": "4848:14:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6345,10 +6449,10 @@ "typeString": "uint256" }, "typeName": { - "id": 1527, + "id": 1533, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4815:7:8", + "src": "4848:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6358,12 +6462,12 @@ }, { "constant": false, - "id": 1530, + "id": 1536, "mutability": "mutable", "name": "UAI", "nodeType": "VariableDeclaration", - "scope": 1603, - "src": "4831:11:8", + "scope": 1609, + "src": "4864:11:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6371,10 +6475,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1529, + "id": 1535, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "4831:7:8", + "src": "4864:7:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -6383,26 +6487,26 @@ "visibility": "internal" } ], - "src": "4814:29:8" + "src": "4847:29:8" }, "returnParameters": { - "id": 1532, + "id": 1538, "nodeType": "ParameterList", "parameters": [], - "src": "4851:0:8" + "src": "4884:0:8" }, - "scope": 1604, - "src": "4792:776:8", + "scope": 1610, + "src": "4825:776:8", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" } ], - "scope": 1605, - "src": "623:4950:8" + "scope": 1611, + "src": "623:4983:8" } ], - "src": "0:5573:8" + "src": "0:5606:8" }, "legacyAST": { "attributes": { @@ -6412,7 +6516,7 @@ 815 ], "DKGcontract": [ - 1139 + 1138 ], "IERC1155": [ 598 @@ -6433,7 +6537,7 @@ 476 ], "UAIRegistry": [ - 1604 + 1610 ] } }, @@ -6450,7 +6554,7 @@ ".0" ] }, - "id": 1141, + "id": 1140, "name": "PragmaDirective", "src": "0:31:8" }, @@ -6459,13 +6563,13 @@ "SourceUnit": 677, "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", "file": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", - "scope": 1605, + "scope": 1611, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 1142, + "id": 1141, "name": "ImportDirective", "src": "33:64:8" }, @@ -6474,13 +6578,13 @@ "SourceUnit": 793, "absolutePath": "openzeppelin-solidity/contracts/token/ERC721/IERC721.sol", "file": "openzeppelin-solidity/contracts/token/ERC721/IERC721.sol", - "scope": 1605, + "scope": 1611, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 1143, + "id": 1142, "name": "ImportDirective", "src": "98:66:8" }, @@ -6489,13 +6593,13 @@ "SourceUnit": 599, "absolutePath": "openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol", "file": "openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol", - "scope": 1605, + "scope": 1611, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 1144, + "id": 1143, "name": "ImportDirective", "src": "165:68:8" }, @@ -6504,13 +6608,13 @@ "SourceUnit": 477, "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol", "file": "openzeppelin-solidity/contracts/math/SafeMath.sol", - "scope": 1605, + "scope": 1611, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 1145, + "id": 1144, "name": "ImportDirective", "src": "234:59:8" }, @@ -6519,28 +6623,28 @@ "SourceUnit": 110, "absolutePath": "openzeppelin-solidity/contracts/access/Ownable.sol", "file": "openzeppelin-solidity/contracts/access/Ownable.sol", - "scope": 1605, + "scope": 1611, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 1146, + "id": 1145, "name": "ImportDirective", "src": "294:60:8" }, { "attributes": { - "SourceUnit": 1140, + "SourceUnit": 1139, "absolutePath": "project:/contracts/DKGcontract.sol", "file": "./DKGcontract.sol", - "scope": 1605, + "scope": 1611, "symbolAliases": [ null ], "unitAlias": "" }, - "id": 1147, + "id": 1146, "name": "ImportDirective", "src": "355:27:8" }, @@ -6554,12 +6658,12 @@ "contractKind": "contract", "fullyImplemented": true, "linearizedBaseContracts": [ - 1604, + 1610, 109, 815 ], "name": "UAIRegistry", - "scope": 1605 + "scope": 1611 }, "children": [ { @@ -6571,12 +6675,12 @@ "referencedDeclaration": 109, "type": "contract Ownable" }, - "id": 1148, + "id": 1147, "name": "UserDefinedTypeName", "src": "647:7:8" } ], - "id": 1149, + "id": 1148, "name": "InheritanceSpecifier", "src": "647:7:8" }, @@ -6590,7 +6694,7 @@ "attributes": { "name": "Native" }, - "id": 1150, + "id": 1149, "name": "EnumValue", "src": "677:6:8" }, @@ -6598,7 +6702,7 @@ "attributes": { "name": "ERC721" }, - "id": 1151, + "id": 1150, "name": "EnumValue", "src": "687:6:8" }, @@ -6606,12 +6710,12 @@ "attributes": { "name": "ERC1155" }, - "id": 1152, + "id": 1151, "name": "EnumValue", "src": "697:7:8" } ], - "id": 1153, + "id": 1152, "name": "EnumDefinition", "src": "659:48:8" }, @@ -6623,7 +6727,7 @@ "referencedDeclaration": 476, "type": "library SafeMath" }, - "id": 1154, + "id": 1153, "name": "UserDefinedTypeName", "src": "716:8:8" }, @@ -6632,12 +6736,12 @@ "name": "uint256", "type": "uint256" }, - "id": 1155, + "id": 1154, "name": "ElementaryTypeName", "src": "729:7:8" } ], - "id": 1156, + "id": 1155, "name": "UsingForDirective", "src": "710:27:8" }, @@ -6646,7 +6750,7 @@ "constant": false, "mutability": "mutable", "name": "token", - "scope": 1604, + "scope": 1610, "stateVariable": true, "storageLocation": "default", "type": "contract IERC20", @@ -6659,12 +6763,12 @@ "referencedDeclaration": 676, "type": "contract IERC20" }, - "id": 1157, + "id": 1156, "name": "UserDefinedTypeName", "src": "739:6:8" } ], - "id": 1158, + "id": 1157, "name": "VariableDeclaration", "src": "739:12:8" }, @@ -6673,7 +6777,7 @@ "constant": false, "mutability": "mutable", "name": "AssertionRegistry", - "scope": 1604, + "scope": 1610, "stateVariable": true, "storageLocation": "default", "type": "contract DKGcontract", @@ -6683,15 +6787,15 @@ { "attributes": { "name": "DKGcontract", - "referencedDeclaration": 1139, + "referencedDeclaration": 1138, "type": "contract DKGcontract" }, - "id": 1159, + "id": 1158, "name": "UserDefinedTypeName", "src": "754:11:8" } ], - "id": 1160, + "id": 1159, "name": "VariableDeclaration", "src": "754:29:8" }, @@ -6700,7 +6804,7 @@ "constant": false, "mutability": "mutable", "name": "AssertionRegistryAddress", - "scope": 1604, + "scope": 1610, "stateVariable": true, "storageLocation": "default", "type": "address", @@ -6713,12 +6817,12 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1161, + "id": 1160, "name": "ElementaryTypeName", "src": "786:7:8" } ], - "id": 1162, + "id": 1161, "name": "VariableDeclaration", "src": "786:32:8" }, @@ -6726,7 +6830,7 @@ "attributes": { "canonicalName": "UAIRegistry.AssetRecord", "name": "AssetRecord", - "scope": 1604, + "scope": 1610, "visibility": "public" }, "children": [ @@ -6735,7 +6839,7 @@ "constant": false, "mutability": "mutable", "name": "creationTimestamp", - "scope": 1173, + "scope": 1172, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -6747,12 +6851,12 @@ "name": "uint256", "type": "uint256" }, - "id": 1163, + "id": 1162, "name": "ElementaryTypeName", "src": "844:7:8" } ], - "id": 1164, + "id": 1163, "name": "VariableDeclaration", "src": "844:25:8" }, @@ -6761,7 +6865,7 @@ "constant": false, "mutability": "mutable", "name": "alsoKnownAs", - "scope": 1173, + "scope": 1172, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -6773,12 +6877,12 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1165, + "id": 1164, "name": "ElementaryTypeName", "src": "873:7:8" } ], - "id": 1166, + "id": 1165, "name": "VariableDeclaration", "src": "873:19:8" }, @@ -6787,7 +6891,7 @@ "constant": false, "mutability": "mutable", "name": "_type", - "scope": 1173, + "scope": 1172, "stateVariable": false, "storageLocation": "default", "type": "uint8", @@ -6799,12 +6903,12 @@ "name": "uint8", "type": "uint8" }, - "id": 1167, + "id": 1166, "name": "ElementaryTypeName", "src": "967:5:8" } ], - "id": 1168, + "id": 1167, "name": "VariableDeclaration", "src": "967:11:8" }, @@ -6813,7 +6917,7 @@ "constant": false, "mutability": "mutable", "name": "controller", - "scope": 1173, + "scope": 1172, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -6826,12 +6930,12 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1169, + "id": 1168, "name": "ElementaryTypeName", "src": "982:7:8" } ], - "id": 1170, + "id": 1169, "name": "VariableDeclaration", "src": "982:18:8" }, @@ -6840,7 +6944,7 @@ "constant": false, "mutability": "mutable", "name": "stateCommitHash", - "scope": 1173, + "scope": 1172, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -6852,17 +6956,17 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1171, + "id": 1170, "name": "ElementaryTypeName", "src": "1012:7:8" } ], - "id": 1172, + "id": 1171, "name": "VariableDeclaration", "src": "1012:23:8" } ], - "id": 1173, + "id": 1172, "name": "StructDefinition", "src": "822:217:8" }, @@ -6872,7 +6976,7 @@ "functionSelector": "09600fa6", "mutability": "mutable", "name": "assetRecords", - "scope": 1604, + "scope": 1610, "stateVariable": true, "storageLocation": "default", "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord)", @@ -6889,27 +6993,27 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1174, + "id": 1173, "name": "ElementaryTypeName", "src": "1050:7:8" }, { "attributes": { "name": "AssetRecord", - "referencedDeclaration": 1173, + "referencedDeclaration": 1172, "type": "struct UAIRegistry.AssetRecord" }, - "id": 1175, + "id": 1174, "name": "UserDefinedTypeName", "src": "1061:11:8" } ], - "id": 1176, + "id": 1175, "name": "Mapping", "src": "1042:31:8" } ], - "id": 1177, + "id": 1176, "name": "VariableDeclaration", "src": "1042:51:8" }, @@ -6919,7 +7023,7 @@ "functionSelector": "09added7", "mutability": "mutable", "name": "UAIstatus", - "scope": 1604, + "scope": 1610, "stateVariable": true, "storageLocation": "default", "type": "mapping(bytes32 => bool)", @@ -6936,7 +7040,7 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1178, + "id": 1177, "name": "ElementaryTypeName", "src": "1104:7:8" }, @@ -6945,17 +7049,17 @@ "name": "bool", "type": "bool" }, - "id": 1179, + "id": 1178, "name": "ElementaryTypeName", "src": "1115:4:8" } ], - "id": 1180, + "id": 1179, "name": "Mapping", "src": "1096:24:8" } ], - "id": 1181, + "id": 1180, "name": "VariableDeclaration", "src": "1096:41:8" }, @@ -6965,7 +7069,7 @@ "functionSelector": "34e5197b", "mutability": "mutable", "name": "assetStake", - "scope": 1604, + "scope": 1610, "stateVariable": true, "storageLocation": "default", "type": "mapping(bytes32 => uint256)", @@ -6982,7 +7086,7 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1182, + "id": 1181, "name": "ElementaryTypeName", "src": "1149:7:8" }, @@ -6991,17 +7095,17 @@ "name": "uint256", "type": "uint256" }, - "id": 1183, + "id": 1182, "name": "ElementaryTypeName", "src": "1160:7:8" } ], - "id": 1184, + "id": 1183, "name": "Mapping", "src": "1141:27:8" } ], - "id": 1185, + "id": 1184, "name": "VariableDeclaration", "src": "1141:45:8" }, @@ -7019,7 +7123,7 @@ "indexed": true, "mutability": "mutable", "name": "assertionRegistryAddress", - "scope": 1189, + "scope": 1188, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -7032,22 +7136,22 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1186, + "id": 1185, "name": "ElementaryTypeName", "src": "1226:7:8" } ], - "id": 1187, + "id": 1186, "name": "VariableDeclaration", "src": "1226:40:8" } ], - "id": 1188, + "id": 1187, "name": "ParameterList", "src": "1225:42:8" } ], - "id": 1189, + "id": 1188, "name": "EventDefinition", "src": "1204:64:8" }, @@ -7065,7 +7169,7 @@ "indexed": true, "mutability": "mutable", "name": "UAI", - "scope": 1195, + "scope": 1194, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -7077,12 +7181,12 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1190, + "id": 1189, "name": "ElementaryTypeName", "src": "1287:7:8" } ], - "id": 1191, + "id": 1190, "name": "VariableDeclaration", "src": "1287:19:8" }, @@ -7092,7 +7196,7 @@ "indexed": true, "mutability": "mutable", "name": "stateCommitHash", - "scope": 1195, + "scope": 1194, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -7104,22 +7208,22 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1192, + "id": 1191, "name": "ElementaryTypeName", "src": "1308:7:8" } ], - "id": 1193, + "id": 1192, "name": "VariableDeclaration", "src": "1308:31:8" } ], - "id": 1194, + "id": 1193, "name": "ParameterList", "src": "1286:54:8" } ], - "id": 1195, + "id": 1194, "name": "EventDefinition", "src": "1270:71:8" }, @@ -7137,7 +7241,7 @@ "indexed": true, "mutability": "mutable", "name": "UAI", - "scope": 1201, + "scope": 1200, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -7149,12 +7253,12 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1196, + "id": 1195, "name": "ElementaryTypeName", "src": "1365:7:8" } ], - "id": 1197, + "id": 1196, "name": "VariableDeclaration", "src": "1365:19:8" }, @@ -7164,7 +7268,7 @@ "indexed": true, "mutability": "mutable", "name": "stateCommitHash", - "scope": 1201, + "scope": 1200, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -7176,22 +7280,22 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1198, + "id": 1197, "name": "ElementaryTypeName", "src": "1386:7:8" } ], - "id": 1199, + "id": 1198, "name": "VariableDeclaration", "src": "1386:31:8" } ], - "id": 1200, + "id": 1199, "name": "ParameterList", "src": "1364:55:8" } ], - "id": 1201, + "id": 1200, "name": "EventDefinition", "src": "1343:77:8" }, @@ -7209,7 +7313,7 @@ "indexed": true, "mutability": "mutable", "name": "UAI", - "scope": 1209, + "scope": 1208, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -7221,12 +7325,12 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1202, + "id": 1201, "name": "ElementaryTypeName", "src": "1451:7:8" } ], - "id": 1203, + "id": 1202, "name": "VariableDeclaration", "src": "1451:19:8" }, @@ -7236,7 +7340,7 @@ "indexed": true, "mutability": "mutable", "name": "amount", - "scope": 1209, + "scope": 1208, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -7248,12 +7352,12 @@ "name": "uint256", "type": "uint256" }, - "id": 1204, + "id": 1203, "name": "ElementaryTypeName", "src": "1472:7:8" } ], - "id": 1205, + "id": 1204, "name": "VariableDeclaration", "src": "1472:22:8" }, @@ -7263,7 +7367,7 @@ "indexed": true, "mutability": "mutable", "name": "depositor", - "scope": 1209, + "scope": 1208, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -7276,22 +7380,22 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1206, + "id": 1205, "name": "ElementaryTypeName", "src": "1496:7:8" } ], - "id": 1207, + "id": 1206, "name": "VariableDeclaration", "src": "1496:25:8" } ], - "id": 1208, + "id": 1207, "name": "ParameterList", "src": "1450:72:8" } ], - "id": 1209, + "id": 1208, "name": "EventDefinition", "src": "1422:101:8" }, @@ -7304,7 +7408,7 @@ null ], "name": "", - "scope": 1604, + "scope": 1610, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -7317,7 +7421,7 @@ "constant": false, "mutability": "mutable", "name": "tokenAddress", - "scope": 1255, + "scope": 1254, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -7330,12 +7434,12 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1210, + "id": 1209, "name": "ElementaryTypeName", "src": "1538:7:8" } ], - "id": 1211, + "id": 1210, "name": "VariableDeclaration", "src": "1538:20:8" }, @@ -7344,7 +7448,7 @@ "constant": false, "mutability": "mutable", "name": "assertionRegistryAddress", - "scope": 1255, + "scope": 1254, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -7357,17 +7461,17 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1212, + "id": 1211, "name": "ElementaryTypeName", "src": "1560:7:8" } ], - "id": 1213, + "id": 1212, "name": "VariableDeclaration", "src": "1560:32:8" } ], - "id": 1214, + "id": 1213, "name": "ParameterList", "src": "1537:56:8" }, @@ -7378,7 +7482,7 @@ ] }, "children": [], - "id": 1215, + "id": 1214, "name": "ParameterList", "src": "1602:0:8" }, @@ -7417,7 +7521,7 @@ "type": "function (bool) pure", "value": "require" }, - "id": 1216, + "id": 1215, "name": "Identifier", "src": "1606:7:8" }, @@ -7440,11 +7544,11 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1211, + "referencedDeclaration": 1210, "type": "address", "value": "tokenAddress" }, - "id": 1217, + "id": 1216, "name": "Identifier", "src": "1614:12:8" }, @@ -7482,12 +7586,12 @@ "attributes": { "name": "address" }, - "id": 1218, + "id": 1217, "name": "ElementaryTypeName", "src": "1628:7:8" } ], - "id": 1219, + "id": 1218, "name": "ElementaryTypeNameExpression", "src": "1628:7:8" }, @@ -7502,27 +7606,27 @@ "type": "int_const 0", "value": "0" }, - "id": 1220, + "id": 1219, "name": "Literal", "src": "1636:1:8" } ], - "id": 1221, + "id": 1220, "name": "FunctionCall", "src": "1628:10:8" } ], - "id": 1222, + "id": 1221, "name": "BinaryOperation", "src": "1614:24:8" } ], - "id": 1223, + "id": 1222, "name": "FunctionCall", "src": "1606:33:8" } ], - "id": 1224, + "id": 1223, "name": "ExpressionStatement", "src": "1606:33:8" }, @@ -7559,7 +7663,7 @@ "type": "function (bool) pure", "value": "require" }, - "id": 1225, + "id": 1224, "name": "Identifier", "src": "1643:7:8" }, @@ -7582,11 +7686,11 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1213, + "referencedDeclaration": 1212, "type": "address", "value": "assertionRegistryAddress" }, - "id": 1226, + "id": 1225, "name": "Identifier", "src": "1651:24:8" }, @@ -7624,12 +7728,12 @@ "attributes": { "name": "address" }, - "id": 1227, + "id": 1226, "name": "ElementaryTypeName", "src": "1677:7:8" } ], - "id": 1228, + "id": 1227, "name": "ElementaryTypeNameExpression", "src": "1677:7:8" }, @@ -7644,27 +7748,27 @@ "type": "int_const 0", "value": "0" }, - "id": 1229, + "id": 1228, "name": "Literal", "src": "1685:1:8" } ], - "id": 1230, + "id": 1229, "name": "FunctionCall", "src": "1677:10:8" } ], - "id": 1231, + "id": 1230, "name": "BinaryOperation", "src": "1651:36:8" } ], - "id": 1232, + "id": 1231, "name": "FunctionCall", "src": "1643:45:8" } ], - "id": 1233, + "id": 1232, "name": "ExpressionStatement", "src": "1643:45:8" }, @@ -7685,11 +7789,11 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1158, + "referencedDeclaration": 1157, "type": "contract IERC20", "value": "token" }, - "id": 1234, + "id": 1233, "name": "Identifier", "src": "1693:5:8" }, @@ -7723,7 +7827,7 @@ "type": "type(contract IERC20)", "value": "IERC20" }, - "id": 1235, + "id": 1234, "name": "Identifier", "src": "1701:6:8" }, @@ -7732,26 +7836,26 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1211, + "referencedDeclaration": 1210, "type": "address", "value": "tokenAddress" }, - "id": 1236, + "id": 1235, "name": "Identifier", "src": "1708:12:8" } ], - "id": 1237, + "id": 1236, "name": "FunctionCall", "src": "1701:20:8" } ], - "id": 1238, + "id": 1237, "name": "Assignment", "src": "1693:28:8" } ], - "id": 1239, + "id": 1238, "name": "ExpressionStatement", "src": "1693:28:8" }, @@ -7772,11 +7876,11 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1162, + "referencedDeclaration": 1161, "type": "address", "value": "AssertionRegistryAddress" }, - "id": 1240, + "id": 1239, "name": "Identifier", "src": "1725:24:8" }, @@ -7785,21 +7889,21 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1213, + "referencedDeclaration": 1212, "type": "address", "value": "assertionRegistryAddress" }, - "id": 1241, + "id": 1240, "name": "Identifier", "src": "1752:24:8" } ], - "id": 1242, + "id": 1241, "name": "Assignment", "src": "1725:51:8" } ], - "id": 1243, + "id": 1242, "name": "ExpressionStatement", "src": "1725:51:8" }, @@ -7820,11 +7924,11 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1160, + "referencedDeclaration": 1159, "type": "contract DKGcontract", "value": "AssertionRegistry" }, - "id": 1244, + "id": 1243, "name": "Identifier", "src": "1780:17:8" }, @@ -7854,11 +7958,11 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1139, + "referencedDeclaration": 1138, "type": "type(contract DKGcontract)", "value": "DKGcontract" }, - "id": 1245, + "id": 1244, "name": "Identifier", "src": "1800:11:8" }, @@ -7867,26 +7971,26 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1213, + "referencedDeclaration": 1212, "type": "address", "value": "assertionRegistryAddress" }, - "id": 1246, + "id": 1245, "name": "Identifier", "src": "1812:24:8" } ], - "id": 1247, + "id": 1246, "name": "FunctionCall", "src": "1800:37:8" } ], - "id": 1248, + "id": 1247, "name": "Assignment", "src": "1780:57:8" } ], - "id": 1249, + "id": 1248, "name": "ExpressionStatement", "src": "1780:57:8" }, @@ -7918,11 +8022,11 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1189, + "referencedDeclaration": 1188, "type": "function (address)", "value": "UAIRegistryInit" }, - "id": 1250, + "id": 1249, "name": "Identifier", "src": "1846:15:8" }, @@ -7931,31 +8035,31 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1213, + "referencedDeclaration": 1212, "type": "address", "value": "assertionRegistryAddress" }, - "id": 1251, + "id": 1250, "name": "Identifier", "src": "1862:24:8" } ], - "id": 1252, + "id": 1251, "name": "FunctionCall", "src": "1846:41:8" } ], - "id": 1253, + "id": 1252, "name": "EmitStatement", "src": "1841:46:8" } ], - "id": 1254, + "id": 1253, "name": "Block", "src": "1602:289:8" } ], - "id": 1255, + "id": 1254, "name": "FunctionDefinition", "src": "1526:365:8" }, @@ -7969,7 +8073,7 @@ null ], "name": "registerAsset", - "scope": 1604, + "scope": 1610, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -7982,7 +8086,7 @@ "constant": false, "mutability": "mutable", "name": "UAI", - "scope": 1368, + "scope": 1372, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -7994,12 +8098,12 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1256, + "id": 1255, "name": "ElementaryTypeName", "src": "1917:7:8" } ], - "id": 1257, + "id": 1256, "name": "VariableDeclaration", "src": "1917:11:8" }, @@ -8008,7 +8112,7 @@ "constant": false, "mutability": "mutable", "name": "_type", - "scope": 1368, + "scope": 1372, "stateVariable": false, "storageLocation": "default", "type": "uint8", @@ -8020,12 +8124,12 @@ "name": "uint8", "type": "uint8" }, - "id": 1258, + "id": 1257, "name": "ElementaryTypeName", "src": "1930:5:8" } ], - "id": 1259, + "id": 1258, "name": "VariableDeclaration", "src": "1930:11:8" }, @@ -8034,7 +8138,7 @@ "constant": false, "mutability": "mutable", "name": "alsoKnownAs", - "scope": 1368, + "scope": 1372, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -8046,12 +8150,12 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1260, + "id": 1259, "name": "ElementaryTypeName", "src": "1943:7:8" } ], - "id": 1261, + "id": 1260, "name": "VariableDeclaration", "src": "1943:19:8" }, @@ -8060,7 +8164,7 @@ "constant": false, "mutability": "mutable", "name": "stateCommitHash", - "scope": 1368, + "scope": 1372, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -8072,12 +8176,12 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1262, + "id": 1261, "name": "ElementaryTypeName", "src": "1964:7:8" } ], - "id": 1263, + "id": 1262, "name": "VariableDeclaration", "src": "1964:23:8" }, @@ -8086,7 +8190,7 @@ "constant": false, "mutability": "mutable", "name": "rootHash", - "scope": 1368, + "scope": 1372, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -8098,12 +8202,12 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1264, + "id": 1263, "name": "ElementaryTypeName", "src": "1989:7:8" } ], - "id": 1265, + "id": 1264, "name": "VariableDeclaration", "src": "1989:16:8" }, @@ -8112,7 +8216,7 @@ "constant": false, "mutability": "mutable", "name": "tokenAmount", - "scope": 1368, + "scope": 1372, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -8124,17 +8228,17 @@ "name": "uint256", "type": "uint256" }, - "id": 1266, + "id": 1265, "name": "ElementaryTypeName", "src": "2007:7:8" } ], - "id": 1267, + "id": 1266, "name": "VariableDeclaration", "src": "2007:19:8" } ], - "id": 1268, + "id": 1267, "name": "ParameterList", "src": "1916:111:8" }, @@ -8145,7 +8249,7 @@ "constant": false, "mutability": "mutable", "name": "", - "scope": 1368, + "scope": 1372, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -8157,17 +8261,17 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1269, + "id": 1268, "name": "ElementaryTypeName", "src": "2044:7:8" } ], - "id": 1270, + "id": 1269, "name": "VariableDeclaration", "src": "2044:7:8" } ], - "id": 1271, + "id": 1270, "name": "ParameterList", "src": "2043:9:8" }, @@ -8210,7 +8314,7 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1272, + "id": 1271, "name": "Identifier", "src": "2057:7:8" }, @@ -8233,11 +8337,11 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1257, + "referencedDeclaration": 1256, "type": "bytes32", "value": "UAI" }, - "id": 1273, + "id": 1272, "name": "Identifier", "src": "2065:3:8" }, @@ -8252,12 +8356,12 @@ "type": "int_const 0", "value": "0" }, - "id": 1274, + "id": 1273, "name": "Literal", "src": "2070:1:8" } ], - "id": 1275, + "id": 1274, "name": "BinaryOperation", "src": "2065:6:8" }, @@ -8272,17 +8376,17 @@ "type": "literal_string \"UAI cannot be zero\"", "value": "UAI cannot be zero" }, - "id": 1276, + "id": 1275, "name": "Literal", "src": "2073:20:8" } ], - "id": 1277, + "id": 1276, "name": "FunctionCall", "src": "2057:37:8" } ], - "id": 1278, + "id": 1277, "name": "ExpressionStatement", "src": "2057:37:8" }, @@ -8323,7 +8427,7 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1279, + "id": 1278, "name": "Identifier", "src": "2098:7:8" }, @@ -8346,11 +8450,11 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1259, + "referencedDeclaration": 1258, "type": "uint8", "value": "_type" }, - "id": 1280, + "id": 1279, "name": "Identifier", "src": "2106:5:8" }, @@ -8365,12 +8469,12 @@ "type": "int_const 3", "value": "3" }, - "id": 1281, + "id": 1280, "name": "Literal", "src": "2114:1:8" } ], - "id": 1282, + "id": 1281, "name": "BinaryOperation", "src": "2106:9:8" }, @@ -8385,17 +8489,17 @@ "type": "literal_string \"_type allowed values: 0,1,2 (WIP)\"", "value": "_type allowed values: 0,1,2 (WIP)" }, - "id": 1283, + "id": 1282, "name": "Literal", "src": "2117:35:8" } ], - "id": 1284, + "id": 1283, "name": "FunctionCall", "src": "2098:55:8" } ], - "id": 1285, + "id": 1284, "name": "ExpressionStatement", "src": "2098:55:8" }, @@ -8436,7 +8540,7 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1286, + "id": 1285, "name": "Identifier", "src": "2157:7:8" }, @@ -8459,11 +8563,11 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1261, + "referencedDeclaration": 1260, "type": "bytes32", "value": "alsoKnownAs" }, - "id": 1287, + "id": 1286, "name": "Identifier", "src": "2165:11:8" }, @@ -8478,12 +8582,12 @@ "type": "int_const 0", "value": "0" }, - "id": 1288, + "id": 1287, "name": "Literal", "src": "2178:1:8" } ], - "id": 1289, + "id": 1288, "name": "BinaryOperation", "src": "2165:14:8" }, @@ -8498,17 +8602,17 @@ "type": "literal_string \"alsoKnownAs cannot be zero\"", "value": "alsoKnownAs cannot be zero" }, - "id": 1290, + "id": 1289, "name": "Literal", "src": "2181:28:8" } ], - "id": 1291, + "id": 1290, "name": "FunctionCall", "src": "2157:53:8" } ], - "id": 1292, + "id": 1291, "name": "ExpressionStatement", "src": "2157:53:8" }, @@ -8549,7 +8653,7 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1293, + "id": 1292, "name": "Identifier", "src": "2214:7:8" }, @@ -8572,11 +8676,11 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1263, + "referencedDeclaration": 1262, "type": "bytes32", "value": "stateCommitHash" }, - "id": 1294, + "id": 1293, "name": "Identifier", "src": "2222:15:8" }, @@ -8591,12 +8695,12 @@ "type": "int_const 0", "value": "0" }, - "id": 1295, + "id": 1294, "name": "Literal", "src": "2239:1:8" } ], - "id": 1296, + "id": 1295, "name": "BinaryOperation", "src": "2222:18:8" }, @@ -8611,17 +8715,17 @@ "type": "literal_string \"stateCommitHash cannot be zero\"", "value": "stateCommitHash cannot be zero" }, - "id": 1297, + "id": 1296, "name": "Literal", "src": "2242:32:8" } ], - "id": 1298, + "id": 1297, "name": "FunctionCall", "src": "2214:61:8" } ], - "id": 1299, + "id": 1298, "name": "ExpressionStatement", "src": "2214:61:8" }, @@ -8658,7 +8762,7 @@ "type": "function (bool) pure", "value": "require" }, - "id": 1300, + "id": 1299, "name": "Identifier", "src": "2279:7:8" }, @@ -8690,11 +8794,11 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1181, + "referencedDeclaration": 1180, "type": "mapping(bytes32 => bool)", "value": "UAIstatus" }, - "id": 1301, + "id": 1300, "name": "Identifier", "src": "2287:9:8" }, @@ -8703,16 +8807,16 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1257, + "referencedDeclaration": 1256, "type": "bytes32", "value": "UAI" }, - "id": 1302, + "id": 1301, "name": "Identifier", "src": "2297:3:8" } ], - "id": 1303, + "id": 1302, "name": "IndexAccess", "src": "2287:14:8" }, @@ -8727,22 +8831,22 @@ "type": "bool", "value": "false" }, - "id": 1304, + "id": 1303, "name": "Literal", "src": "2305:5:8" } ], - "id": 1305, + "id": 1304, "name": "BinaryOperation", "src": "2287:23:8" } ], - "id": 1306, + "id": 1305, "name": "FunctionCall", "src": "2279:33:8" } ], - "id": 1307, + "id": 1306, "name": "ExpressionStatement", "src": "2279:33:8" }, @@ -8774,6 +8878,10 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" @@ -8788,8 +8896,8 @@ "isPure": false, "lValueRequested": false, "member_name": "createAssertionRecord", - "referencedDeclaration": 1016, - "type": "function (bytes32,bytes32,uint256,uint256) external" + "referencedDeclaration": 1015, + "type": "function (bytes32,bytes32,address,uint256,uint256) external" }, "children": [ { @@ -8797,16 +8905,16 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1160, + "referencedDeclaration": 1159, "type": "contract DKGcontract", "value": "AssertionRegistry" }, - "id": 1308, + "id": 1307, "name": "Identifier", "src": "2472:17:8" } ], - "id": 1310, + "id": 1309, "name": "MemberAccess", "src": "2472:39:8" }, @@ -8815,11 +8923,11 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1263, + "referencedDeclaration": 1262, "type": "bytes32", "value": "stateCommitHash" }, - "id": 1311, + "id": 1310, "name": "Identifier", "src": "2512:15:8" }, @@ -8828,14 +8936,90 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1265, + "referencedDeclaration": 1264, "type": "bytes32", "value": "rootHash" }, - "id": 1312, + "id": 1311, "name": "Identifier", "src": "2529:8:8" }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "tryCall": false, + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)" + }, + "children": [ + { + "attributes": { + "name": "address" + }, + "id": 1312, + "name": "ElementaryTypeName", + "src": "2539:7:8" + } + ], + "id": 1313, + "name": "ElementaryTypeNameExpression", + "src": "2539:7:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967281, + "type": "msg", + "value": "msg" + }, + "id": 1314, + "name": "Identifier", + "src": "2547:3:8" + } + ], + "id": 1315, + "name": "MemberAccess", + "src": "2547:10:8" + } + ], + "id": 1316, + "name": "FunctionCall", + "src": "2539:19:8" + }, { "attributes": { "hexvalue": "31", @@ -8847,9 +9031,9 @@ "type": "int_const 1", "value": "1" }, - "id": 1313, + "id": 1317, "name": "Literal", - "src": "2539:1:8" + "src": "2560:1:8" }, { "attributes": { @@ -8862,19 +9046,19 @@ "type": "int_const 1", "value": "1" }, - "id": 1314, + "id": 1318, "name": "Literal", - "src": "2542:1:8" + "src": "2563:1:8" } ], - "id": 1315, + "id": 1319, "name": "FunctionCall", - "src": "2472:72:8" + "src": "2472:93:8" } ], - "id": 1316, + "id": 1320, "name": "ExpressionStatement", - "src": "2472:72:8" + "src": "2472:93:8" }, { "children": [ @@ -8895,7 +9079,7 @@ "isPure": false, "lValueRequested": true, "member_name": "stateCommitHash", - "referencedDeclaration": 1172, + "referencedDeclaration": 1171, "type": "bytes32" }, "children": [ @@ -8913,59 +9097,59 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1177, + "referencedDeclaration": 1176, "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", "value": "assetRecords" }, - "id": 1317, + "id": 1321, "name": "Identifier", - "src": "2592:12:8" + "src": "2613:12:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1257, + "referencedDeclaration": 1256, "type": "bytes32", "value": "UAI" }, - "id": 1318, + "id": 1322, "name": "Identifier", - "src": "2605:3:8" + "src": "2626:3:8" } ], - "id": 1319, + "id": 1323, "name": "IndexAccess", - "src": "2592:17:8" + "src": "2613:17:8" } ], - "id": 1320, + "id": 1324, "name": "MemberAccess", - "src": "2592:33:8" + "src": "2613:33:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1263, + "referencedDeclaration": 1262, "type": "bytes32", "value": "stateCommitHash" }, - "id": 1321, + "id": 1325, "name": "Identifier", - "src": "2628:15:8" + "src": "2649:15:8" } ], - "id": 1322, + "id": 1326, "name": "Assignment", - "src": "2592:51:8" + "src": "2613:51:8" } ], - "id": 1323, + "id": 1327, "name": "ExpressionStatement", - "src": "2592:51:8" + "src": "2613:51:8" }, { "children": [ @@ -8986,7 +9170,7 @@ "isPure": false, "lValueRequested": true, "member_name": "_type", - "referencedDeclaration": 1168, + "referencedDeclaration": 1167, "type": "uint8" }, "children": [ @@ -9004,59 +9188,59 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1177, + "referencedDeclaration": 1176, "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", "value": "assetRecords" }, - "id": 1324, + "id": 1328, "name": "Identifier", - "src": "2647:12:8" + "src": "2668:12:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1257, + "referencedDeclaration": 1256, "type": "bytes32", "value": "UAI" }, - "id": 1325, + "id": 1329, "name": "Identifier", - "src": "2660:3:8" + "src": "2681:3:8" } ], - "id": 1326, + "id": 1330, "name": "IndexAccess", - "src": "2647:17:8" + "src": "2668:17:8" } ], - "id": 1327, + "id": 1331, "name": "MemberAccess", - "src": "2647:23:8" + "src": "2668:23:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1259, + "referencedDeclaration": 1258, "type": "uint8", "value": "_type" }, - "id": 1328, + "id": 1332, "name": "Identifier", - "src": "2673:5:8" + "src": "2694:5:8" } ], - "id": 1329, + "id": 1333, "name": "Assignment", - "src": "2647:31:8" + "src": "2668:31:8" } ], - "id": 1330, + "id": 1334, "name": "ExpressionStatement", - "src": "2647:31:8" + "src": "2668:31:8" }, { "children": [ @@ -9077,7 +9261,7 @@ "isPure": false, "lValueRequested": true, "member_name": "alsoKnownAs", - "referencedDeclaration": 1166, + "referencedDeclaration": 1165, "type": "bytes32" }, "children": [ @@ -9095,59 +9279,59 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1177, + "referencedDeclaration": 1176, "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", "value": "assetRecords" }, - "id": 1331, + "id": 1335, "name": "Identifier", - "src": "2682:12:8" + "src": "2703:12:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1257, + "referencedDeclaration": 1256, "type": "bytes32", "value": "UAI" }, - "id": 1332, + "id": 1336, "name": "Identifier", - "src": "2695:3:8" + "src": "2716:3:8" } ], - "id": 1333, + "id": 1337, "name": "IndexAccess", - "src": "2682:17:8" + "src": "2703:17:8" } ], - "id": 1334, + "id": 1338, "name": "MemberAccess", - "src": "2682:29:8" + "src": "2703:29:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1261, + "referencedDeclaration": 1260, "type": "bytes32", "value": "alsoKnownAs" }, - "id": 1335, + "id": 1339, "name": "Identifier", - "src": "2714:11:8" + "src": "2735:11:8" } ], - "id": 1336, + "id": 1340, "name": "Assignment", - "src": "2682:43:8" + "src": "2703:43:8" } ], - "id": 1337, + "id": 1341, "name": "ExpressionStatement", - "src": "2682:43:8" + "src": "2703:43:8" }, { "children": [ @@ -9168,7 +9352,7 @@ "isPure": false, "lValueRequested": true, "member_name": "controller", - "referencedDeclaration": 1170, + "referencedDeclaration": 1169, "type": "address" }, "children": [ @@ -9186,36 +9370,36 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1177, + "referencedDeclaration": 1176, "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", "value": "assetRecords" }, - "id": 1338, + "id": 1342, "name": "Identifier", - "src": "2729:12:8" + "src": "2750:12:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1257, + "referencedDeclaration": 1256, "type": "bytes32", "value": "UAI" }, - "id": 1339, + "id": 1343, "name": "Identifier", - "src": "2742:3:8" + "src": "2763:3:8" } ], - "id": 1340, + "id": 1344, "name": "IndexAccess", - "src": "2729:17:8" + "src": "2750:17:8" } ], - "id": 1341, + "id": 1345, "name": "MemberAccess", - "src": "2729:28:8" + "src": "2750:28:8" }, { "attributes": { @@ -9236,24 +9420,24 @@ "type": "msg", "value": "msg" }, - "id": 1342, + "id": 1346, "name": "Identifier", - "src": "2760:3:8" + "src": "2781:3:8" } ], - "id": 1343, + "id": 1347, "name": "MemberAccess", - "src": "2760:10:8" + "src": "2781:10:8" } ], - "id": 1344, + "id": 1348, "name": "Assignment", - "src": "2729:41:8" + "src": "2750:41:8" } ], - "id": 1345, + "id": 1349, "name": "ExpressionStatement", - "src": "2729:41:8" + "src": "2750:41:8" }, { "children": [ @@ -9274,7 +9458,7 @@ "isPure": false, "lValueRequested": true, "member_name": "creationTimestamp", - "referencedDeclaration": 1164, + "referencedDeclaration": 1163, "type": "uint256" }, "children": [ @@ -9292,36 +9476,36 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1177, + "referencedDeclaration": 1176, "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", "value": "assetRecords" }, - "id": 1346, + "id": 1350, "name": "Identifier", - "src": "2826:12:8" + "src": "2847:12:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1257, + "referencedDeclaration": 1256, "type": "bytes32", "value": "UAI" }, - "id": 1347, + "id": 1351, "name": "Identifier", - "src": "2839:3:8" + "src": "2860:3:8" } ], - "id": 1348, + "id": 1352, "name": "IndexAccess", - "src": "2826:17:8" + "src": "2847:17:8" } ], - "id": 1349, + "id": 1353, "name": "MemberAccess", - "src": "2826:35:8" + "src": "2847:35:8" }, { "attributes": { @@ -9342,24 +9526,24 @@ "type": "block", "value": "block" }, - "id": 1350, + "id": 1354, "name": "Identifier", - "src": "2864:5:8" + "src": "2885:5:8" } ], - "id": 1351, + "id": 1355, "name": "MemberAccess", - "src": "2864:15:8" + "src": "2885:15:8" } ], - "id": 1352, + "id": 1356, "name": "Assignment", - "src": "2826:53:8" + "src": "2847:53:8" } ], - "id": 1353, + "id": 1357, "name": "ExpressionStatement", - "src": "2826:53:8" + "src": "2847:53:8" }, { "children": [ @@ -9387,31 +9571,31 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1181, + "referencedDeclaration": 1180, "type": "mapping(bytes32 => bool)", "value": "UAIstatus" }, - "id": 1354, + "id": 1358, "name": "Identifier", - "src": "2883:9:8" + "src": "2904:9:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1257, + "referencedDeclaration": 1256, "type": "bytes32", "value": "UAI" }, - "id": 1355, + "id": 1359, "name": "Identifier", - "src": "2893:3:8" + "src": "2914:3:8" } ], - "id": 1356, + "id": 1360, "name": "IndexAccess", - "src": "2883:14:8" + "src": "2904:14:8" }, { "attributes": { @@ -9424,19 +9608,19 @@ "type": "bool", "value": "true" }, - "id": 1357, + "id": 1361, "name": "Literal", - "src": "2900:4:8" + "src": "2921:4:8" } ], - "id": 1358, + "id": 1362, "name": "Assignment", - "src": "2883:21:8" + "src": "2904:21:8" } ], - "id": 1359, + "id": 1363, "name": "ExpressionStatement", - "src": "2883:21:8" + "src": "2904:21:8" }, { "children": [ @@ -9470,53 +9654,53 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1195, + "referencedDeclaration": 1194, "type": "function (bytes32,bytes32)", "value": "UAICreated" }, - "id": 1360, + "id": 1364, "name": "Identifier", - "src": "2914:10:8" + "src": "2935:10:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1257, + "referencedDeclaration": 1256, "type": "bytes32", "value": "UAI" }, - "id": 1361, + "id": 1365, "name": "Identifier", - "src": "2925:3:8" + "src": "2946:3:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1263, + "referencedDeclaration": 1262, "type": "bytes32", "value": "stateCommitHash" }, - "id": 1362, + "id": 1366, "name": "Identifier", - "src": "2930:15:8" + "src": "2951:15:8" } ], - "id": 1363, + "id": 1367, "name": "FunctionCall", - "src": "2914:32:8" + "src": "2935:32:8" } ], - "id": 1364, + "id": 1368, "name": "EmitStatement", - "src": "2909:37:8" + "src": "2930:37:8" }, { "attributes": { - "functionReturnParameters": 1271 + "functionReturnParameters": 1270 }, "children": [ { @@ -9524,28 +9708,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1257, + "referencedDeclaration": 1256, "type": "bytes32", "value": "UAI" }, - "id": 1365, + "id": 1369, "name": "Identifier", - "src": "2958:3:8" + "src": "2979:3:8" } ], - "id": 1366, + "id": 1370, "name": "Return", - "src": "2951:10:8" + "src": "2972:10:8" } ], - "id": 1367, + "id": 1371, "name": "Block", - "src": "2052:913:8" + "src": "2052:934:8" } ], - "id": 1368, + "id": 1372, "name": "FunctionDefinition", - "src": "1894:1071:8" + "src": "1894:1092:8" }, { "attributes": { @@ -9557,7 +9741,7 @@ null ], "name": "updateAssetState", - "scope": 1604, + "scope": 1610, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -9570,7 +9754,7 @@ "constant": false, "mutability": "mutable", "name": "UAI", - "scope": 1434, + "scope": 1440, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -9582,21 +9766,21 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1369, + "id": 1373, "name": "ElementaryTypeName", - "src": "2996:7:8" + "src": "3017:7:8" } ], - "id": 1370, + "id": 1374, "name": "VariableDeclaration", - "src": "2996:11:8" + "src": "3017:11:8" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "newStateCommitHash", - "scope": 1434, + "scope": 1440, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -9608,21 +9792,21 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1371, + "id": 1375, "name": "ElementaryTypeName", - "src": "3009:7:8" + "src": "3030:7:8" } ], - "id": 1372, + "id": 1376, "name": "VariableDeclaration", - "src": "3009:26:8" + "src": "3030:26:8" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "rootHash", - "scope": 1434, + "scope": 1440, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -9634,19 +9818,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1373, + "id": 1377, "name": "ElementaryTypeName", - "src": "3037:7:8" + "src": "3058:7:8" } ], - "id": 1374, + "id": 1378, "name": "VariableDeclaration", - "src": "3037:16:8" + "src": "3058:16:8" } ], - "id": 1375, + "id": 1379, "name": "ParameterList", - "src": "2995:59:8" + "src": "3016:59:8" }, { "children": [ @@ -9655,7 +9839,7 @@ "constant": false, "mutability": "mutable", "name": "", - "scope": 1434, + "scope": 1440, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -9667,19 +9851,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1376, + "id": 1380, "name": "ElementaryTypeName", - "src": "3071:7:8" + "src": "3092:7:8" } ], - "id": 1377, + "id": 1381, "name": "VariableDeclaration", - "src": "3071:7:8" + "src": "3092:7:8" } ], - "id": 1378, + "id": 1382, "name": "ParameterList", - "src": "3070:9:8" + "src": "3091:9:8" }, { "children": [ @@ -9720,9 +9904,9 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1379, + "id": 1383, "name": "Identifier", - "src": "3085:7:8" + "src": "3106:7:8" }, { "attributes": { @@ -9743,13 +9927,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1370, + "referencedDeclaration": 1374, "type": "bytes32", "value": "UAI" }, - "id": 1380, + "id": 1384, "name": "Identifier", - "src": "3093:3:8" + "src": "3114:3:8" }, { "attributes": { @@ -9762,14 +9946,14 @@ "type": "int_const 0", "value": "0" }, - "id": 1381, + "id": 1385, "name": "Literal", - "src": "3098:1:8" + "src": "3119:1:8" } ], - "id": 1382, + "id": 1386, "name": "BinaryOperation", - "src": "3093:6:8" + "src": "3114:6:8" }, { "attributes": { @@ -9782,19 +9966,19 @@ "type": "literal_string \"UAI cannot be zero\"", "value": "UAI cannot be zero" }, - "id": 1383, + "id": 1387, "name": "Literal", - "src": "3101:20:8" + "src": "3122:20:8" } ], - "id": 1384, + "id": 1388, "name": "FunctionCall", - "src": "3085:37:8" + "src": "3106:37:8" } ], - "id": 1385, + "id": 1389, "name": "ExpressionStatement", - "src": "3085:37:8" + "src": "3106:37:8" }, { "children": [ @@ -9833,9 +10017,9 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1386, + "id": 1390, "name": "Identifier", - "src": "3126:7:8" + "src": "3147:7:8" }, { "attributes": { @@ -9865,31 +10049,31 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1181, + "referencedDeclaration": 1180, "type": "mapping(bytes32 => bool)", "value": "UAIstatus" }, - "id": 1387, + "id": 1391, "name": "Identifier", - "src": "3134:9:8" + "src": "3155:9:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1370, + "referencedDeclaration": 1374, "type": "bytes32", "value": "UAI" }, - "id": 1388, + "id": 1392, "name": "Identifier", - "src": "3144:3:8" + "src": "3165:3:8" } ], - "id": 1389, + "id": 1393, "name": "IndexAccess", - "src": "3134:14:8" + "src": "3155:14:8" }, { "attributes": { @@ -9902,14 +10086,14 @@ "type": "bool", "value": "true" }, - "id": 1390, + "id": 1394, "name": "Literal", - "src": "3152:4:8" + "src": "3173:4:8" } ], - "id": 1391, + "id": 1395, "name": "BinaryOperation", - "src": "3134:22:8" + "src": "3155:22:8" }, { "attributes": { @@ -9922,19 +10106,19 @@ "type": "literal_string \"Asset must exist\"", "value": "Asset must exist" }, - "id": 1392, + "id": 1396, "name": "Literal", - "src": "3158:18:8" + "src": "3179:18:8" } ], - "id": 1393, + "id": 1397, "name": "FunctionCall", - "src": "3126:52:8" + "src": "3147:52:8" } ], - "id": 1394, + "id": 1398, "name": "ExpressionStatement", - "src": "3126:52:8" + "src": "3147:52:8" }, { "children": [ @@ -9973,9 +10157,9 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1395, + "id": 1399, "name": "Identifier", - "src": "3182:7:8" + "src": "3203:7:8" }, { "attributes": { @@ -9996,13 +10180,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1372, + "referencedDeclaration": 1376, "type": "bytes32", "value": "newStateCommitHash" }, - "id": 1396, + "id": 1400, "name": "Identifier", - "src": "3190:18:8" + "src": "3211:18:8" }, { "attributes": { @@ -10015,14 +10199,14 @@ "type": "int_const 0", "value": "0" }, - "id": 1397, + "id": 1401, "name": "Literal", - "src": "3210:1:8" + "src": "3231:1:8" } ], - "id": 1398, + "id": 1402, "name": "BinaryOperation", - "src": "3190:21:8" + "src": "3211:21:8" }, { "attributes": { @@ -10035,19 +10219,19 @@ "type": "literal_string \"newStateCommitHash cannot be zero\"", "value": "newStateCommitHash cannot be zero" }, - "id": 1399, + "id": 1403, "name": "Literal", - "src": "3213:35:8" + "src": "3234:35:8" } ], - "id": 1400, + "id": 1404, "name": "FunctionCall", - "src": "3182:67:8" + "src": "3203:67:8" } ], - "id": 1401, + "id": 1405, "name": "ExpressionStatement", - "src": "3182:67:8" + "src": "3203:67:8" }, { "children": [ @@ -10082,9 +10266,9 @@ "type": "function (bool) pure", "value": "require" }, - "id": 1402, + "id": 1406, "name": "Identifier", - "src": "3253:7:8" + "src": "3274:7:8" }, { "attributes": { @@ -10116,26 +10300,26 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1525, + "referencedDeclaration": 1531, "type": "function (bytes32,address) returns (bool)", "value": "isOwner" }, - "id": 1403, + "id": 1407, "name": "Identifier", - "src": "3261:7:8" + "src": "3282:7:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1370, + "referencedDeclaration": 1374, "type": "bytes32", "value": "UAI" }, - "id": 1404, + "id": 1408, "name": "Identifier", - "src": "3269:3:8" + "src": "3290:3:8" }, { "attributes": { @@ -10156,29 +10340,29 @@ "type": "msg", "value": "msg" }, - "id": 1405, + "id": 1409, "name": "Identifier", - "src": "3273:3:8" + "src": "3294:3:8" } ], - "id": 1406, + "id": 1410, "name": "MemberAccess", - "src": "3273:10:8" + "src": "3294:10:8" } ], - "id": 1407, + "id": 1411, "name": "FunctionCall", - "src": "3261:23:8" + "src": "3282:23:8" } ], - "id": 1408, + "id": 1412, "name": "FunctionCall", - "src": "3253:32:8" + "src": "3274:32:8" } ], - "id": 1409, + "id": 1413, "name": "ExpressionStatement", - "src": "3253:32:8" + "src": "3274:32:8" }, { "children": [ @@ -10208,6 +10392,10 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" @@ -10222,8 +10410,8 @@ "isPure": false, "lValueRequested": false, "member_name": "createAssertionRecord", - "referencedDeclaration": 1016, - "type": "function (bytes32,bytes32,uint256,uint256) external" + "referencedDeclaration": 1015, + "type": "function (bytes32,bytes32,address,uint256,uint256) external" }, "children": [ { @@ -10231,44 +10419,72 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1160, + "referencedDeclaration": 1159, "type": "contract DKGcontract", "value": "AssertionRegistry" }, - "id": 1410, + "id": 1414, "name": "Identifier", - "src": "3292:17:8" + "src": "3313:17:8" } ], - "id": 1412, + "id": 1416, "name": "MemberAccess", - "src": "3292:39:8" + "src": "3313:39:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1372, + "referencedDeclaration": 1376, "type": "bytes32", "value": "newStateCommitHash" }, - "id": 1413, + "id": 1417, "name": "Identifier", - "src": "3332:18:8" + "src": "3353:18:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1374, + "referencedDeclaration": 1378, "type": "bytes32", "value": "rootHash" }, - "id": 1414, + "id": 1418, "name": "Identifier", - "src": "3352:8:8" + "src": "3373:8:8" + }, + { + "attributes": { + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "type": "address payable" + }, + "children": [ + { + "attributes": { + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 4294967281, + "type": "msg", + "value": "msg" + }, + "id": 1419, + "name": "Identifier", + "src": "3383:3:8" + } + ], + "id": 1420, + "name": "MemberAccess", + "src": "3383:10:8" }, { "attributes": { @@ -10281,9 +10497,9 @@ "type": "int_const 1", "value": "1" }, - "id": 1415, + "id": 1421, "name": "Literal", - "src": "3362:1:8" + "src": "3395:1:8" }, { "attributes": { @@ -10296,19 +10512,19 @@ "type": "int_const 1", "value": "1" }, - "id": 1416, + "id": 1422, "name": "Literal", - "src": "3365:1:8" + "src": "3398:1:8" } ], - "id": 1417, + "id": 1423, "name": "FunctionCall", - "src": "3292:75:8" + "src": "3313:87:8" } ], - "id": 1418, + "id": 1424, "name": "ExpressionStatement", - "src": "3292:75:8" + "src": "3313:87:8" }, { "children": [ @@ -10329,7 +10545,7 @@ "isPure": false, "lValueRequested": true, "member_name": "stateCommitHash", - "referencedDeclaration": 1172, + "referencedDeclaration": 1171, "type": "bytes32" }, "children": [ @@ -10347,59 +10563,59 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1177, + "referencedDeclaration": 1176, "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", "value": "assetRecords" }, - "id": 1419, + "id": 1425, "name": "Identifier", - "src": "3381:12:8" + "src": "3414:12:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1370, + "referencedDeclaration": 1374, "type": "bytes32", "value": "UAI" }, - "id": 1420, + "id": 1426, "name": "Identifier", - "src": "3394:3:8" + "src": "3427:3:8" } ], - "id": 1421, + "id": 1427, "name": "IndexAccess", - "src": "3381:17:8" + "src": "3414:17:8" } ], - "id": 1422, + "id": 1428, "name": "MemberAccess", - "src": "3381:33:8" + "src": "3414:33:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1372, + "referencedDeclaration": 1376, "type": "bytes32", "value": "newStateCommitHash" }, - "id": 1423, + "id": 1429, "name": "Identifier", - "src": "3418:18:8" + "src": "3451:18:8" } ], - "id": 1424, + "id": 1430, "name": "Assignment", - "src": "3381:55:8" + "src": "3414:55:8" } ], - "id": 1425, + "id": 1431, "name": "ExpressionStatement", - "src": "3381:55:8" + "src": "3414:55:8" }, { "children": [ @@ -10433,53 +10649,53 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1201, + "referencedDeclaration": 1200, "type": "function (bytes32,bytes32)", "value": "UAIUpdatedState" }, - "id": 1426, + "id": 1432, "name": "Identifier", - "src": "3485:15:8" + "src": "3518:15:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1370, + "referencedDeclaration": 1374, "type": "bytes32", "value": "UAI" }, - "id": 1427, + "id": 1433, "name": "Identifier", - "src": "3501:3:8" + "src": "3534:3:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1372, + "referencedDeclaration": 1376, "type": "bytes32", "value": "newStateCommitHash" }, - "id": 1428, + "id": 1434, "name": "Identifier", - "src": "3506:18:8" + "src": "3539:18:8" } ], - "id": 1429, + "id": 1435, "name": "FunctionCall", - "src": "3485:40:8" + "src": "3518:40:8" } ], - "id": 1430, + "id": 1436, "name": "EmitStatement", - "src": "3480:45:8" + "src": "3513:45:8" }, { "attributes": { - "functionReturnParameters": 1378 + "functionReturnParameters": 1382 }, "children": [ { @@ -10487,28 +10703,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1370, + "referencedDeclaration": 1374, "type": "bytes32", "value": "UAI" }, - "id": 1431, + "id": 1437, "name": "Identifier", - "src": "3537:3:8" + "src": "3570:3:8" } ], - "id": 1432, + "id": 1438, "name": "Return", - "src": "3530:10:8" + "src": "3563:10:8" } ], - "id": 1433, + "id": 1439, "name": "Block", - "src": "3080:464:8" + "src": "3101:476:8" } ], - "id": 1434, + "id": 1440, "name": "FunctionDefinition", - "src": "2970:574:8" + "src": "2991:586:8" }, { "attributes": { @@ -10520,7 +10736,7 @@ null ], "name": "getAssetStateCommitHash", - "scope": 1604, + "scope": 1610, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -10533,7 +10749,7 @@ "constant": false, "mutability": "mutable", "name": "UAI", - "scope": 1447, + "scope": 1453, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -10545,19 +10761,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1435, + "id": 1441, "name": "ElementaryTypeName", - "src": "3593:7:8" + "src": "3626:7:8" } ], - "id": 1436, + "id": 1442, "name": "VariableDeclaration", - "src": "3593:11:8" + "src": "3626:11:8" } ], - "id": 1437, + "id": 1443, "name": "ParameterList", - "src": "3592:13:8" + "src": "3625:13:8" }, { "children": [ @@ -10566,7 +10782,7 @@ "constant": false, "mutability": "mutable", "name": "stateCommitHash", - "scope": 1447, + "scope": 1453, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -10578,25 +10794,25 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1438, + "id": 1444, "name": "ElementaryTypeName", - "src": "3626:7:8" + "src": "3659:7:8" } ], - "id": 1439, + "id": 1445, "name": "VariableDeclaration", - "src": "3626:23:8" + "src": "3659:23:8" } ], - "id": 1440, + "id": 1446, "name": "ParameterList", - "src": "3625:25:8" + "src": "3658:25:8" }, { "children": [ { "attributes": { - "functionReturnParameters": 1440 + "functionReturnParameters": 1446 }, "children": [ { @@ -10606,7 +10822,7 @@ "isPure": false, "lValueRequested": false, "member_name": "stateCommitHash", - "referencedDeclaration": 1172, + "referencedDeclaration": 1171, "type": "bytes32" }, "children": [ @@ -10624,51 +10840,51 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1177, + "referencedDeclaration": 1176, "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", "value": "assetRecords" }, - "id": 1441, + "id": 1447, "name": "Identifier", - "src": "3661:12:8" + "src": "3694:12:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1436, + "referencedDeclaration": 1442, "type": "bytes32", "value": "UAI" }, - "id": 1442, + "id": 1448, "name": "Identifier", - "src": "3674:3:8" + "src": "3707:3:8" } ], - "id": 1443, + "id": 1449, "name": "IndexAccess", - "src": "3661:17:8" + "src": "3694:17:8" } ], - "id": 1444, + "id": 1450, "name": "MemberAccess", - "src": "3661:33:8" + "src": "3694:33:8" } ], - "id": 1445, + "id": 1451, "name": "Return", - "src": "3654:40:8" + "src": "3687:40:8" } ], - "id": 1446, + "id": 1452, "name": "Block", - "src": "3650:48:8" + "src": "3683:48:8" } ], - "id": 1447, + "id": 1453, "name": "FunctionDefinition", - "src": "3560:138:8" + "src": "3593:138:8" }, { "attributes": { @@ -10680,7 +10896,7 @@ null ], "name": "getAssetController", - "scope": 1604, + "scope": 1610, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -10693,7 +10909,7 @@ "constant": false, "mutability": "mutable", "name": "UAI", - "scope": 1460, + "scope": 1466, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -10705,19 +10921,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1448, + "id": 1454, "name": "ElementaryTypeName", - "src": "3729:7:8" + "src": "3762:7:8" } ], - "id": 1449, + "id": 1455, "name": "VariableDeclaration", - "src": "3729:11:8" + "src": "3762:11:8" } ], - "id": 1450, + "id": 1456, "name": "ParameterList", - "src": "3728:13:8" + "src": "3761:13:8" }, { "children": [ @@ -10726,7 +10942,7 @@ "constant": false, "mutability": "mutable", "name": "controller", - "scope": 1460, + "scope": 1466, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -10739,25 +10955,25 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1451, + "id": 1457, "name": "ElementaryTypeName", - "src": "3762:7:8" + "src": "3795:7:8" } ], - "id": 1452, + "id": 1458, "name": "VariableDeclaration", - "src": "3762:18:8" + "src": "3795:18:8" } ], - "id": 1453, + "id": 1459, "name": "ParameterList", - "src": "3761:20:8" + "src": "3794:20:8" }, { "children": [ { "attributes": { - "functionReturnParameters": 1453 + "functionReturnParameters": 1459 }, "children": [ { @@ -10767,7 +10983,7 @@ "isPure": false, "lValueRequested": false, "member_name": "controller", - "referencedDeclaration": 1170, + "referencedDeclaration": 1169, "type": "address" }, "children": [ @@ -10785,51 +11001,51 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1177, + "referencedDeclaration": 1176, "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", "value": "assetRecords" }, - "id": 1454, + "id": 1460, "name": "Identifier", - "src": "3792:12:8" + "src": "3825:12:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1449, + "referencedDeclaration": 1455, "type": "bytes32", "value": "UAI" }, - "id": 1455, + "id": 1461, "name": "Identifier", - "src": "3805:3:8" + "src": "3838:3:8" } ], - "id": 1456, + "id": 1462, "name": "IndexAccess", - "src": "3792:17:8" + "src": "3825:17:8" } ], - "id": 1457, + "id": 1463, "name": "MemberAccess", - "src": "3792:28:8" + "src": "3825:28:8" } ], - "id": 1458, + "id": 1464, "name": "Return", - "src": "3785:35:8" + "src": "3818:35:8" } ], - "id": 1459, + "id": 1465, "name": "Block", - "src": "3781:43:8" + "src": "3814:43:8" } ], - "id": 1460, + "id": 1466, "name": "FunctionDefinition", - "src": "3701:123:8" + "src": "3734:123:8" }, { "attributes": { @@ -10841,7 +11057,7 @@ null ], "name": "getAssetAKA", - "scope": 1604, + "scope": 1610, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -10854,7 +11070,7 @@ "constant": false, "mutability": "mutable", "name": "UAI", - "scope": 1473, + "scope": 1479, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -10866,19 +11082,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1461, + "id": 1467, "name": "ElementaryTypeName", - "src": "3848:7:8" + "src": "3881:7:8" } ], - "id": 1462, + "id": 1468, "name": "VariableDeclaration", - "src": "3848:11:8" + "src": "3881:11:8" } ], - "id": 1463, + "id": 1469, "name": "ParameterList", - "src": "3847:13:8" + "src": "3880:13:8" }, { "children": [ @@ -10887,7 +11103,7 @@ "constant": false, "mutability": "mutable", "name": "alsoKnownAs", - "scope": 1473, + "scope": 1479, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -10899,25 +11115,25 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1464, + "id": 1470, "name": "ElementaryTypeName", - "src": "3881:7:8" + "src": "3914:7:8" } ], - "id": 1465, + "id": 1471, "name": "VariableDeclaration", - "src": "3881:19:8" + "src": "3914:19:8" } ], - "id": 1466, + "id": 1472, "name": "ParameterList", - "src": "3880:21:8" + "src": "3913:21:8" }, { "children": [ { "attributes": { - "functionReturnParameters": 1466 + "functionReturnParameters": 1472 }, "children": [ { @@ -10927,7 +11143,7 @@ "isPure": false, "lValueRequested": false, "member_name": "alsoKnownAs", - "referencedDeclaration": 1166, + "referencedDeclaration": 1165, "type": "bytes32" }, "children": [ @@ -10945,51 +11161,51 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1177, + "referencedDeclaration": 1176, "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", "value": "assetRecords" }, - "id": 1467, + "id": 1473, "name": "Identifier", - "src": "3912:12:8" + "src": "3945:12:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1462, + "referencedDeclaration": 1468, "type": "bytes32", "value": "UAI" }, - "id": 1468, + "id": 1474, "name": "Identifier", - "src": "3925:3:8" + "src": "3958:3:8" } ], - "id": 1469, + "id": 1475, "name": "IndexAccess", - "src": "3912:17:8" + "src": "3945:17:8" } ], - "id": 1470, + "id": 1476, "name": "MemberAccess", - "src": "3912:29:8" + "src": "3945:29:8" } ], - "id": 1471, + "id": 1477, "name": "Return", - "src": "3905:36:8" + "src": "3938:36:8" } ], - "id": 1472, + "id": 1478, "name": "Block", - "src": "3901:44:8" + "src": "3934:44:8" } ], - "id": 1473, + "id": 1479, "name": "FunctionDefinition", - "src": "3827:118:8" + "src": "3860:118:8" }, { "attributes": { @@ -11001,7 +11217,7 @@ null ], "name": "getAssetCreationTimestamp", - "scope": 1604, + "scope": 1610, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -11014,7 +11230,7 @@ "constant": false, "mutability": "mutable", "name": "UAI", - "scope": 1486, + "scope": 1492, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -11026,19 +11242,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1474, + "id": 1480, "name": "ElementaryTypeName", - "src": "3983:7:8" + "src": "4016:7:8" } ], - "id": 1475, + "id": 1481, "name": "VariableDeclaration", - "src": "3983:11:8" + "src": "4016:11:8" } ], - "id": 1476, + "id": 1482, "name": "ParameterList", - "src": "3982:13:8" + "src": "4015:13:8" }, { "children": [ @@ -11047,7 +11263,7 @@ "constant": false, "mutability": "mutable", "name": "creationTimestamp", - "scope": 1486, + "scope": 1492, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -11059,25 +11275,25 @@ "name": "uint256", "type": "uint256" }, - "id": 1477, + "id": 1483, "name": "ElementaryTypeName", - "src": "4016:7:8" + "src": "4049:7:8" } ], - "id": 1478, + "id": 1484, "name": "VariableDeclaration", - "src": "4016:25:8" + "src": "4049:25:8" } ], - "id": 1479, + "id": 1485, "name": "ParameterList", - "src": "4015:27:8" + "src": "4048:27:8" }, { "children": [ { "attributes": { - "functionReturnParameters": 1479 + "functionReturnParameters": 1485 }, "children": [ { @@ -11087,7 +11303,7 @@ "isPure": false, "lValueRequested": false, "member_name": "creationTimestamp", - "referencedDeclaration": 1164, + "referencedDeclaration": 1163, "type": "uint256" }, "children": [ @@ -11105,51 +11321,51 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1177, + "referencedDeclaration": 1176, "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", "value": "assetRecords" }, - "id": 1480, + "id": 1486, "name": "Identifier", - "src": "4053:12:8" + "src": "4086:12:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1475, + "referencedDeclaration": 1481, "type": "bytes32", "value": "UAI" }, - "id": 1481, + "id": 1487, "name": "Identifier", - "src": "4066:3:8" + "src": "4099:3:8" } ], - "id": 1482, + "id": 1488, "name": "IndexAccess", - "src": "4053:17:8" + "src": "4086:17:8" } ], - "id": 1483, + "id": 1489, "name": "MemberAccess", - "src": "4053:35:8" + "src": "4086:35:8" } ], - "id": 1484, + "id": 1490, "name": "Return", - "src": "4046:42:8" + "src": "4079:42:8" } ], - "id": 1485, + "id": 1491, "name": "Block", - "src": "4042:50:8" + "src": "4075:50:8" } ], - "id": 1486, + "id": 1492, "name": "FunctionDefinition", - "src": "3948:144:8" + "src": "3981:144:8" }, { "attributes": { @@ -11161,7 +11377,7 @@ null ], "name": "getAssertionRegistry", - "scope": 1604, + "scope": 1610, "stateMutability": "view", "virtual": false, "visibility": "public" @@ -11174,9 +11390,9 @@ ] }, "children": [], - "id": 1487, + "id": 1493, "name": "ParameterList", - "src": "4124:2:8" + "src": "4157:2:8" }, { "children": [ @@ -11185,7 +11401,7 @@ "constant": false, "mutability": "mutable", "name": "assertionRegistry", - "scope": 1494, + "scope": 1500, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -11198,25 +11414,25 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1488, + "id": 1494, "name": "ElementaryTypeName", - "src": "4147:7:8" + "src": "4180:7:8" } ], - "id": 1489, + "id": 1495, "name": "VariableDeclaration", - "src": "4147:25:8" + "src": "4180:25:8" } ], - "id": 1490, + "id": 1496, "name": "ParameterList", - "src": "4146:27:8" + "src": "4179:27:8" }, { "children": [ { "attributes": { - "functionReturnParameters": 1490 + "functionReturnParameters": 1496 }, "children": [ { @@ -11224,28 +11440,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1162, + "referencedDeclaration": 1161, "type": "address", "value": "AssertionRegistryAddress" }, - "id": 1491, + "id": 1497, "name": "Identifier", - "src": "4184:24:8" + "src": "4217:24:8" } ], - "id": 1492, + "id": 1498, "name": "Return", - "src": "4177:31:8" + "src": "4210:31:8" } ], - "id": 1493, + "id": 1499, "name": "Block", - "src": "4173:39:8" + "src": "4206:39:8" } ], - "id": 1494, + "id": 1500, "name": "FunctionDefinition", - "src": "4095:117:8" + "src": "4128:117:8" }, { "attributes": { @@ -11256,7 +11472,7 @@ null ], "name": "determineType", - "scope": 1604, + "scope": 1610, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" @@ -11266,9 +11482,9 @@ "attributes": { "text": " @dev Should determine type of ``contractAddress``, if possible, returning enum AssetType" }, - "id": 1495, + "id": 1501, "name": "StructuredDocumentation", - "src": "4230:107:8" + "src": "4263:107:8" }, { "children": [ @@ -11277,7 +11493,7 @@ "constant": false, "mutability": "mutable", "name": "contractAddress", - "scope": 1507, + "scope": 1513, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -11290,21 +11506,21 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1496, + "id": 1502, "name": "ElementaryTypeName", - "src": "4366:7:8" + "src": "4399:7:8" } ], - "id": 1497, + "id": 1503, "name": "VariableDeclaration", - "src": "4366:23:8" + "src": "4399:23:8" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "id", - "scope": 1507, + "scope": 1513, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -11316,19 +11532,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1498, + "id": 1504, "name": "ElementaryTypeName", - "src": "4391:7:8" + "src": "4424:7:8" } ], - "id": 1499, + "id": 1505, "name": "VariableDeclaration", - "src": "4391:10:8" + "src": "4424:10:8" } ], - "id": 1500, + "id": 1506, "name": "ParameterList", - "src": "4365:37:8" + "src": "4398:37:8" }, { "children": [ @@ -11337,7 +11553,7 @@ "constant": false, "mutability": "mutable", "name": "", - "scope": 1507, + "scope": 1513, "stateVariable": false, "storageLocation": "default", "type": "uint8", @@ -11349,25 +11565,25 @@ "name": "uint8", "type": "uint8" }, - "id": 1501, + "id": 1507, "name": "ElementaryTypeName", - "src": "4421:5:8" + "src": "4454:5:8" } ], - "id": 1502, + "id": 1508, "name": "VariableDeclaration", - "src": "4421:5:8" + "src": "4454:5:8" } ], - "id": 1503, + "id": 1509, "name": "ParameterList", - "src": "4420:7:8" + "src": "4453:7:8" }, { "children": [ { "attributes": { - "functionReturnParameters": 1503 + "functionReturnParameters": 1509 }, "children": [ { @@ -11381,24 +11597,24 @@ "type": "int_const 0", "value": "0" }, - "id": 1504, + "id": 1510, "name": "Literal", - "src": "4438:1:8" + "src": "4471:1:8" } ], - "id": 1505, + "id": 1511, "name": "Return", - "src": "4431:8:8" + "src": "4464:8:8" } ], - "id": 1506, + "id": 1512, "name": "Block", - "src": "4427:62:8" + "src": "4460:62:8" } ], - "id": 1507, + "id": 1513, "name": "FunctionDefinition", - "src": "4343:146:8" + "src": "4376:146:8" }, { "attributes": { @@ -11409,7 +11625,7 @@ null ], "name": "isOwner", - "scope": 1604, + "scope": 1610, "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" @@ -11419,9 +11635,9 @@ "attributes": { "text": " @dev Returns bool checking if ``owner`` is controller of ``UAI``" }, - "id": 1508, + "id": 1514, "name": "StructuredDocumentation", - "src": "4492:83:8" + "src": "4525:83:8" }, { "children": [ @@ -11430,7 +11646,7 @@ "constant": false, "mutability": "mutable", "name": "UAI", - "scope": 1525, + "scope": 1531, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -11442,21 +11658,21 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1509, + "id": 1515, "name": "ElementaryTypeName", - "src": "4598:7:8" + "src": "4631:7:8" } ], - "id": 1510, + "id": 1516, "name": "VariableDeclaration", - "src": "4598:11:8" + "src": "4631:11:8" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "owner", - "scope": 1525, + "scope": 1531, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -11469,19 +11685,19 @@ "stateMutability": "nonpayable", "type": "address" }, - "id": 1511, + "id": 1517, "name": "ElementaryTypeName", - "src": "4611:7:8" + "src": "4644:7:8" } ], - "id": 1512, + "id": 1518, "name": "VariableDeclaration", - "src": "4611:13:8" + "src": "4644:13:8" } ], - "id": 1513, + "id": 1519, "name": "ParameterList", - "src": "4597:28:8" + "src": "4630:28:8" }, { "children": [ @@ -11490,7 +11706,7 @@ "constant": false, "mutability": "mutable", "name": "", - "scope": 1525, + "scope": 1531, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -11502,25 +11718,25 @@ "name": "bool", "type": "bool" }, - "id": 1514, + "id": 1520, "name": "ElementaryTypeName", - "src": "4644:4:8" + "src": "4677:4:8" } ], - "id": 1515, + "id": 1521, "name": "VariableDeclaration", - "src": "4644:4:8" + "src": "4677:4:8" } ], - "id": 1516, + "id": 1522, "name": "ParameterList", - "src": "4643:6:8" + "src": "4676:6:8" }, { "children": [ { "attributes": { - "functionReturnParameters": 1516 + "functionReturnParameters": 1522 }, "children": [ { @@ -11542,13 +11758,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1512, + "referencedDeclaration": 1518, "type": "address", "value": "owner" }, - "id": 1517, + "id": 1523, "name": "Identifier", - "src": "4665:5:8" + "src": "4698:5:8" }, { "attributes": { @@ -11557,7 +11773,7 @@ "isPure": false, "lValueRequested": false, "member_name": "controller", - "referencedDeclaration": 1170, + "referencedDeclaration": 1169, "type": "address" }, "children": [ @@ -11575,56 +11791,56 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1177, + "referencedDeclaration": 1176, "type": "mapping(bytes32 => struct UAIRegistry.AssetRecord storage ref)", "value": "assetRecords" }, - "id": 1518, + "id": 1524, "name": "Identifier", - "src": "4674:12:8" + "src": "4707:12:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1510, + "referencedDeclaration": 1516, "type": "bytes32", "value": "UAI" }, - "id": 1519, + "id": 1525, "name": "Identifier", - "src": "4687:3:8" + "src": "4720:3:8" } ], - "id": 1520, + "id": 1526, "name": "IndexAccess", - "src": "4674:17:8" + "src": "4707:17:8" } ], - "id": 1521, + "id": 1527, "name": "MemberAccess", - "src": "4674:28:8" + "src": "4707:28:8" } ], - "id": 1522, + "id": 1528, "name": "BinaryOperation", - "src": "4665:37:8" + "src": "4698:37:8" } ], - "id": 1523, + "id": 1529, "name": "Return", - "src": "4658:44:8" + "src": "4691:44:8" } ], - "id": 1524, + "id": 1530, "name": "Block", - "src": "4650:60:8" + "src": "4683:60:8" } ], - "id": 1525, + "id": 1531, "name": "FunctionDefinition", - "src": "4581:129:8" + "src": "4614:129:8" }, { "attributes": { @@ -11636,7 +11852,7 @@ null ], "name": "depositTokens", - "scope": 1604, + "scope": 1610, "stateMutability": "nonpayable", "virtual": false, "visibility": "public" @@ -11646,9 +11862,9 @@ "attributes": { "text": " @dev Deposits tokens in ``amount`` to specific ``UAI``" }, - "id": 1526, + "id": 1532, "name": "StructuredDocumentation", - "src": "4713:73:8" + "src": "4746:73:8" }, { "children": [ @@ -11657,7 +11873,7 @@ "constant": false, "mutability": "mutable", "name": "amount", - "scope": 1603, + "scope": 1609, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -11669,21 +11885,21 @@ "name": "uint256", "type": "uint256" }, - "id": 1527, + "id": 1533, "name": "ElementaryTypeName", - "src": "4815:7:8" + "src": "4848:7:8" } ], - "id": 1528, + "id": 1534, "name": "VariableDeclaration", - "src": "4815:14:8" + "src": "4848:14:8" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "UAI", - "scope": 1603, + "scope": 1609, "stateVariable": false, "storageLocation": "default", "type": "bytes32", @@ -11695,19 +11911,19 @@ "name": "bytes32", "type": "bytes32" }, - "id": 1529, + "id": 1535, "name": "ElementaryTypeName", - "src": "4831:7:8" + "src": "4864:7:8" } ], - "id": 1530, + "id": 1536, "name": "VariableDeclaration", - "src": "4831:11:8" + "src": "4864:11:8" } ], - "id": 1531, + "id": 1537, "name": "ParameterList", - "src": "4814:29:8" + "src": "4847:29:8" }, { "attributes": { @@ -11716,9 +11932,9 @@ ] }, "children": [], - "id": 1532, + "id": 1538, "name": "ParameterList", - "src": "4851:0:8" + "src": "4884:0:8" }, { "children": [ @@ -11759,9 +11975,9 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1533, + "id": 1539, "name": "Identifier", - "src": "4860:7:8" + "src": "4893:7:8" }, { "attributes": { @@ -11782,13 +11998,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1528, + "referencedDeclaration": 1534, "type": "uint256", "value": "amount" }, - "id": 1534, + "id": 1540, "name": "Identifier", - "src": "4868:6:8" + "src": "4901:6:8" }, { "attributes": { @@ -11801,14 +12017,14 @@ "type": "int_const 0", "value": "0" }, - "id": 1535, + "id": 1541, "name": "Literal", - "src": "4875:1:8" + "src": "4908:1:8" } ], - "id": 1536, + "id": 1542, "name": "BinaryOperation", - "src": "4868:8:8" + "src": "4901:8:8" }, { "attributes": { @@ -11821,19 +12037,19 @@ "type": "literal_string \"Amount cannot be zero\"", "value": "Amount cannot be zero" }, - "id": 1537, + "id": 1543, "name": "Literal", - "src": "4878:23:8" + "src": "4911:23:8" } ], - "id": 1538, + "id": 1544, "name": "FunctionCall", - "src": "4860:42:8" + "src": "4893:42:8" } ], - "id": 1539, + "id": 1545, "name": "ExpressionStatement", - "src": "4860:42:8" + "src": "4893:42:8" }, { "children": [ @@ -11872,9 +12088,9 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1540, + "id": 1546, "name": "Identifier", - "src": "4910:7:8" + "src": "4943:7:8" }, { "attributes": { @@ -11931,18 +12147,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1158, + "referencedDeclaration": 1157, "type": "contract IERC20", "value": "token" }, - "id": 1541, + "id": 1547, "name": "Identifier", - "src": "4918:5:8" + "src": "4951:5:8" } ], - "id": 1542, + "id": 1548, "name": "MemberAccess", - "src": "4918:15:8" + "src": "4951:15:8" }, { "attributes": { @@ -11963,14 +12179,14 @@ "type": "msg", "value": "msg" }, - "id": 1543, + "id": 1549, "name": "Identifier", - "src": "4934:3:8" + "src": "4967:3:8" } ], - "id": 1544, + "id": 1550, "name": "MemberAccess", - "src": "4934:10:8" + "src": "4967:10:8" }, { "attributes": { @@ -11991,7 +12207,7 @@ "attributes": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_UAIRegistry_$1604", + "typeIdentifier": "t_contract$_UAIRegistry_$1610", "typeString": "contract UAIRegistry" } ], @@ -12006,14 +12222,14 @@ "attributes": { "name": "address" }, - "id": 1545, + "id": 1551, "name": "ElementaryTypeName", - "src": "4946:7:8" + "src": "4979:7:8" } ], - "id": 1546, + "id": 1552, "name": "ElementaryTypeNameExpression", - "src": "4946:7:8" + "src": "4979:7:8" }, { "attributes": { @@ -12024,37 +12240,37 @@ "type": "contract UAIRegistry", "value": "this" }, - "id": 1547, + "id": 1553, "name": "Identifier", - "src": "4954:4:8" + "src": "4987:4:8" } ], - "id": 1548, + "id": 1554, "name": "FunctionCall", - "src": "4946:13:8" + "src": "4979:13:8" } ], - "id": 1549, + "id": 1555, "name": "FunctionCall", - "src": "4918:42:8" + "src": "4951:42:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1528, + "referencedDeclaration": 1534, "type": "uint256", "value": "amount" }, - "id": 1550, + "id": 1556, "name": "Identifier", - "src": "4964:6:8" + "src": "4997:6:8" } ], - "id": 1551, + "id": 1557, "name": "BinaryOperation", - "src": "4918:52:8" + "src": "4951:52:8" }, { "attributes": { @@ -12067,19 +12283,19 @@ "type": "literal_string \"Sender allowance must be equal to or higher than chosen amount\"", "value": "Sender allowance must be equal to or higher than chosen amount" }, - "id": 1552, + "id": 1558, "name": "Literal", - "src": "4972:64:8" + "src": "5005:64:8" } ], - "id": 1553, + "id": 1559, "name": "FunctionCall", - "src": "4910:127:8" + "src": "4943:127:8" } ], - "id": 1554, + "id": 1560, "name": "ExpressionStatement", - "src": "4910:127:8" + "src": "4943:127:8" }, { "children": [ @@ -12118,9 +12334,9 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1555, + "id": 1561, "name": "Identifier", - "src": "5045:7:8" + "src": "5078:7:8" }, { "attributes": { @@ -12173,18 +12389,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1158, + "referencedDeclaration": 1157, "type": "contract IERC20", "value": "token" }, - "id": 1556, + "id": 1562, "name": "Identifier", - "src": "5053:5:8" + "src": "5086:5:8" } ], - "id": 1557, + "id": 1563, "name": "MemberAccess", - "src": "5053:15:8" + "src": "5086:15:8" }, { "attributes": { @@ -12205,37 +12421,37 @@ "type": "msg", "value": "msg" }, - "id": 1558, + "id": 1564, "name": "Identifier", - "src": "5069:3:8" + "src": "5102:3:8" } ], - "id": 1559, + "id": 1565, "name": "MemberAccess", - "src": "5069:10:8" + "src": "5102:10:8" } ], - "id": 1560, + "id": 1566, "name": "FunctionCall", - "src": "5053:27:8" + "src": "5086:27:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1528, + "referencedDeclaration": 1534, "type": "uint256", "value": "amount" }, - "id": 1561, + "id": 1567, "name": "Identifier", - "src": "5084:6:8" + "src": "5117:6:8" } ], - "id": 1562, + "id": 1568, "name": "BinaryOperation", - "src": "5053:37:8" + "src": "5086:37:8" }, { "attributes": { @@ -12248,24 +12464,24 @@ "type": "literal_string \"Sender balance must be equal to or higher than chosen amount!\"", "value": "Sender balance must be equal to or higher than chosen amount!" }, - "id": 1563, + "id": 1569, "name": "Literal", - "src": "5092:63:8" + "src": "5125:63:8" } ], - "id": 1564, + "id": 1570, "name": "FunctionCall", - "src": "5045:111:8" + "src": "5078:111:8" } ], - "id": 1565, + "id": 1571, "name": "ExpressionStatement", - "src": "5045:111:8" + "src": "5078:111:8" }, { "attributes": { "assignments": [ - 1567 + 1573 ] }, "children": [ @@ -12274,7 +12490,7 @@ "constant": false, "mutability": "mutable", "name": "transaction_result", - "scope": 1602, + "scope": 1608, "stateVariable": false, "storageLocation": "default", "type": "bool", @@ -12286,14 +12502,14 @@ "name": "bool", "type": "bool" }, - "id": 1566, + "id": 1572, "name": "ElementaryTypeName", - "src": "5165:4:8" + "src": "5198:4:8" } ], - "id": 1567, + "id": 1573, "name": "VariableDeclaration", - "src": "5165:23:8" + "src": "5198:23:8" }, { "attributes": { @@ -12340,18 +12556,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1158, + "referencedDeclaration": 1157, "type": "contract IERC20", "value": "token" }, - "id": 1568, + "id": 1574, "name": "Identifier", - "src": "5191:5:8" + "src": "5224:5:8" } ], - "id": 1569, + "id": 1575, "name": "MemberAccess", - "src": "5191:18:8" + "src": "5224:18:8" }, { "attributes": { @@ -12372,14 +12588,14 @@ "type": "msg", "value": "msg" }, - "id": 1570, + "id": 1576, "name": "Identifier", - "src": "5210:3:8" + "src": "5243:3:8" } ], - "id": 1571, + "id": 1577, "name": "MemberAccess", - "src": "5210:10:8" + "src": "5243:10:8" }, { "attributes": { @@ -12400,7 +12616,7 @@ "attributes": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_UAIRegistry_$1604", + "typeIdentifier": "t_contract$_UAIRegistry_$1610", "typeString": "contract UAIRegistry" } ], @@ -12415,14 +12631,14 @@ "attributes": { "name": "address" }, - "id": 1572, + "id": 1578, "name": "ElementaryTypeName", - "src": "5222:7:8" + "src": "5255:7:8" } ], - "id": 1573, + "id": 1579, "name": "ElementaryTypeNameExpression", - "src": "5222:7:8" + "src": "5255:7:8" }, { "attributes": { @@ -12433,37 +12649,37 @@ "type": "contract UAIRegistry", "value": "this" }, - "id": 1574, + "id": 1580, "name": "Identifier", - "src": "5230:4:8" + "src": "5263:4:8" } ], - "id": 1575, + "id": 1581, "name": "FunctionCall", - "src": "5222:13:8" + "src": "5255:13:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1528, + "referencedDeclaration": 1534, "type": "uint256", "value": "amount" }, - "id": 1576, + "id": 1582, "name": "Identifier", - "src": "5237:6:8" + "src": "5270:6:8" } ], - "id": 1577, + "id": 1583, "name": "FunctionCall", - "src": "5191:53:8" + "src": "5224:53:8" } ], - "id": 1578, + "id": 1584, "name": "VariableDeclarationStatement", - "src": "5165:79:8" + "src": "5198:79:8" }, { "children": [ @@ -12502,22 +12718,22 @@ "type": "function (bool,string memory) pure", "value": "require" }, - "id": 1579, + "id": 1585, "name": "Identifier", - "src": "5252:7:8" + "src": "5285:7:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1567, + "referencedDeclaration": 1573, "type": "bool", "value": "transaction_result" }, - "id": 1580, + "id": 1586, "name": "Identifier", - "src": "5260:18:8" + "src": "5293:18:8" }, { "attributes": { @@ -12530,19 +12746,19 @@ "type": "literal_string \"Token transaction execution failed!\"", "value": "Token transaction execution failed!" }, - "id": 1581, + "id": 1587, "name": "Literal", - "src": "5280:37:8" + "src": "5313:37:8" } ], - "id": 1582, + "id": 1588, "name": "FunctionCall", - "src": "5252:66:8" + "src": "5285:66:8" } ], - "id": 1583, + "id": 1589, "name": "ExpressionStatement", - "src": "5252:66:8" + "src": "5285:66:8" }, { "children": [ @@ -12570,31 +12786,31 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1185, + "referencedDeclaration": 1184, "type": "mapping(bytes32 => uint256)", "value": "assetStake" }, - "id": 1584, + "id": 1590, "name": "Identifier", - "src": "5463:10:8" + "src": "5496:10:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1530, + "referencedDeclaration": 1536, "type": "bytes32", "value": "UAI" }, - "id": 1585, + "id": 1591, "name": "Identifier", - "src": "5474:3:8" + "src": "5507:3:8" } ], - "id": 1586, + "id": 1592, "name": "IndexAccess", - "src": "5463:15:8" + "src": "5496:15:8" }, { "attributes": { @@ -12642,64 +12858,64 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1185, + "referencedDeclaration": 1184, "type": "mapping(bytes32 => uint256)", "value": "assetStake" }, - "id": 1587, + "id": 1593, "name": "Identifier", - "src": "5481:10:8" + "src": "5514:10:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1530, + "referencedDeclaration": 1536, "type": "bytes32", "value": "UAI" }, - "id": 1588, + "id": 1594, "name": "Identifier", - "src": "5492:3:8" + "src": "5525:3:8" } ], - "id": 1589, + "id": 1595, "name": "IndexAccess", - "src": "5481:15:8" + "src": "5514:15:8" } ], - "id": 1590, + "id": 1596, "name": "MemberAccess", - "src": "5481:19:8" + "src": "5514:19:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1528, + "referencedDeclaration": 1534, "type": "uint256", "value": "amount" }, - "id": 1591, + "id": 1597, "name": "Identifier", - "src": "5501:6:8" + "src": "5534:6:8" } ], - "id": 1592, + "id": 1598, "name": "FunctionCall", - "src": "5481:27:8" + "src": "5514:27:8" } ], - "id": 1593, + "id": 1599, "name": "Assignment", - "src": "5463:45:8" + "src": "5496:45:8" } ], - "id": 1594, + "id": 1600, "name": "ExpressionStatement", - "src": "5463:45:8" + "src": "5496:45:8" }, { "children": [ @@ -12737,39 +12953,39 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 1209, + "referencedDeclaration": 1208, "type": "function (bytes32,uint256,address)", "value": "TokensDepositedToAsset" }, - "id": 1595, + "id": 1601, "name": "Identifier", - "src": "5517:22:8" + "src": "5550:22:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1530, + "referencedDeclaration": 1536, "type": "bytes32", "value": "UAI" }, - "id": 1596, + "id": 1602, "name": "Identifier", - "src": "5540:3:8" + "src": "5573:3:8" }, { "attributes": { "overloadedDeclarations": [ null ], - "referencedDeclaration": 1528, + "referencedDeclaration": 1534, "type": "uint256", "value": "amount" }, - "id": 1597, + "id": 1603, "name": "Identifier", - "src": "5545:6:8" + "src": "5578:6:8" }, { "attributes": { @@ -12790,44 +13006,44 @@ "type": "msg", "value": "msg" }, - "id": 1598, + "id": 1604, "name": "Identifier", - "src": "5552:3:8" + "src": "5585:3:8" } ], - "id": 1599, + "id": 1605, "name": "MemberAccess", - "src": "5552:10:8" + "src": "5585:10:8" } ], - "id": 1600, + "id": 1606, "name": "FunctionCall", - "src": "5517:46:8" + "src": "5550:46:8" } ], - "id": 1601, + "id": 1607, "name": "EmitStatement", - "src": "5512:51:8" + "src": "5545:51:8" } ], - "id": 1602, + "id": 1608, "name": "Block", - "src": "4851:717:8" + "src": "4884:717:8" } ], - "id": 1603, + "id": 1609, "name": "FunctionDefinition", - "src": "4792:776:8" + "src": "4825:776:8" } ], - "id": 1604, + "id": 1610, "name": "ContractDefinition", - "src": "623:4950:8" + "src": "623:4983:8" } ], - "id": 1605, + "id": 1611, "name": "SourceUnit", - "src": "0:5573:8" + "src": "0:5606:8" }, "compiler": { "name": "solc", @@ -12934,11 +13150,113 @@ }, "links": {}, "address": "0x04d5396358647Cd863293c156037D0AC02328c32", - "transactionHash": "0xc7edfcc3adbf8b60d4fe405679efc9f4b039fb3f416a36faac9de24be69826bf" + "transactionHash": "0x8cbcb3d1bfbc3e4962586b5f0527de00742bd6ca92e8e91ceef4f3c87ecc10da" + }, + "80001": { + "events": { + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + "0x2460c4e801cd784222555963fc8a1f1497f9ce3b23446fa14da62d3170989333": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "depositor", + "type": "address" + } + ], + "name": "TokensDepositedToAsset", + "type": "event" + }, + "0x2f87578a4aeec4a0b61bbcea1767fec00fa79a35cf600b258509e25acdaba8e7": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + } + ], + "name": "UAICreated", + "type": "event" + }, + "0x52db5c2cb9235be3e8a3fe47f4ec4bc55b5e28aa119b750b0e766b1cb00c9aa7": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "assertionRegistryAddress", + "type": "address" + } + ], + "name": "UAIRegistryInit", + "type": "event" + }, + "0xa83f066abfa07a77196c29bd4b7aab88f194feaa03d9769ec2ceccf6701d06de": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "UAI", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "stateCommitHash", + "type": "bytes32" + } + ], + "name": "UAIUpdatedState", + "type": "event" + } + }, + "links": {}, + "address": "0xFD6ECaed420aB70fb97eB2423780517dc425ef81", + "transactionHash": "0xf382f1e521d6a6c794bea0e3522669706b1afcf004e4c40876fe2e40214cab71" } }, "schemaVersion": "3.4.3", - "updatedAt": "2022-02-10T19:25:20.340Z", + "updatedAt": "2022-02-11T10:13:46.703Z", "networkType": "ethereum", "devdoc": { "kind": "dev", diff --git a/config/config.json b/config/config.json index 02fada2862..676cbf3572 100644 --- a/config/config.json +++ b/config/config.json @@ -8,11 +8,11 @@ }, "blockchain": [ { - "blockchainTitle": "Ganache", - "networkId": "ganache::mainnet", - "hubContractAddress": "0x04d5396358647Cd863293c156037D0AC02328c32", + "blockchainTitle": "Polygon", + "networkId": "polygon::mainnet", + "hubContractAddress": "0xFD6ECaed420aB70fb97eB2423780517dc425ef81", "rpcEndpoints": [ - "http://localhost:7545" + "https://rpc-mumbai.maticvigil.com/" ] } ], @@ -51,7 +51,7 @@ { "blockchainTitle": "Polygon", "networkId": "polygon::testnet", - "hubContractAddress": "0xFA421f2b10FBebaAeC281eb6734b0fA9Cc8dbbD7", + "hubContractAddress": "0xFD6ECaed420aB70fb97eB2423780517dc425ef81", "rpcEndpoints": [ "https://rpc-mumbai.maticvigil.com/" ] diff --git a/external/merkle-validation-service.js b/external/merkle-validation-service.js index 3556a7fa6b..5a5ab6881a 100644 --- a/external/merkle-validation-service.js +++ b/external/merkle-validation-service.js @@ -63,7 +63,6 @@ class MerkleValidationService { } calculateRootHash(assertion) { - console.log(assertion); const tree = new MerkleTools({ hashType: 'sha256', }); diff --git a/external/web3-blockchain-service.js b/external/web3-blockchain-service.js index 2f818013ed..544addbcb0 100644 --- a/external/web3-blockchain-service.js +++ b/external/web3-blockchain-service.js @@ -23,12 +23,12 @@ class Web3BlockchainService { return this.config.publicKey; } - async createAssertionRecord(stateCommitHash, rootHash) { + async createAssertionRecord(stateCommitHash, rootHash, issuer) { const contractAddress = await this.getAssertionRegistryAddress(); const contractInstance = new this.web3.eth.Contract(DKGContract, contractAddress); - const encodedABI = contractInstance.methods.createAssertionRecord(`0x${stateCommitHash}`, `0x${rootHash}`, + const encodedABI = contractInstance.methods.createAssertionRecord(`0x${stateCommitHash}`, `0x${rootHash}`, issuer, new BigNumber(1), new BigNumber(1)).encodeABI(); const tx = { @@ -54,7 +54,7 @@ class Web3BlockchainService { to: contractInstance.options.address, data: encodedABI, gasPrice: '2000000000', - gas: '500000', + gas: '900000', }; const createdTransaction = await this.web3.eth.accounts.signTransaction(tx, this.config.privateKey); diff --git a/frameDocuments/nft.json b/frameDocuments/nft.json new file mode 100644 index 0000000000..effeb60e73 --- /dev/null +++ b/frameDocuments/nft.json @@ -0,0 +1,4 @@ +{ + "context": {}, + "frame": {} +} \ No newline at end of file diff --git a/modules/command/publish/submit-proofs-command.js b/modules/command/publish/submit-proofs-command.js index 52540eb796..08b699947c 100644 --- a/modules/command/publish/submit-proofs-command.js +++ b/modules/command/publish/submit-proofs-command.js @@ -27,7 +27,7 @@ class SubmitProofsCommand extends Command { let result; switch (method) { case 'publish': - result = await this.blockchainService.createAssertionRecord(assertion.id, assertion.rootHash); + result = await this.blockchainService.createAssertionRecord(assertion.id, assertion.rootHash, assertion.metadata.issuer); break; case 'provision': result = await this.blockchainService.registerAsset(assertion.metadata.UALs[0],assertion.metadata.type,assertion.metadata.UALs[0],assertion.id, assertion.rootHash, 1); diff --git a/modules/constants.js b/modules/constants.js index cb67119495..abf145c427 100644 --- a/modules/constants.js +++ b/modules/constants.js @@ -1,4 +1,5 @@ exports.GS1EPCIS = 'gs1-epcis'; +exports.NFT = 'nft'; exports.MERKLE_TREE = 'Merkle Tree'; exports.BASIC = 'Basic'; exports.DID = 'DID'; diff --git a/modules/service/blockchain-service.js b/modules/service/blockchain-service.js index 0061c36119..5dff70d33a 100644 --- a/modules/service/blockchain-service.js +++ b/modules/service/blockchain-service.js @@ -29,8 +29,8 @@ class BlockchainService { return this.implementation.getPublicKey(); } - async createAssertionRecord(stateCommitHash, rootHash) { - return this.implementation.createAssertionRecord(stateCommitHash, rootHash); + async createAssertionRecord(stateCommitHash, rootHash, issuer) { + return this.implementation.createAssertionRecord(stateCommitHash, rootHash, issuer); } async registerAsset(uai, type, alsoKnownAs, stateCommitHash, rootHash, tokenAmount) { return this.implementation.registerAsset(uai, type, alsoKnownAs, stateCommitHash, rootHash, tokenAmount); diff --git a/modules/service/data-service.js b/modules/service/data-service.js index a75f0bc18a..cdf8c64c54 100644 --- a/modules/service/data-service.js +++ b/modules/service/data-service.js @@ -3,6 +3,7 @@ const N3 = require('n3'); const constants = require('../constants'); const GraphDB = require('../../external/graphdb-service'); const Blazegraph = require('../../external/blazegraph-service'); +const axios = require('axios'); class DataService { constructor(ctx) { @@ -167,7 +168,6 @@ class DataService { if (assertion.metadata.visibility) { if (assertion.metadata.UALs && (!options || (options && options.isAsset))){ - console.log(options); const {issuer, assertionId} = await this.blockchainService.getAssetProofs(assertion.metadata.UALs[0]); if (assertionId !== assertion.id) { this.logger.error({ @@ -187,21 +187,18 @@ class DataService { } } else{ const calculateRootHash = this.validationService.calculateRootHash([...new Set(rdf)]); - console.log(assertion.id); - const res = await this.blockchainService.getAssertionProofs(assertion.id); - console.log(res); - console.log(assertion.metadata); - if (res.rootHash !== `0x${calculateRootHash}`) { + const {rootHash, issuer} = await this.blockchainService.getAssertionProofs(assertion.id); + if (rootHash !== `0x${calculateRootHash}`) { this.logger.error({ - msg: `Root hash ${res.rootHash} doesn't match with calculated ${calculateRootHash}`, + msg: `Root hash ${rootHash} doesn't match with calculated 0x${calculateRootHash}`, Event_name: constants.ERROR_TYPE.VERIFY_ASSERTION_ERROR, Event_value1: 'Root hash not matching calculated', }); return resolve(false); } - if (res.issuer.toLowerCase() !== assertion.metadata.issuer.toLowerCase()) { + if (issuer.toLowerCase() !== assertion.metadata.issuer.toLowerCase()) { this.logger.error({ - msg: `Issuer ${res.issuer} doesn't match with received ${assertion.metadata.issuer}`, + msg: `Issuer ${issuer} doesn't match with received ${assertion.metadata.issuer}`, Event_name: constants.ERROR_TYPE.VERIFY_ASSERTION_ERROR, Event_value1: 'Issuer not matching', }); @@ -218,11 +215,9 @@ class DataService { async searchByQuery(query, options, localQuery = false) { try { - const assertions = await this.implementation.findAssetsByKeyword(query, options, localQuery); if (!assertions) return null; - const result = []; for (let assertion of assertions) { const assertionId = assertion.assertionId = assertion.assertionId.value.replace(`${constants.DID_PREFIX}:`, ''); @@ -407,6 +402,11 @@ class DataService { isA: 'EPCISDocument', }; break; + case this.constants.NFT: + const result = JSON.parse(await axios.get(`https://raw.githubusercontent.com/OriginTrail/ot-node/v6/develop/frameDocuments/${this.constants.NFT}.json`)); + context = result.context; + frame = result.frame; + break; default: context = { '@context': ['https://www.schema.org/'], From ba078017777d786520fd858a77a80b383f39abf3 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Fri, 11 Feb 2022 11:46:53 +0100 Subject: [PATCH 46/50] update nft link --- modules/service/data-service.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/service/data-service.js b/modules/service/data-service.js index cdf8c64c54..135d5c0571 100644 --- a/modules/service/data-service.js +++ b/modules/service/data-service.js @@ -403,9 +403,9 @@ class DataService { }; break; case this.constants.NFT: - const result = JSON.parse(await axios.get(`https://raw.githubusercontent.com/OriginTrail/ot-node/v6/develop/frameDocuments/${this.constants.NFT}.json`)); - context = result.context; - frame = result.frame; + const result = await axios.get(`https://raw.githubusercontent.com/OriginTrail/ot-node/v6/develop/frameDocuments/${this.constants.NFT}.json`); + context = result.data.context; + frame = result.data.frame; break; default: context = { From 8e14e05f214ad322374cfe322cf8a14f1c05995b Mon Sep 17 00:00:00 2001 From: zeroxbt Date: Fri, 11 Feb 2022 13:03:56 +0100 Subject: [PATCH 47/50] small fix to resolve route --- .gitignore | 3 +++ modules/service/query-service.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1316995926..fb21c0b564 100644 --- a/.gitignore +++ b/.gitignore @@ -106,4 +106,7 @@ dist # TernJS port file .tern-port +.DS_Store +package-lock.json + data diff --git a/modules/service/query-service.js b/modules/service/query-service.js index 91357d561b..bf475416d6 100644 --- a/modules/service/query-service.js +++ b/modules/service/query-service.js @@ -22,8 +22,8 @@ class QueryService { const status = await this.dataService.verifyAssertion(assertion.jsonld, assertion.nquads, {isAsset: isAssetRequested}); if (status && load) { - await this.dataService.insert(nquads.join('\n'), `${constants.DID_PREFIX}:${assertion.json.id}`); - this.logger.info(`Assertion ${assertion.json.id} has been successfully inserted`); + await this.dataService.insert(nquads.join('\n'), `${constants.DID_PREFIX}:${assertion.jsonld.metadata.id}`); + this.logger.info(`Assertion ${assertion.jsonld.metadata.id} has been successfully inserted`); } return status ? {assertion, isAsset} : null; } From 963dd5d27c1063cefea29fdaa3517b2fec87ba89 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Fri, 11 Feb 2022 13:06:39 +0100 Subject: [PATCH 48/50] Fix resolve returning locally queried assertion --- modules/controller/rpc-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/controller/rpc-controller.js b/modules/controller/rpc-controller.js index 81155ddcd7..e37505d12b 100644 --- a/modules/controller/rpc-controller.js +++ b/modules/controller/rpc-controller.js @@ -200,7 +200,7 @@ class RpcController { } const result = await this.dataService.resolve(id, true); - if (!(result && result.nquads)) { + if (result && result.nquads) { let {nquads} = result; let assertion = await this.dataService.createAssertion(nquads); assertion.jsonld.metadata = JSON.parse(sortedStringify(assertion.jsonld.metadata)) From 53b60fdb4a4c303a895ead7f5083be4f7556bbec Mon Sep 17 00:00:00 2001 From: NZT48 Date: Fri, 11 Feb 2022 14:39:21 +0100 Subject: [PATCH 49/50] Add context to nft frame document --- frameDocuments/nft.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frameDocuments/nft.json b/frameDocuments/nft.json index effeb60e73..dcdd86e1b5 100644 --- a/frameDocuments/nft.json +++ b/frameDocuments/nft.json @@ -1,4 +1,6 @@ { - "context": {}, + "context": { + "@context": ["https://www.schema.org/"] + }, "frame": {} -} \ No newline at end of file +} From a835e3802d97d8fe9560adb7963fad932dd6f717 Mon Sep 17 00:00:00 2001 From: NZT48 Date: Fri, 11 Feb 2022 14:57:56 +0100 Subject: [PATCH 50/50] Postman collection updated - removed api/latest --- postman/DKGv6.postman_collection.json | 123 +++----------------------- 1 file changed, 10 insertions(+), 113 deletions(-) diff --git a/postman/DKGv6.postman_collection.json b/postman/DKGv6.postman_collection.json index e062f6fa88..0b358e7617 100644 --- a/postman/DKGv6.postman_collection.json +++ b/postman/DKGv6.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "17f931a1-6044-4026-b9e4-207ef606463d", + "_postman_id": "de092a3d-311c-4c22-9fdb-1f1b777c8bbb", "name": "DKGv6", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -43,8 +43,6 @@ ], "port": "8900", "path": [ - "api", - "latest", "provision" ] } @@ -61,39 +59,18 @@ "header": [], "body": { "mode": "formdata", - "formdata": [ - { - "key": "topic", - "value": "blazard1", - "type": "text", - "disabled": true - }, - { - "key": "limit", - "value": "100", - "type": "text", - "disabled": true - }, - { - "key": "offset", - "value": "0", - "type": "text", - "disabled": true - } - ] + "formdata": [] }, "url": { - "raw": "{{HOST}}:8900/provision/result/940e2924-524e-4ed0-8379-503c5504552a", + "raw": "{{HOST}}:8900/provision/result/7f3c1fef-2588-45e6-b6f6-72f115da6553", "host": [ "{{HOST}}" ], "port": "8900", "path": [ - "api", - "latest", "provision", "result", - "940e2924-524e-4ed0-8379-503c5504552a" + "7f3c1fef-2588-45e6-b6f6-72f115da6553" ] } }, @@ -139,8 +116,6 @@ ], "port": "8900", "path": [ - "api", - "latest", "update" ] } @@ -157,37 +132,16 @@ "header": [], "body": { "mode": "formdata", - "formdata": [ - { - "key": "topic", - "value": "blazard1", - "type": "text", - "disabled": true - }, - { - "key": "limit", - "value": "100", - "type": "text", - "disabled": true - }, - { - "key": "offset", - "value": "0", - "type": "text", - "disabled": true - } - ] + "formdata": [] }, "url": { - "raw": "{{HOST}}:8900/provision/result/36f9c131-130f-4d41-86e4-7cc6781bb51c", + "raw": "{{HOST}}:8900/update/result/36f9c131-130f-4d41-86e4-7cc6781bb51c", "host": [ "{{HOST}}" ], "port": "8900", "path": [ - "api", - "latest", - "provision", + "update", "result", "36f9c131-130f-4d41-86e4-7cc6781bb51c" ] @@ -235,8 +189,6 @@ ], "port": "8900", "path": [ - "api", - "latest", "publish" ] } @@ -256,29 +208,15 @@ "formdata": [] }, "url": { - "raw": "{{HOST}}:8900/provision/result/c6c3b9af-0f3c-4324-b5bf-0181d49baa04", + "raw": "{{HOST}}:8900/publish/result/c6c3b9af-0f3c-4324-b5bf-0181d49baa04", "host": [ "{{HOST}}" ], "port": "8900", "path": [ - "api", - "latest", - "provision", + "publish", "result", "c6c3b9af-0f3c-4324-b5bf-0181d49baa04" - ], - "query": [ - { - "key": "ids", - "value": "axie", - "disabled": true - }, - { - "key": "types", - "value": "gs1-epcis", - "disabled": true - } ] } }, @@ -305,8 +243,6 @@ ], "port": "8900", "path": [ - "api", - "latest", "resolve" ], "query": [ @@ -342,8 +278,6 @@ ], "port": "8900", "path": [ - "api", - "latest", "resolve", "result", "22419c1a-d41d-4235-9849-e7e1a22edf4f" @@ -390,8 +324,6 @@ ], "port": "8900", "path": [ - "api", - "latest", "assertions:search" ], "query": [ @@ -424,26 +356,7 @@ "header": [], "body": { "mode": "formdata", - "formdata": [ - { - "key": "topic", - "value": "blazard1", - "type": "text", - "disabled": true - }, - { - "key": "limit", - "value": "100", - "type": "text", - "disabled": true - }, - { - "key": "offset", - "value": "0", - "type": "text", - "disabled": true - } - ] + "formdata": [] }, "url": { "raw": "{{HOST}}:8900/assertions:search/result/ccf90eba-4a45-4c47-81e0-1a2e1e679f70", @@ -452,8 +365,6 @@ ], "port": "8900", "path": [ - "api", - "latest", "assertions:search", "result", "ccf90eba-4a45-4c47-81e0-1a2e1e679f70" @@ -500,8 +411,6 @@ ], "port": "8900", "path": [ - "api", - "latest", "entities:search" ], "query": [ @@ -558,8 +467,6 @@ ], "port": "8900", "path": [ - "api", - "latest", "entities:search", "result", "b18a819d-d546-4bc2-95c1-242d78c094e7" @@ -590,8 +497,6 @@ ], "port": "8900", "path": [ - "api", - "latest", "query" ], "query": [ @@ -623,8 +528,6 @@ ], "port": "8900", "path": [ - "api", - "latest", "query", "result", "d3480867-d5f7-4f10-9686-8c658c102dcf" @@ -655,8 +558,6 @@ ], "port": "8900", "path": [ - "api", - "latest", "proofs:get" ] } @@ -682,8 +583,6 @@ ], "port": "8900", "path": [ - "api", - "latest", "proofs:get", "result", "72d7c0b3-a41e-4f90-91d5-082579f25b65" @@ -711,8 +610,6 @@ ], "port": "8900", "path": [ - "api", - "latest", "info" ] }